npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pie-dao/pie-vaults

v0.1.2

Published

This is the default package.json generated for your project

Downloads

4

Readme

Description

ExperiPie (TPIE++) is a new pool design with unlimited possibilities. The ExperiPie is based on the Diamond standard, this standard ensures contracts can grow beyond their restricted size. (extra info)

Motivation

There are basically two motivations, governance participation and yield farming.

In the current DeFi space there are lot’s of opportunities to participate in governance of various protocols. The ExperiPie uses a very flexible CallFacet which makes it possible to execute any call on behalf of the pool. The ExperiPie will be used to participate in governance protocols to benefit PieDao participants.

Yield farm opportunities can show up any time, not everyone has the liquidity or attention to fulfill every opportunity. Using the ExperiPie everyone can pool their tokens. Through the flexible nature of the pool it is possible to use active governance to take any yield farm opportunity.

See the forum post for more information.

Depends on

https://github.com/mudgen/diamond-2

Call Managers

CallManagers are addresses which are whitelisted to trigger arbitrary calls from the ExperiPie. A whitelisted caller can be added by calling addCaller(_newCaller) on the ExperiPie from the contract owner. ⚠️ This should be used with caution as it allows any token within an ExperiPie to be pulled out ⚠️. Only trusted addresses or smart contracts should be added as callers.

Lending Manager

The lendingManager allows the owner of that instance to withdraw and deposit tokens into lending lending protocols which are whitelisted in the lendingRegistry. The owner of the lendingManager instance can move tokens between whitelisted lending protocols in the lendingRegistry.

For a lending manager to be able to manage a ExperiPie's tokens it needs to be whitelisted as a caller.

The owner of the lending manager instance can lend, unlend and bounce(hopping between protocols).

These functions have the following interface and should be called on the Lending Manager contract.

/**
    @notice Move underlying to a lending protocol
    @param _underlying Address of the underlying token
    @param _amount Amount of underlying to lend
    @param _protocol Bytes32 protocol key to lend to
*/
function lend(address _underlying, uint256 _amount) bytes32 _protocol) public;

/**
    @notice Unlend wrapped token from its lending protocol
    @param _wrapped Address of the wrapped token
    @param _amount Amount of the wrapped token to unlend
*/
function unlend(address _wrapped, uint256 _amount) public;

/**
    @notice Unlend and immediately lend in a different protocol
    @param _wrapped Address of the wrapped token to bounce to another protocol
    @param _amount Amount of the wrapped token to bounce to the other protocol
    @param _toProtocol Protocol to deposit bounced tokens in
*/
function bounce(address _wrapped, uint256 _amount, bytes32 _toProtocol) external;

Lending Registry

The lending registry keeps track of all lending protocols and wrapped tokens. Only tokens and protocols registered in this registry can be used by the LendingManager. Currently supported lending protocols are Compound and Aave.

Contract address: 0xB739Dcf499306B191D9D4fa5255A8f20066a6a96

With the following functions protocols and wrapped tokens can be added:


/**
    @notice Set which protocl a wrapped token belongs to
    @param _wrapped Address of the wrapped token
    @param _protocol Bytes32 key of the protocol
*/
function setWrappedToProtocol(address _wrapped, bytes32 _protocol) external;

/**
    @notice Set what is the underlying for a wrapped token
    @param _wrapped Address of the wrapped token
    @param _underlying Address of the underlying token
*/
function setWrappedToUnderlying(address _wrapped, address _underlying) external;

/**
    @notice Set the logic contract for the protocol
    @param _protocol Bytes32 key of the procol
    @param _logic Address of the lending logic contract for that protocol
*/
function setProtocolToLogic(bytes32 _protocol, address _logic) external;

/**
    @notice Set the wrapped token for the underlying deposited in this protocol
    @param _underlying Address of the unerlying token
    @param _protocol Bytes32 key of the protocol
    @param _wrapped Address of the wrapped token
*/
function setUnderlyingToProtocolWrapped(address _underlying, bytes32 _protocol, address _wrapped) external;

Lending logic contracts

| Protocol | Key | Address | |----------|--------------------------------------------------------------------|--------------------------------------------| | Compound | 0x561ca898cce9f021c15a441ef41899706e923541cee724530075d1a1144761c7 | 0xB9a13E1D9c5dad1557C3B9B20ab99fb0FB16cCA7 | | Aave | 0xa9699be9874dcc3e11474d7d87b44bb314eb412a1960f1478100f7e2ccd4a6eb | 0x6Eb123bbd02324600AcF8a53575547EEB0a43135 | | Cream | 0x40e45d329815e79a55e43916f11f7a0112a31146f63a4fcaea413df0567a0bb2 | 0x280190cF9E6519eB772a2f444fAF080523246DB3 | | XSushi | 0xeafaa563273a4fdf984f5a9f1836dba7d5800658b802d449eb6ee18fce3d7c81 | 0x38e0eb114BEC4efcD8b1AC2C4b0c7335AFC1491D | | YGov | 0xf910d6d870f2fa35287ad95c43b0b1ebabfab3cbb469515dc168cd48e2a9c218 | 0x4c5b1fC5dcE8A96f1eaF1Ffa3d86546c2c939909 |

Lending logic contracts return the calls needed to lend or unlend from a protocol.

Deploying the factory

npx buidler deploy-pie-factory --network mainnet

Deploying an ExperiPie

  1. Create an allocation file like this one
  2. run npx buidler deploy-pie-from-factory --allocation [PATH_TO_ALLOCATION] --factory [FACTORY_ADDRESS] --network mainnet
  3. Copy the tx hash and search on Etherscan to find the address
  4. Verify the contract: npx buidler verify [PIE_ADDRESS] --constructor-args ./verify/experiPie.js --network mainnet