[GRANT] Idle Perp Yield Tranche mStable strategy

Abstract

Idle.Finance is excited to set up a grant proposal together with mStable.

The goal is to create Idle Perpetual Yield Tranches with a mStable strategy. We look forward to onboarding a new piece to our tranche suite :jigsaw:

Introduction

Idle is the longest-running and most-resilient DeFi yield aggregator and rebalancing protocol, which offers allocation strategies that allow users to maximize returns and optimize risk exposure across DeFi protocols.

Recently we released “Perpetual Yield Tranches” in beta version here, capped now at $5M during the guarded launch. Tranches allow users to enjoy optimized DeFi yields with built-in protection on deposits by holding the Senior class, and leveraged yield exposure with Junior one:

  • Senior Tranche offers the safest way to access DeFi yields, thanks to its built-in protection feature. With this instrument, LPs can enjoy and participate in complex and exotic products, reducing the exposure to tail risks. Senior Tranches intrinsically have a first lien on the underlying assets — they’re first in line to be repaid in case of default (hack, loss of funds);
  • Junior Tranche receives an amplified yield by carrying a higher grade of risk, as Junior holders have a second lien or no lien at all in case of fund losses. This class of tranches is designed to receive a higher share of yield compared to the Senior class, which will proportionally compensate their Junior counterparts for taking such risks.

As the focus of the Idle protocol is and has always been the security of its users our new implemented product Perpetual Yield Tranches has been audited by Consensys diligence and Certik.

We launched the first $DAI tranches pool that tokenizes the risks & yields of idleDAI Best-Yield pool.

More info in our announcement: Introducing Perpetual Yield Tranches - Guarded Launch Phase #1

Bounty Description

Create a strategy for Idle Perp Yield Tranches that supports mStable, in particular their Save product.

An example of a tranche strategy is available here (for depositing in the Idle protocol) and here (for Lido).

The tranche with the mStable strategy will support mUSD deposits, so mUSD from the main contract will then be sent to the new strategy which will put those in lending in the Save product. The strategy will then receive imUSD (the interest bearing version of mUSD), those should then be staked in their Vault in order to earn MTA rewards. The strategy itself should ‘tokenize’ the imUSD staked in the mStable Vault with a synthetic version of imUSD and send this synthetic back to the main tranche contract. An example of this can be found in this Convex strategy.

A wrapper contract should also be created to allow users to directly deposit underlyings supported by mStable and mint mUSD before depositing in the Idle tranches, an example of this can be found here (for deposit only in this case, but for mStable both all other logic , deposit and redeem should be implemented).

The strategy should implement this interface (some methods can be no-ops if not present). Both unit and integration tests in fork are required, an example of integration in fork can be found here

Technical documentation for Tranches is available here.

Bounty reward

Up to 3500$ in IDLE + 3500$ in MTA depending on completeness

Judging Criteria

  • Security approach
  • Gas efficiency
  • Development grade (only strategy code, unit tests, tests in fork)
  • Documentation completeness
  • Plus for deployment scripts

Applicants - How to apply?

Interested applicants can announce themselves here in the Idle governance forum to avoid that multiple candidates start working on the integration.

No KYC or personal info is required.

Deadline: 8th December 2021

Support

Devs can ask questions and receive support from the Idle team by joining the dedicated Discord #Dev channel

Resources

7 Likes

Would love to work on this :slight_smile:
Idle is on fire with new strategies ideas out day by day!

7 Likes

Hey @dantop super happy to see you interested also in this grant, it’s awesome to see such partecipation!
Initially we have designed this grant with @mrpqzm in mind following this post The Next Few Yield Sources For Idle - Potentially Undertaking By @IdleHusbandry where he analyzed different yield sources and potential integrations.
That being said I would wait 1-2 days to see if @mrpqzm is still interested in this and if he is I would suggest either to work together on this if it makes sense for you guys, or to choose between one of the RFP that we will publish between today and tomorrow where there are other similar grants for strategies and integrations. We do have a lot of grants and RFP coming :eyes: :slight_smile:

6 Likes

Hi Gentleman!

Thank you for thinking of me @william , and greeting @dantop !

I would love to take on this challenge as my first contribution to the DAO. I’ve been looking at MStable and I’ll push some runnable code tomorrow to github.

As this is my first task from the DAO, I would love it if @dantop you could have a look through my code. And of course, I’m more than happy to share the grant reward.

Best,

8 Likes

Great to hear that! :rocket:

6 Likes

will be happy to review the code! dm me on discord when done :slight_smile: @dantop#1943

np for the reward!

7 Likes

@mrpqzm @dantop
this is freaking awesome dudes!

feels like xmas came earlier this year :santa:

4 Likes

Sers… bls check.

5 Likes

Thanks for sharing will check it out most probably in the next days!

3 Likes

Updated sers.

5 Likes