Hello boys and girls, this is @IdelHusbandry
Foreword:
Been a user of IDLE for a while now, quite a significant IDLE owner, but Iām also looking to help IDLE integrate some yield sources as well. I did an in-depth analysis of the IDLE smart contracts, the main ones are:
-
IdleToken: holds pooled funds for all users for a specific asset and issues ERC20 shares of the pool (IdleTokens) for each deposit.
-
IdleCompound, IdleFlucrum, IdleAave, IdleDyDx, IdleDSR are all wrapper contracts used by IdleToken to interact with the pending protocols implemented.
-
There is an address called Rebalancer which will set the new allocations. The approach is centralised and calculated outside the ecosystem. The whole protocol can summarised with this function idle-contracts/IdleTokenGovernance.sol at f59d5b9232e36d5d40f32962ce6901e8614d4a5e Ā· Idle-Labs/idle-contracts Ā· GitHub
-
The contract can redeem unclaimed governance tokens. The supported governance tokens currently are: COMP, AAVE and IDLE
-
Looks like the team is constantly monitoring the APRs and risks for every lending protocol.
-
There is currently 2 ways of generating yields.
-
Best Yield: Allocations are adjusted in way that generates maximum yield across all protocols.
-
Risk Adjusted: this strategy automatically changes the asset allocation in order to find the optimal mix between risk and yield. (Looks like this approach is deprecated and support for this shall be slowly withdrawn)
-
Below is the list of tokens and lending protocols that already exists
New Potential Yield Sources
Alphahomora V2
The protocol put the tokens in cream finance. Probably cream finance can be used directly.
The existing contract can be integrated with Alphahomora V2 easily. Assuming people are okay with the risk of a protocol that uses CREAM Finance.
MStable
MStable has a governance token named MTA and its support needs to be added to IdleGovernanceToken.
MStable doesnāt have direct yield. We would need to:
- Deposit DAI/USDT/USDC/sUSD and generate mUSD.
- The generated mUSD can be deposited into the Save contract to earn MTA rewards.
- The mUSD provided to Save contract will be used to lend to Aave and Compound.
- The Save contract would automatically be liquidated into mUSD. It is not clear if the integration contract needs to have code needed to handle this.
- The generated mUSD can be used to provide liquidity to Feeder Pools to earn income from swap fees.
- We would need a contract to handle MTA rewards (gov token), yields generated from Aave and Compound, and Feeder Pools
- The stable coin pools are low-risk pools that offer good yields. Mstable allows doing both (liquidity providing and lending)
- It is not clear if the same portion can generate yields and liquidity provider fees at the same time.
- Integration may likely be very complex however, the yields are good. (20% on average).
Yearn
- Yearn has a product named Earn, which is a lending aggregator. It supplies tokens for lending to (Compound, dydx, Aave) - Very similar to IDLE
- Many of yearnās strategies utilise Curve Financeās liquidity mining programs.
Curve
Curve is for stable coin invariant swap. Curve pools can be split into three catagories:
- Plain Pools: a pool where two or more stable coins are paired against each other.
- Lending pools: a pool where two or more wrapped tokens are paired against one another, while underlying is lent out on some other protocol.
- Metapools: a pool where a stable coin is paired against the LP token from another pool.
Conclusion:
Having said all of this I believe MStable would be the most attractive subsequent yield source to integrate. However:
1. this is my first time trying to do some on a āDAOā led project like IDLE. And TBH, Iām not sure of some of the common practices. For example, do I just ask any dev-related questions here? Seems a bit slow and inefficient. Is here a dev telegram channel?
2. How is my compensation calculated? Iām a huge IDLE bull and holder, but I donāt work for free. In this DAO like situation, do I simply quote my price and the DAO votes on wether or not I get to get compensated for this specific work?
3. MStable (Polygon) only deposits the tokens to Aave(Polygon). But MStable(ETH) has many yield sources. Either the integration with IDLE has two parts:
A. depositing IDLE stable coins (USDT/DAI etc) to mUSD contract and save it in MSTABLE-SAVE Contract .
B. Allowing us to claim the MTA tokens
For A) I can see that the IDLE github has few wrappers written for every protocol IDLE supports. We need to write a similar wrapper for MStable.
For B) MTA is Mstable governance token. The contracts in Idle github only support COMP, stkAave governance tokens. To add support for MTA, this main contract needs to be changed. How does this work? Who do I contact to do this?
All the best.