# \[GRANT\] Idle Perp Yield Tranche mStable strategy

**URL:** <https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731>\
**Category:** 🛠 Grants & Bounties\
**Created:** [November 17, 2021, 8:55pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731 "2021-11-17T20:55:11Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salome](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/salome/32/258_2.png) [@Salome](https://gov.pareto.credit/u/Salome)\
**Post date:** [November 17, 2021, 8:55pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/1 "2021-11-17T20:55:11Z")

</div>

### Abstract

[Idle.Finance](https://idle.finance/#/)is excited to set up a grant proposal together with [mStable](https://mstable.org/).

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 🧩

### 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](https://beta.idle.finance/#/dashboard/tranches), 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](https://www.certik.org/projects/idle-finance) by Consensys diligence and Certik.

We launched the first $DAI tranches pool that tokenizes the risks & yields of [idleDAI Best-Yield pool](https://idle.finance/#/dashboard/stats/best/DAI).

More info in our announcement: [Introducing Perpetual Yield Tranches - Guarded Launch Phase #1](https://idlefinance.medium.com/introducing-perpetual-yield-tranches-guarded-launch-phase-1-12978c25b0f0)

### Bounty Description

Create a strategy for Idle Perp Yield Tranches that supports [mStable](https://mstable.org/), in particular their [Save product](https://docs.mstable.org/using-mstable/mstable-app/save).

An example of a tranche strategy is available [here](https://github.com/Idle-Labs/idle-tranches/blob/master/contracts/IdleStrategy.sol) (for depositing in the Idle protocol) and [here](https://github.com/massun-onibakuchi/lido-idle-tranche/blob/fix/steth-deposit/contracts/IdleLidoStrategy.sol) (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](https://github.com/Idle-Labs/idle-tranches/blob/master/contracts/strategies/convex/ConvexBaseStrategy.sol).

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](https://github.com/massun-onibakuchi/lido-idle-tranche/blob/fix/steth-deposit/contracts/LidoCDOTrancheGateway.sol) (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](https://github.com/Idle-Labs/idle-tranches/blob/master/contracts/interfaces/IIdleCDOStrategy.sol) (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](https://github.com/massun-onibakuchi/lido-idle-tranche/blob/fix/steth-deposit/test/integration/lidoCDO.js)

Technical documentation for Tranches is available [here](https://developers.idle.finance/strategies/perpetual-yield-tranches-beta).

### 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](https://discord.gg/fJaBYmS)

### Resources

- [Tranches Technical Documentation](https://developers.idle.finance/strategies/perpetual-yield-tranches-beta)
- [Perp Yield Tranches GitHub](https://github.com/Idle-Labs/idle-tranches/)
- [Website](https://idle.finance/)
- [Previous Gitcoin Grant for Perp Yield Tranches](https://gitcoin.co/issue/Idle-Labs/idle-contracts/32/100026512)

---

<div class="post-metadata">

**Author:** ![dantop](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/dantop/32/533_2.png) [@dantop](https://gov.pareto.credit/u/dantop)\
**Post date:** [November 17, 2021, 11:58pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/2 "2021-11-17T23:58:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![william](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/william/32/10_2.png) [@william](https://gov.pareto.credit/u/william)\
**Post date:** [November 18, 2021, 9:18am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/3 "2021-11-18T09:18:04Z")

</div>

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 @idlehusbandry in mind following this post [The Next Few Yield Sources For Idle - Potentially Undertaking By @IdleHusbandry](https://gov.pareto.credit/t/the-next-few-yield-sources-for-idle-potentially-undertaking-by-idlehusbandry/723) where he analyzed different yield sources and potential integrations.  
That being said I would wait 1-2 days to see if @idlehusbandry 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 👀 🙂

---

<div class="post-metadata">

**Author:** ![idlehusbandry](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/idlehusbandry/32/430_2.png) [@idlehusbandry](https://gov.pareto.credit/u/idlehusbandry)\
**Post date:** [November 18, 2021, 10:25am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/4 "2021-11-18T10:25:05Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![william](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/william/32/10_2.png) [@william](https://gov.pareto.credit/u/william)\
**Post date:** [November 18, 2021, 10:43am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/5 "2021-11-18T10:43:08Z")

</div>

Great to hear that! 🚀

---

<div class="post-metadata">

**Author:** ![dantop](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/dantop/32/533_2.png) [@dantop](https://gov.pareto.credit/u/dantop)\
**Post date:** [November 18, 2021, 11:16am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/6 "2021-11-18T11:16:49Z")

</div>

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

np for the reward!

---

<div class="post-metadata">

**Author:** ![unicorn](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/unicorn/32/48_2.png) [@unicorn](https://gov.pareto.credit/u/unicorn)\
**Post date:** [November 18, 2021, 11:23pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/7 "2021-11-18T23:23:07Z")

</div>

@idlehusbandry @dantop  
this is freaking awesome dudes!

feels like xmas came earlier this year 🎅

---

<div class="post-metadata">

**Author:** ![idlehusbandry](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/idlehusbandry/32/430_2.png) [@idlehusbandry](https://gov.pareto.credit/u/idlehusbandry)\
**Post date:** [November 19, 2021, 7:03am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/8 "2021-11-19T07:03:22Z")

</div>

Sers… bls check.

> **[GitHub - idlehusbandry/IdleMStable](https://github.com/idlehusbandry/IdleMStable)**
>
> Contribute to idlehusbandry/IdleMStable development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![william](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/william/32/10_2.png) [@william](https://gov.pareto.credit/u/william)\
**Post date:** [November 19, 2021, 9:12am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/9 "2021-11-19T09:12:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![idlehusbandry](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/idlehusbandry/32/430_2.png) [@idlehusbandry](https://gov.pareto.credit/u/idlehusbandry)\
**Post date:** [November 25, 2021, 10:51am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/10 "2021-11-25T10:51:03Z")

</div>

> **[GitHub - idlehusbandry/idle-tranches](https://github.com/idlehusbandry/idle-tranches)**
>
> Contribute to idlehusbandry/idle-tranches development by creating an account on GitHub.

Updated sers.

---

<div class="post-metadata">

**Author:** ![william](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/william/32/10_2.png) [@william](https://gov.pareto.credit/u/william)\
**Post date:** [January 28, 2022, 2:47pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/11 "2022-01-28T14:47:14Z")

</div>

@idlehusbandry your PR has been finally merged [MStable by idlehusbandry · Pull Request #19 · Idle-Labs/idle-tranches · GitHub](https://github.com/Idle-Labs/idle-tranches/pull/19)

---

<div class="post-metadata">

**Author:** ![Salome](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/salome/32/258_2.png) [@Salome](https://gov.pareto.credit/u/Salome)\
**Post date:** [January 28, 2022, 6:21pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/12 "2022-01-28T18:21:39Z")

</div>

Good news everyone!  
The mStable Perp Yield Strategy has been completed 🥳 Very excited to see this come to life soon, Keep an eye on our PYT [here](https://idle.finance/#/dashboard/tranches) 👀 🔥

Our Dev League has finalized the review of the work delivered by @idlehusbandry. We therefore can proceed with the payment of **3000$ IDLE** , which is going to be transferred in the following days.  
Please provide us with the receiving wallet address @idlehusbandry 💸 Thank you very much for your contribution to another successful integration!

mStable team @defimaxi @loth feel free to proceed with your payment for the grant as well 🙏

---

<div class="post-metadata">

**Author:** ![loth](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@loth](https://gov.pareto.credit/u/loth)\
**Post date:** [January 30, 2022, 9:36pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/13 "2022-01-30T21:36:29Z")

</div>

Thanks a lot for the good news Salome  
Kudos to @idlehusbandry for the good work and to @william for the close monitoring  
We’ll loop back tomorrow for the payment of the grant.  
Excited about the PYT 🌞

---

<div class="post-metadata">

**Author:** ![idlehusbandry](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/idlehusbandry/32/430_2.png) [@idlehusbandry](https://gov.pareto.credit/u/idlehusbandry)\
**Post date:** [February 1, 2022, 1:29pm UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/14 "2022-02-01T13:29:13Z")

</div>

0x5bCfC2dee33fBD19771d4063C15cFB6dD555bb4C

> **[Address 0x5bcfc2dee33fbd19771d4063c15cfb6dd555bb4c | Etherscan](https://etherscan.io/address/0x5bcfc2dee33fbd19771d4063c15cfb6dd555bb4c)**
>
> The Address 0x5bcfc2dee33fbd19771d4063c15cfb6dd555bb4c page allows users to view transactions, balances, token holdings and transfers of ERC-20, ERC-721 and ERC-1155 (NFT) tokens, and analytics.

You can send it here Salome! Thank you!

---

<div class="post-metadata">

**Author:** ![Salome](https://yyz1.discourse-cdn.com/flex031/user_avatar/gov.pareto.credit/salome/32/258_2.png) [@Salome](https://gov.pareto.credit/u/Salome)\
**Post date:** [February 2, 2022, 11:58am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/15 "2022-02-02T11:58:50Z")

</div>

The payment is processed, see details for verification below:

> **[Ethereum Transaction Hash (Txhash) Details | Etherscan](https://etherscan.io/tx/0x2986a170c2c31da24606c977ecc44e24c8960f3ddefbbf5ced03411e3083049d)**
>
> Ethereum (ETH) detailed transaction info for txhash 0x2986a170c2c31da24606c977ecc44e24c8960f3ddefbbf5ced03411e3083049d. The transaction status, block confirmation, gas fee, Ether (ETH), and token transfer are shown.

Thanks again for your work @idlehusbandry 👏

---

<div class="post-metadata">

**Author:** ![loth](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@loth](https://gov.pareto.credit/u/loth)\
**Post date:** [February 3, 2022, 9:03am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/16 "2022-02-03T09:03:53Z")

</div>

Hey @idlehusbandry  
mStable Grants DAO initiated the Parcel transactions today, a couple of signers to go (We’re 4/5) and the 3,000$ in MTA will be sent over shortly  
Apologies for the delay sir and thanks again for the good work  
We’re really excited to see this product live 🚀

---

<div class="post-metadata">

**Author:** ![loth](https://avatars.discourse-cdn.com/v4/letter/l/7bcc69/32.png) [@loth](https://gov.pareto.credit/u/loth)\
**Post date:** [February 7, 2022, 11:26am UTC](https://gov.pareto.credit/t/grant-idle-perp-yield-tranche-mstable-strategy/731/17 "2022-02-07T11:26:15Z")

</div>

@idlehusbandry @Salome

> **[Ethereum Transaction Hash (Txhash) Details | Etherscan](https://etherscan.io/tx/0x9881a09c3eed0e03e748d67dd8ecadf2b7cdeee66507a146c4dc078adc4e3844)**
>
> Ethereum (ETH) detailed transaction info for txhash 0x9881a09c3eed0e03e748d67dd8ecadf2b7cdeee66507a146c4dc078adc4e3844. The transaction status, block confirmation, gas fee, Ether (ETH), and token transfer are shown.

Funds were sent 2 days ago, please find here the transaction details 🙂
