The Next Few Yield Sources For Idle - Potentially Undertaking By @IdleHusbandry

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:

  1. IdleToken: holds pooled funds for all users for a specific asset and issues ERC20 shares of the pool (IdleTokens) for each deposit.

  2. IdleCompound, IdleFlucrum, IdleAave, IdleDyDx, IdleDSR are all wrapper contracts used by IdleToken to interact with the pending protocols implemented.

  3. 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

  4. The contract can redeem unclaimed governance tokens. The supported governance tokens currently are: COMP, AAVE and IDLE

  5. Looks like the team is constantly monitoring the APRs and risks for every lending protocol.

  6. There is currently 2 ways of generating yields.

  7. Best Yield: Allocations are adjusted in way that generates maximum yield across all protocols.

  8. 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)

  9. Below is the list of tokens and lending protocols that already exists

image

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.

10 Likes

Great work @mrpqzm!

Thanks for summarizing these points, it’s fantastic to see such a vibrant will to contribute.

Let me give you a couple of feedback on what you analyzed:

The integrations you proposed are perfectly aligned with Tranches. While Best-Yield uses only battle-tested yield sources, Tranches are a natural host of strategies with a higher risk profile.
Adding new “exotic” yield sources there, we will change the value proposition of the Best-Yield, thus potentially making current LPs concerned about liquidity allocation.

The features embedded in Tranches are different: Senior Tranches provide built-in protection on deposits, or it’s possible to leverage yield exposure with Junior ones.
In case of downstream yield default, the Senior class of a specific protocol would represent a safe place where get protection (thanks to Junior TVL).
On the other side, Junior token holders are aware of the underlying source and dependencies, deciding to deposit if such risks match their profile.

The underlying sources that you mentioned - Alphahomora, MStable, and others - will be part of a list of open grants that Leagues are going to deploy in the following days.
Curve integration is redundant because we already have Convex, preferring the latter as it holds more dependencies ( = more risks and higher APY).
Idle sponsored new tranches’ yield sources during Gitcoin hackathon, resulting in Yearn and Lido integrations; the list of grants will not include those names.
In the mid-term vision, Tranches could be grouped into CDOs. For example, a “USDC Conservative profile” will deploy the stablecoin simultaneously on Convex, Idle, Yearn, AH Senior classes, like TradFi CDOs combine multiple underlying products.

Concerning how you can contribute to developing new products, the mentioned list of open grants will show all the info needed!
You will be able to pick your preferred integration, work on it, and get compensated once you reach the milestones and deliver the code.
The best way to interact with other devs is by joining our Discord, channels #dev-talk and #dev-support.

4 Likes

Hi @mrpqzm thanks for your in depth post.

As Davide mentioned, it would probably be easier to use this yield sources as lending provider
for tranches rather than for IdleTokens as they are significantly more complex / risky.

Regarding each specific yield source, I would like to add a few things:

Alphahomora V2 has both a Earn section and a Yield Farming one. The first should be relatively easy to integrate (at least from a quick look) the second one is a bit more complex as they don’t give back plain ERC-20 tokens representing your position but rather ERC-1155 see here. In general it’s interesting, but the Cream/Iron Bank dependency it’s something to factor for sure, specially after ther recent hack.

MStable it’s a good candidate for Tranches (MTA would be automatically managed), I’m not sure about all the details however, I need to take a deeper look.

For Yearn we do have an integration here IdlePerpetual-YieldTranche-GR11/IdleYearnVaultStrategy.sol at master · sunnyRK/IdlePerpetual-YieldTranche-GR11 · GitHub developed during the Gitcoin 11 hackathon but there is an issue atm that blocks the integration which is the way they handle mgmt fees, because it would be considered a ‘loss’ with the current implementation of Tranches so it would trigger a default. Some variations would be needed probably to the main Tranches contract (IdleCDO.sol) to make this work

For Curve I agree with @Davide that it’s better to see how it’s going with Convex first (given that the grant it’s already in development)

Best place to ask tech questions is for sure our Discord server

For grants, the Dev League usually sets up the max budget for the compensation according to the complexity of the task, the actual amount then depends on the completeness of the task. For tasks that will be published in the Request for Rroposal (RFP) list, we are also open to applications where the candidates suggest the compensation, but of course we will also post an indicative budget too

For tranches I would say that we should probably prioritize ETH atm given that we still haven’t launched tranches on Polygon. The integration of new yield sources in tranches should be easier in general but of course we can offer some support and we can also organize a group with someone from MStable

5 Likes

Okay, understand guys. Two main things:

1.) I’ll join discord
2.) I’ll wait for the grants to be published here.

5 Likes

@Davide the size of the disclaimer for CDOs like this will be bigger than their solidity code. :money_mouth_face:

Jokes aside, crossing fingers for CDOs on Idle. :crossed_fingers:

I am starting to feel that we need to prepare a better deck for B2B integrators, surprisingly (to me at least) a lot of them do not get how tranches could be used as a yield source and simultaneously help users manage their risk aka “get insured”.

The possibility to build CDOs is something that needs to be very well explained in dev grants and bounties.
On the topic of grants, I would like to know If Idle is putting enough money on the table for devs or we need to add more, especially in a bull run where devs are in higher demand.

A question for @william and @Teo is if there is any value in hiring or allocating new League devs to these CDOs/new yield sources?
Just because, you know… TVL and APY.

I apologize if this is already happening but because there are no updates coming from Idle’s coding bunkers, I have to ask. :rofl: :rofl: :rofl: :rofl: :rofl: :rofl:

6 Likes

Hey @unicorn, leagues are working on some content and guides around tranches that will be released soon so to have all the things better defined and explained.

Regarding devs and strategies we currently have 4 grants up with contributors that already started working, two of them are on CDOs (with different properties) and other 2 are working on strategies (for Lido and Convex). The strategies are both almost completed while CDOs require more time. The next upcoming grant that will come out (on Monday most probably) is for mStable with @mrpqzm hopefully applying for that too.

I think we now have few things going on but of course it would be good to have even more contributors and that’s why we will also publish a first version of the RFP list next week.

Regarding the addition of new ‘permanent’ hires for the Dev League, it’s for sure something we would like to do, but it’s far from easy to find good and qualified candidates for a permanent role. I think that, ideally, onboarding someone who successfully contributed to the DAO it’s the best way right now to find those new devs (like the ones who are working on grants atm :eyes: :slight_smile:)

8 Likes