# Introduction

Introduction

![](/files/ZAmQSr44G99LaU78bKL5)

### Welcome to the [I**dle**](https://idle.finance/) **Docs**

The best place to find all the information you need to start using Idle protocol and collaborate with the Idle DAO.

{% hint style="info" %}
**The Idle protocols** and **DAO** compose a decentralized organization that builds financial infrastructure for Web3. Businesses of every size, from brand new DeFi protocols to FinTech companies, use our protocol to *maximize capital efficiency* and *manage their treasuries* within DeFi.
{% endhint %}

<figure><img src="/files/EbkeqkEk4PNZFQjGASr1" alt=""><figcaption></figcaption></figure>

We believe that *everyone deserves the best for their idle funds*, both in terms of returns and risks. We work with other DeFi protocols, security auditors, and regulators so businesses that run on Idle don’t have to.

### Why Idle?

To explain the rationale behind the naming <mark style="color:blue;">Idle</mark>, we need to borrow some concepts from the gaming world.

*Idle games* live in the margins of digital games and automated applications. Idle Finance lives in the same margins of decentralised finance and automated smart contracts interactions. This genre of automated decentralised financial services requires little or no user interaction. Yield aggregators, or other kinds of structured primitives built-in DeFi, tap from this concept to simplify and minimise the interactions required by their users.

With *idle games*, active withdrawal from the game comprises an essential part of the gameplay as players wait for the game state to change over time. Same for Idle Finance, users actively check their balances growing with DeFi yields, waiting for their funds to change over time until they reach a specific threshold of financial satisfaction.

This mode of interaction is paradigmatic for the change of roles decentralised financial technologies have in our lives. Suddenly consumers could commission robo-advisors to move their cash to whoever is offering the best rates or to automatically refinance debt. Value-added services from multiple providers would be equally easy to access, meaning they would have to compete on price or terms. In other words, much like the open Internet, profits will be rapidly transformed into a consumer benefit.

## Idle docs Index

There are 4 main chapters in the idle documentation. Each chapter starts with a broad introduction covering the sections and subsections that follow to help you better understand the arguments addressed and easily find the answers to your questions.

{% content-ref url="/pages/-M7IoMVTjkDBfOXwRy-H" %}
[Products](/products/introduction)
{% endcontent-ref %}

Presenting Idle's product suite, i.e. [Best Yield](/products/best-yield) and [Yield Tranches](/products/yield-tranches) as well as Idle DAO to DAO [Integration programs](/products/get-involved/integrators-program).

{% content-ref url="/pages/-LwF\_vGHFg13x7fbZck\_" %}
[Developers](/developers/introduction)
{% endcontent-ref %}

Presenting Idle [codebase](https://app.gitbook.com/o/-LwFtoytYZh7kXPdZp-v/s/-Lw-v0NTae0RVW1spR9R/~/changes/fwSWEoG7SDdqwHYUrlhF/developers/contracts-and-codebase) and developers materials linked to [Best Yield](https://app.gitbook.com/o/-LwFtoytYZh7kXPdZp-v/s/-Lw-v0NTae0RVW1spR9R/~/changes/fwSWEoG7SDdqwHYUrlhF/developers/best-yield-strategy) and [Yield Tranches](https://app.gitbook.com/o/-LwFtoytYZh7kXPdZp-v/s/-Lw-v0NTae0RVW1spR9R/~/changes/fwSWEoG7SDdqwHYUrlhF/products/perpetual-yield-tranches).

{% content-ref url="/pages/-MZT3JzLMC0X\_z8rtdI0" %}
[Governance](/governance/introduction)
{% endcontent-ref %}

Presenting [Idle DAO](/governance/idle-dao) processes, [Idle Leagues](/governance/idle-dao/idle-leagues) structure and [$IDLE token](/governance/idle).

{% content-ref url="/pages/-MZh8gygjfLf0craZH1q" %}
[Other](/other/brand-assets)
{% endcontent-ref %}

Presenting Idle [glossary](/other/golossary), additional [resources](/other/resources), and [archive](/other/archive).&#x20;


# Introduction

Products > Introduction

<figure><img src="/files/0AITDYATmlM5hOXocIuV" alt=""><figcaption></figcaption></figure>

Idle DAO is a decentralized collective that builds a set of products that aim to unlock the power of decentralized finance as a one-stop source of yield. It allows users to algorithmically optimize their digital asset allocation across leading DeFi protocols, whether they want to maximize it or keep tabs on their risk-return profile.

The <mark style="color:blue;">**Product Suite**</mark> is currently composed of

| Best Yield                                                                                                                                                                                                                                                                                                                                                                                                          | Yield Tranches                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p>A lending aggregator that automatically analyses supply rate functions across integrated protocols and total funds in the pool to constantly rebalance capital across any number of protocols to <strong>earn the highest interest rate possible</strong> with very high precision. <br><br>It is currently available for <strong>Ethereum</strong> and <strong>Polygon</strong> networks<strong>.</strong> </p> | <p>YTs are capital pools that automatically generate and tranche yields and risks based on a range of market-neutral yield strategies, including lending income, trading fees from Automated Market Makers, and protocol incentive farming.  <br><br>Pools are associated with two risk-adjusted classes: <strong>Senior</strong> and <strong>Junior</strong> tranches.</p> |

{% hint style="warning" %}
*The former*[ *Risk-adjusted* ](/other/archive/risk-adjusted)strategy was deprecated in October 2021, and it's no more part of the current products suite.
{% endhint %}

## Products index

There are three main sections in the Products chapter

{% content-ref url="/pages/-M7IoMVVK5mJLs9egyhr" %}
[Best Yield](/products/best-yield)
{% endcontent-ref %}

With a focus on the [Best Yield](/products/best-yield) strategies, their underlying tokens, and available blockchains. In this section, you can also find helpful [user guides](/products/best-yield/overview) and answers to [frequently asked questions](/products/best-yield/faqs) about the strategies.

{% content-ref url="/pages/iC3dddbydnvWikphBVWe" %}
[Yield Tranches](/products/yield-tranches)
{% endcontent-ref %}

With a focus on [Yield Tranches](/products/yield-tranches), their underlying tokens, and chains. In this section, you can also find some helpful [user guides](/products/yield-tranches/overview) and answers to [frequently asked questions](/products/yield-tranches/faqs) about Tranches.

{% content-ref url="/pages/-M7IaoaVFFBnTEOvYBcX" %}
[Fee structure](/products/fees)
{% endcontent-ref %}

With a clear explanation of the fees applied to the Idle's strategies.

{% content-ref url="/pages/n4ssKcOWM0sooQoWpR5n" %}
[Integrators program](/products/get-involved/integrators-program)
{% endcontent-ref %}

With a focus on the integration process for DAOs and DeFi platforms that want to leverage the Idle product suite, either on [Ethereum](broken://pages/gBLVGQuh1YXAnqWYzQFB) or [Polygon](broken://pages/tTLs6eEttQInSMyJ4NHj).

## IPFS interface

The Idle protocol and its products are accessible via IPFS at the following URL

{% embed url="<https://ipfs.idle.finance/>" fullWidth="false" %}
<https://ipfs.idle.finance/>
{% endembed %}


# Best Yield

Products > Best Yield

<figure><img src="/files/lbQ7cJfulvDY7qVJXvqK" alt=""><figcaption></figcaption></figure>

The Best Yield vaults are single-sided liquidity pools that aim to offer the highest yield for supported stablecoins at all times. This is achieved by programmatically allocating these assets across several lending pools.&#x20;

Best Yield benefits users by socializing gas costs, automating the yield generation and rebalancing process, and automatically shifting capital as opportunities arise. End users and integrators do not need proficient knowledge of the underlying protocols or DeFi.&#x20;

Users' funds are pooled together in the main contract (one for each supported token) to minimize gas expenses for reallocating funds and provide, at the same time, the highest aggregated APY for all pooled funds.&#x20;

Interest rates are constantly monitored, and an off-chain bot computes the exact allocations to maximize aggregated APY. If, for a given pool, the current on-chain allocations are different from the newly calculated one, the smart contract receives new allocations, and the pool gets rebalanced.

{% hint style="info" %}
This strategy has been battle-tested since mid-2019, and it’s considered one of the most resilient in the entire DeFi space.
{% endhint %}


# Overview

Products > Best Yield > Overview

The Best Yield vaults aggregate and optimize multiple lending markets:

* Over-collateralised, top-tier lending protocols such as Aave, Compound
* Idle's [Senior Yield Tranches](/products/yield-tranches) to maintain a conservative risk profile while extending and improving the yield spectrum.

It either optimizes allocation continuously using an algorithm or uses fixed weights allocation.

## How does Best Yield work?

The Best Yield vaults constantly monitor interest rates on various DeFi yield sources to ensure the current allocation is yielding the best aggregate interest rate available on the market. Users' funds are pooled together and programmatically deposited into one or more of the available lending protocols.&#x20;

<figure><img src="/files/PgNSrYg1lbSKqAOzLVLx" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
By analyzing supply rate functions across integrated platforms and total funds in the pool, the strategy is able to constantly rebalance capital across any number of protocols to **earn the highest interest rate possible** with very high precision.
{% endhint %}

When users deposit funds, they receive `idleTokens` from Idle in exchange. `idleTokens` are ERC-20 tokens that can be redeemed for their underlying assets at any time. As interest accrues to the assets supplied, `idleTokens` are redeemable at an exchange rate (relative to the underlying asset) that constantly increases over time, based on the interest earned by the underlying asset.

## Allocation model

Best Yield vaults maximise the current aggregated interest rate, modeled as follows

$$
max\ q(x)= \sum\_{i=0}^{n} \frac{x\_i}{tot} \* nextRate\_i(x\_i)
$$

where `n` is the number of lending protocols used, `x_i` is the amount (in underlying) allocated in the protocol `i` , `nextRate(x_i)` is a function that returns the new APR for protocol `i` after supplying `x_i` amount of underlying and is `tot` the total

$$
tot=\sum\_{i=0}^{n} x\_i
$$

## Protocols and assets&#x20;

{% tabs %}
{% tab title="Ethereum" %}
Best Yield with algorithmic optimization

**Integrated protocols**

* [Compound](https://compound.finance/)
* [Aave](https://aave.com/)
* [Senior tranches](/products/yield-tranches/overview#senior-tranches)

#### Integrated assets

* [DAI](https://etherscan.io/address/0x3fe7940616e5bc47b0775a0dccf6237893353bb4)
* [USDC](https://etherscan.io/address/0x5274891bEC421B39D23760c04A6755eCB444797C)
* [USDT](https://etherscan.io/address/0xF34842d05A1c888Ca02769A633DF37177415C2f8)
  {% endtab %}
  {% endtabs %}

{% hint style="info" %}
Idle DAO has established a series of [Integration Standard Requirements](/developers/security/integration-standard-requirements) to integrate new yield sources or assets in the BY vaults.
{% endhint %}

## Benefits of using Best Yield

* A superior *optimisation algorithm* for automatic management of users' funds;&#x20;
* Gas fees savings for funds rebalance (which the user would have to pay to deposit funds/interact from one platform to another);&#x20;
* Participating in the IDLE liquidity mining program and leveraging all the advantages linked to its [multiple use cases](/governance/idle/use-cases);&#x20;
* By depositing into BY pools users can get other underlying governance tokens as a form of incentives (e.g. COMP or AAVE);&#x20;
* For integrators, no need to stitch together disparate protocols or spend months integrating and updating yield functionality.


# Guides

Products > Best Yield > Guides

In these quick guides, we will show you how to deposit assets into the Idle protocol using the **Best Yield** strategie&#x73;**.** Similarly, we will cover the withdrawal process. Jump to the section of your interest following the list of contents below:

The guides can be used either on the Ethereum or on the Polygon chains.

* [Deposit funds on Best Yield](/other/guides/deposit-funds)
* [Redeem funds on Best Yield](/other/guides/redeem-funds)


# Deposit funds on BY

Products > Best Yield > Guides > Deposit

## **Deposit funds**

This tutorial will guide users in the process of depositing new funds in Idle through Best Yield strategies on the Ethereum mainnet.

## <mark style="color:blue;">Ethereum</mark>

### **Before starting**

To ensure a smooth onboarding on Idle, the user should meet the following requirements:

* Own a supported Ethereum wallet (*Metamask*, *Coinbase wallet*, *WalletConnect, Ledger, Trezor*)
* Own tokenized assets (DAI, USDC, USDT, WETH, WBTC)
* Own Ether (ETH) to cover network fees (i.e. gas)

### Connecting to the Idle dApp

1. From the [idle.finance](https://idle.finance/#/) homepage click on [*Enter App*](https://app.idle.finance/#/dashboard)*.*
2. Once in the dashboard, click on *Connect Wallet*, and then select the supported wallet type from the list. In this guide, we will use the *Metamask* browser wallet.
   1. If the user has multiple addresses in his wallet, he should select the one he plans to use to make a deposi&#x74;*.*
3. If the connection is successful, in the top left corner the user will see the connected wallet, as well as the IDLE balance.

<figure><img src="/files/xymLCRsLysWxEPiLhWmG" alt=""><figcaption><p>Dashboard page</p></figcaption></figure>

### Depositing assets

1. Choose the *Best Yield* strategy in the topbar under *Earn*. There are different [assets](/products/best-yield/overview#protocols-and-assets) available (i.e. DAI, USDC, USDT) offering different *APY*s depending on supply and demand equilibria and the BY strategy chosen.&#x20;
2. Next to each token listed, the user will see either a 🛡️ or a ⚡️symbol. These symbols describe the type of Best Yield strategy users will deposit in:
   1. Senior Best Yield 🛡️
   2. Junior Best Yield ⚡️
3. The user should click on the asset he wishes to deposit.
4. Insert the number of tokens in the right panel and click on deposit. The smart contract will automatically set the gas limit based on current data.&#x20;
   * First-time users will be asked to approve the token spending on the contract before depositing. The spending allowance can be unlimited or exact. Users can then check their spending limits on third-party tools such as [Revoke Cash](https://revoke.cash/).
   * Once the approval is confirmed, the user will be able to deposit the approved asset into the BY strategy of choice. He will now possess *IdleYield* tokens for the asset deposited.&#x20;
   * By visiting the *Dashboard* page, the user will be able to see an overview and the performance of his deposit/s.&#x20;

{% hint style="warning" %}
Please note that the gas limit should not be decreased to ensure that the transaction does not fail and it's executed promptly.
{% endhint %}

<figure><img src="/files/wsdWS63xcLQ0lGKd0f5F" alt=""><figcaption><p>Best Yield's assets page</p></figcaption></figure>

<figure><img src="/files/qR87jHJ7YnZOy4NXZzAx" alt=""><figcaption><p>Senior Best Yield's USDC page</p></figcaption></figure>

Need further help? Check further our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# Redeem funds on BY

Products > Best Yield > Guides > Redeem

## <mark style="color:blue;">Ethereum</mark>

### Redeem funds

1. Visit the [Idle dApp](https://app.idle.finance/#/dashboard) and connect your wallet.
2. Go to the BY strategy page under the *Earn* section. There will be a *Deposited assets* section showing the balances deposited.&#x20;
3. Click on the token of interest.&#x20;
4. In the right panel, click *Withdraw* and then insert the amount of token to redeem.&#x20;
5. After the Tx executes, users will see their tokenized asset balance and any redeemed governance tokens less the current performance fee.

<figure><img src="/files/ulDuDYiroFQgV1PONE1k" alt=""><figcaption><p>Senior Best Yield's USDT page</p></figcaption></figure>

### Redeem only farmed rewards

1. Follow the steps outlined in the [Redeem funds section](#redeem-funds) up to point 3.
2. Once on the strategy page, scroll down and you will see a summary of the claimable rewards
3. Click on *Claim Rewards* and sign the Tx

<figure><img src="/files/1XQIw30DOk5AVe8kNRgS" alt=""><figcaption></figcaption></figure>

### Redeem interest-bearing tokens

{% hint style="warning" %}
This feature is active only on Senior BY and only if the contract is paused to let users always have the possibility to redeem their funds (as interest-bearing tokens).&#x20;
{% endhint %}

If the Senior BY contract is paused, users can decide to withdraw their funds in the form of interest-bearing tokens (e.g. aDAI/cDAI/eDAI). To do so:

1. Follow the steps outlined in the [Redeem funds section](#redeem-funds) up to point 3.
2. In the right panel, click on *Withdraw.*&#x20;
3. Tick the *Withdraw interest-bearing tokens* option
4. Click on *Withdraw interest-bearing*

<figure><img src="/files/PUJOWfaOBJNHbvu5I72z" alt=""><figcaption></figcaption></figure>

Need further help? Check our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# FAQs

Products > Best Yield > FAQs

<details>

<summary>How can BY strategies provide higher returns than other options?</summary>

The BY algorithm is programmed to analyze the supply rate functions across integrated protocols and total funds in the pool, and it's able to constantly rebalance capital across any number of protocols to **earn the highest interest rate possible** with very high precision.

</details>

<details>

<summary><strong>How is the BY APY calculated in each pool?</strong></summary>

The displayed APY is the aggregated interest rate of the APYs coming from multiple lending providers, depending on the allocated funds and the governance tokens from the underlying protocols.

</details>

<details>

<summary><strong>When a BY rebalance is triggered?</strong></summary>

Several factors can trigger a rebalance. Factors related to network conditions/congestion, and if a new allocation exceeds the previous one by a significant percentage. Hence, the timing is variable.

In general, a rebalance happens every 3 hours on Ethereum and hourly on Polygon.

</details>

<details>

<summary><strong>Can I add more funds if I already deposited assets?</strong></summary>

Yes, any user who has already deposited funds within one or more pools can add additional funds to the current deposited assets.&#x20;

Each addition of new funds always requires a confirmation and signature via smart contract, and therefore require to pay the related network fees.

</details>

<details>

<summary><strong>Are there any protocol fees related to BY?</strong></summary>

The BY strategies charge a performance fee on the yields generated when deposited funds are redeemed.&#x20;

For more information on Idle's fees, please visit the dedicated [Fee structure section](/products/fees).

</details>

Need further help? Check our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# Yield Tranches

Products > Yield Tranches

<figure><img src="/files/VgFroRX1qvZZQIG8Mq1W" alt=""><figcaption></figcaption></figure>

> *In the financial world, a tranche represents a product split that carries specific features like risk, yields, duration. They are often arranged together to create pools of diversified products or a basket of investments with similar characteristics (risk-return related)*.

Based on this concept, Idle launched its own tranches primitive: [Yield Tranches](https://idle.finance/#/dashboard/tranches).

Each tranched asset has its own yield source, with two risk-adjusted investment profiles (Senior and Junior).&#x20;

{% hint style="success" %}
Taking the stETH Yield Tranche based on the Instadapp stETH pool as an example, stETH deposited into the Senior and Junior classes of that Instadapp-based strategy are aggregated into a single pool and then deployed into the Instadapp Lite market.
{% endhint %}

Tranches allow users to enjoy DeFi yields with **built-in protection on deposits** for Senior depositors or **boosted yield** for Junior ones.

{% hint style="info" %}
Users can decide the strategy according to their risk profile: they can deposit funds into two different tranches (**Senior** or **Junior**) in exchange for a token indicating their claim.
{% endhint %}


# Overview

Products > Yield Tranches > Overview

## How do Yield Tranches work?

The product offers two classes of tranches, differentiated by the level of risk and the share of underlying yield assigned to each class.

<figure><img src="/files/x8U1UQX4CJQtsoLOTpEg" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="Senior Tranches" %}
This class of tranche offers **intrinsic protection on funds**, given by Junior class deposits. Each pool is composed of yield-bearing tokens, and the pool’s NAV is meant to only increase. A decrease in the NAV triggers the emergency shutdown to protect YTs liquidity providers.\
\
Senior Tranches intrinsically **have a first lien on the underlying assets** — they’re first in line to be repaid in case of default (hack or loss of funds). This product provides **full-spectrum coverage**, as the loss is covered regardless of the dependency or underlying protocol that caused it. Junior TVL will cover Senior TVL from a full spectrum of oracle/smart contract risks on:&#x20;

* Yield Tranches themselves;&#x20;
* Underlying yield source;&#x20;
* All the dependencies of the underlying yield source.
  {% endtab %}

{% tab title="Junior Tranches" %}
This class of tranche achieves a **greater and leveraged yield** by dragging more risk, as Junior holders have a second lien or no lien at all in case of fund losses.&#x20;

Junior tranche is designed to receive a higher share of yield compared to the Senior class, which will proportionally compensate for the higher risk taken by Junior depositors.
{% endtab %}
{% endtabs %}

## Adaptive Yield Split

The [Adaptive Yield Split](https://medium.com/idle-finance/adaptive-yield-split-foster-pyts-liquidity-scalability-a796fa17ea35) is the mechanism that computes the APY split between Senior and Junior Tranches. It is dynamically conditional to the liquidity deposited on each tranche side. This mechanism lets:

* **Senior Tranche** receives most of the underlying yield when liquidity is low on the Junior side (i.e. low coverage on Senior funds), or receives a guaranteed minimum portion of the underlying yield when Junior liquidity is high (i.e. high coverage on Senior funds);
* **Junior Tranche** receives outperforming APYs on the Junior Tranches, no matter what the amount of deposited liquidity on the Senior is.

<figure><img src="/files/TZqymivVrc8rbzBC8Z6A" alt=""><figcaption><p>Returns examples vs a Base APY of 10%</p></figcaption></figure>

More technical details regarding this split mechanism can be found in the dedicated section.

{% content-ref url="/pages/siiGIecrDySVmJd2E8Y8" %}
[Adaptive Yield Split](/products/yield-tranches/adaptive-yield-split)
{% endcontent-ref %}

## Protocols and assets

Yield Tranches are available on Ethereum, Polygon zkEVM, and Optimism for multiple protocols and underlying assets.

### Ethereum mainnet

{% tabs %}
{% tab title="Lido" %}
[Lido](https://lido.fi/) enables users to mint transferable utility tokens (stETH), which receive rewards linked to the related validation activities of writing data to the blockchain, while the tokens can be used in other on-chain activities.

#### Integrated assets

* [stETH](https://etherscan.io/address/0x34dcd573c5de4672c8248cd12a99f875ca112ad8)
* [MATIC](https://etherscan.io/address/0xF87ec7e1Ee467d7d78862089B92dd40497cBa5B8)

{% hint style="info" %}
stMATIC YTs accept MATIC as the deposited asset to give users a seamless experience by staking their tokens in a few clicks. When users want to redeem, stMATIC YTs generate an NFT representing the underlying capital. After 2–3 days, the average waiting period for stMATIC unstaking, users can finalize their withdrawal.
{% endhint %}
{% endtab %}

{% tab title="Instadapp" %}
[Instadapp](https://instadapp.io/) leverages stETH against standard ETH to gain an increased amount of staking rewards.

#### Integrated assets

* [stETH](https://etherscan.io/address/0x34dcd573c5de4672c8248cd12a99f875ca112ad8)
  {% endtab %}

{% tab title="Morpho" %}
[Morpho](https://morpho.org/) is a peer-to-peer layer built on top of the main DeFi lending pools offering a trustless lending primitive.

**Curators:** [Steakhouse](https://www.steakhouse.financial/)

#### Integrated assets

* [USDC](https://etherscan.io/address/0x9C13Ff045C0a994AF765585970A5818E1dB580F8)
  {% endtab %}

{% tab title="Gearbox" %}
[Gearbox](https://gearbox.fi/) brings together lending and prime brokerage in the same protocol offering de facto composable leverage.

#### Integrated assets

* [USDC](https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48)
* [WETH](https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
  {% endtab %}

{% tab title="Ethena" %}
[Ethena](https://www.ethena.fi/) manages the synthetic dollar USDe meant to be the first internet bond thanks to the combination of yields generated through staking and derived from the funding and basis spread of perpetual and futures markets.

#### Integrated assets

* [USDe](https://etherscan.io/token/0x4c9edd5852cd905f086c759e8383e09bff1e68b3)
  {% endtab %}
  {% endtabs %}

LPs receive `IdleCDO_AA_StrategyName` (e.g. `IdleCDO_AA_idleDAIYield`) for Senior deposits and `IdleCDO_BB_StrategyName` for asset provision in the Junior class. Both tokens are fully fungible ERC-20.

Some Tranches are labeled as *Experimental*, meaning some deposit limits (caps) exist.

## Yield and loss scenarios

> Given the nature of the two classes of tranches, which differ in terms of risks and gains opportunities, it is possible to explain their behavior through two scenarios: a **Yield case** and a **Loss case.**

Let's assume to have a DAI pool generating a 10% yield, where users deposit $10m split as follows

* 70% on Senior Tranche, i.e. $7m
* 30% on Junior Tranche, i.e. $3m

<figure><img src="/files/zDl5pIfoROeGUmxdjJh2" alt=""><figcaption></figcaption></figure>

There can be two scenarios:

1. When the loss is higher than the Junior liquidity, the Senior Tranche will also In the **Yield case**, the interests generated in the pool ($1m DAI in total) will be split as $490k DAI (70% of the interest) to the Senior Tranche and $510k DAI (30% of the interest) to the Junior Tranche. As expected, The yield is higher for the Junior Tranche because, as mentioned, this class takes more risk than the Senior one and is rewarded accordingly.
2. In the **Loss case** (with the loss being lower than the Junior liquidity), the only class of tranches affected by a possible loss will be the Junior one. Suppose, there is a $1m DAI hack loss, the Senior tranche will have the entire (100%) capital protected, while Junior tranches will bear a partial loss (33%) of the funds deposited.
   * In the case when the loss is higher than the Junior liquidity, also the Senior Tranche will suffer from the hack. Its loss will be anyway mitigated by the Junior counterparty.&#x20;

## Benefits of using Yield Tranches

* Cheaper transactions’ deposits and redeems;
* Governance tokens (COMP, stkAAVE, LDO, CVX, CRV) automatically harvested to boost yields;
* Deposits and withdrawals are possible at any time due to no locking periods or epochs;
* No hidden fees: 10-15% performance fee.


# Adaptive Yield Split

Products > Yield Tranches > Overview > AYS

> The Adaptive Yield Split is a unique feature of YTs that manages the return distribution dynamically conditional to the liquidity deposited on each side (Senior/Junior) of the Tranche.

<figure><img src="/files/tmy7yItz6jKwKvsX44yr" alt=""><figcaption></figcaption></figure>

Mathematically, the formulas behind this mechanism consider mainly [Senior and Junior liquidity ratios](#liquidity-ratios) to compute [Senior and Junior returns](#senior-and-junior-yields).

{% hint style="info" %}
Please note that the labels used slightly change the naming at the contract level

* The Senior TVL ratio is `_AATrancheSplitRatio`
* The Senior Yield share is `_trancheAPRSplitRatio`
  {% endhint %}

### Liquidity ratios

First, we define the Senior and Junior TVL ratios as

$$
\text{TVL ratio}*{Sr} = \frac{\text{Liquidity}*{Senior}}{\text{Liquidity}\_{Senior + Junior}}
$$

$$
\text{TVL ratio}*{Jr} = \frac{\text{Liquidity}*{Junior}}{\text{Liquidity}\_{Senior + Junior}}
$$

### Senior and Junior yields

The Senior return can be calculated as

$$
\text{APY}*{Sr} = \text{Base APY} \times \text{Yield share}*{Sr} \qquad \tag{1}
$$

where the *Base APY* is the underlying Tranches yield and the *Yield share* of the Senior side is a piecewise function conditional to the liquidity on the Senior tranche.&#x20;

$$
\text{Yield share}*{Sr} =
\begin{dcases}
99% & \text{if } \text{TVL ratio}*{Sr} \geq 99%  \\
\\
\dfrac{\text{Liquidity}*{Senior}}{\text{Liquidity}*{Senior + Junior}} & \text{if } \text{TVL ratio}*{Sr} > 50%  \\
\\
50% & \text{if } \text{TVL ratio}*{Sr} \leq 50%  \\
\end{dcases}
$$

The Junior return can be calculated as

$$
\text{APY}*{Jr} = \frac{(\text{Base APY} - \text{APY}*{Sr}) \times \text{TVL ratio}*{Sr}}{\text{TVL ratio}*{Jr}} + \text{Base APY} \qquad \tag{2}
$$

**Normal case**

When Senior liquidity represents 50-99% of the funds in the Tranche, we use [Equation (1) ](#senior-and-junior-yields)to compute the Yield share of the Senior side.

Alternatively, we use some fixed percentages. There are two **hedge cases**:

1. The majority of total Tranche's liquidity lying on the Senior side (more than 99%)
2. Less than half of total Tranche's liquidity lying on the Senior side (less than 50%)

$$
\text{Yield share}*{Sr} =
\begin{dcases}
99% & \text{if } \dfrac{\text{Liquidity}*{Senior}}{\text{Liquidity}*{Senior + Junior}} \geq 99%  \\
\\
50% & \text{if } \dfrac{\text{Liquidity}*{Senior}}{\text{Liquidity}\_{Senior + Junior}} \leq 50%  \\
\end{dcases}
$$

In the first case, we set the Yield share of Senior Tranches equal to 99% while in the second case, we set it equal to 50%. These two hedge cases link to the principle that

> * **Senior Tranche** receives most of the underlying yield when liquidity is low on the Junior side (i.e. low coverage on Senior funds), or receives a guaranteed minimum portion of the underlying yield when Junior liquidity is high (i.e. high coverage on Senior funds);
> * **Junior Tranche** receives outperforming APYs on the Junior Tranches, no matter what the amount of deposited liquidity on the Senior is.

The *guaranteed minimum portion*, aka the *Yield share* of the Senior Tranches, has been set to half the *Base APY* (see HC#2) when the Senior liquidity is smaller than the Junior one.

### Senior coverage and Junior overperformance

The formulas of the Senior coverage provided by the Junior counterparty and the Junior boosted yield vs the underlying return are

$$
\text{Coverage}*{Sr} = \frac{\text{Liquidity}*{Junior}}{\text{Liquidity}\_{Senior}}
$$

$$
\text{Overperformance}*{Jr} = \frac{\text{APY}*{Jr}}{\text{Base APY}}
$$

The Senior coverage should not be confused with the overall Tranche coverage that is computed in proportion to the whole tranche TVL

$$
\text{Tranche coverage} = \frac{\text{Liquidity}*{Junior}}{\text{Liquidity}*{Tranche}}
$$

### Examples

We compute the returns of the Senior and the Junior sides using the formulas listed previously, assuming

* An average underlying yield, *Base APY*, of 10%
* The total liquidity of the Tranche, *Tranche TVL*, equal to $10,000,000

**Standard case**: between 50 and 99% of the total Tranche's liquidity lying on the Senior side

| Side   | Liquidity | Expected APY |
| ------ | --------- | ------------ |
| Senior | $8m       | 8%           |
| Junior | $2m       | 18%          |

The Senior Yield share is equal to 80%.&#x20;

Senior funds coverage is 25% and the Junior overperformance vs base APY is 1.8x. The Tranche coverage is 20%.&#x20;

**Hedge case 1**: the majority of total Tranche's liquidity lying on the Senior side ($$\geq$$99%)

| Side   | Liquidity | Expected APY |
| ------ | --------- | ------------ |
| Senior | $9.9m     | 10%          |
| Junior | $100      | 20%          |

The Senior Yield share is set to 99% (HC#1).&#x20;

Senior funds coverage is 0% and the Junior overperformance vs base APY is 1.99x. The Tranche coverage is 0% as well.

**Hedge case 2**: less than half of the total Tranche's liquidity lying on the Senior side ($$\leq$$50%)

| Side   | Liquidity | Expected APY |
| ------ | --------- | ------------ |
| Senior | $4m       | 5%           |
| Junior | $6m       | 13%          |

The Senior Yield share is set to 50% (HC#2).&#x20;

Senior funds coverage is 150% and the Junior overperformance vs base APY is 1.33x. The Tranche coverage is 60%.


# Security

Products > Security


# Covered risks

Products > Yield Tranches > Covered risks

Each Yield Tranche is based on one or more yield sources, which are exposed to a set of dependencies and risks. Additionally, every YT is subject to underlying strategy and [Idle YTs infrastructure](/developers/security/audits#perpetual-yield-tranches) risks.

{% hint style="info" %}
Given the nature of the two classes of tranches, which differ in terms of risks and gains opportunities, it is possible to explain their behaviour through two scenarios: a **Yield case** and a **Loss case**. See Yield and Loss scenarios in the [Overview](/products/yield-tranches/overview) section.&#x20;
{% endhint %}

In general, Senior YTs holders always benefit from the payout priority (first in line to redeem their funds) after events that can cause *a decrease* in:

* the exchange rate between YTs-managed yield-bearing tokens'  and the underlying asset
* the exchange rate between YTs tokens and the underlying asset

{% hint style="info" %}
Examples:

* A downstream lending market suffers a loss of funds and the price of the yield-bearing tokens deployed by YTs decreases. The affected Junior and Senior YTs are automatically paused.&#x20;
* The YTs’ main contract, `idleCDO`, suffers a loss of funds, letting the attacker redeem deposited yield-bearing tokens. The price of the YT token decreases. The affected Junior and Senior YTs are manually paused.
  {% endhint %}

YTs interact with a range of DeFi primitives, each with its own specific risks. Every primitive, though, share a number of common risks:

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Smart contract</td><td>Exploit of a bug in downstream yield protocols' code</td><td>Partial loss of funds</td><td>Yes</td></tr><tr><td>Governance</td><td>Adverse changes to protocol parameter</td><td>Partial loss of funds</td><td>Yes</td></tr><tr><td>Asset de-peg</td><td>The peg of a token against another asset is lost</td><td>Reduced value against other units of account</td><td>No</td></tr></tbody></table>

A list of specific risks affecting *Automated Market Makers*, *Lending protocols*, *Liquid Staking protocols*, *Leveraged strategies* and *Options strategies* follows.

### Automated Market Makers

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Impermanent loss</td><td>Change of the token price in the underlying pool</td><td>Reduced fiat ($) value</td><td>No</td></tr></tbody></table>

### Lending Protocols&#x20;

Lending protocols are mainly classified into two categories based on the type of loans they offer: *overcollateralized* and *undercollateralized*.

#### Overcollateralized lending

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Incorrect price feed</td><td>Oracle manipulation or failure</td><td>Bad debt creation</td><td>Yes</td></tr><tr><td>Unappropiate collateral factors</td><td>Generation of untenable positions</td><td>Bad debt creation</td><td>Yes</td></tr><tr><td>Wrong liquidation</td><td>Liquidation does not work as expected</td><td>Bad debt creation</td><td>Yes</td></tr></tbody></table>

#### **Undercollateralized lending**

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Borrower default</td><td>Borrower is not able to pay back the loan and is insolvent</td><td>Partial loss of funds</td><td>Yes</td></tr></tbody></table>

### **Liquid staking protocols**

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Validator key management</td><td>Loss of multisig keys holding staked ETH</td><td>Partial loss of funds</td><td>Yes</td></tr><tr><td>Slashing</td><td>Staking penalties for validators' network</td><td>Partial loss of funds</td><td>Yes</td></tr></tbody></table>

NB - YTs do not cover Senior LPs funds in case of events leading to a de-peg.

### Leveraged strategies

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Liquidation</td><td>Liquidation of the position at loss</td><td>Partial loss of funds</td><td>Yes</td></tr></tbody></table>

<details>

<summary>Instadapp Yield Tranches</summary>

Instadapp lite vaults have automation functions, which automatically rebalance the vault during market changes. If the vault gets risky, it can first refinance into another protocol to maintain safety or deleverage by selling stETH and paying back the ETH debt. This kind of automation, if required or occurs, may incur losses caused by trading slippage:

* **If the loss is less than or equal to 0.5%**, the loss will be distributed proportionally among the funds deposited in the tranches. This usually occurs when the borrowing rate of WETH is higher than the lending rate of stETH.&#x20;
* **If the loss is between 0.5 and 5%**, the Junior tranche will absorb the entire loss and the tranche will continue to work as usual.&#x20;
* **If the loss is greater than 5%**, the automating pausing of the Tranche is triggered. Deposits and redeems are halted.

</details>

### **Options strategies**

<table><thead><tr><th>Risk</th><th width="184.0554663848362">Description</th><th width="174.06957708049114">Outcome</th><th width="150">Coverage</th></tr></thead><tbody><tr><td>Financial</td><td>The strategy generates negative returns</td><td>Partial loss of funds</td><td>Yes</td></tr></tbody></table>


# Default management policies

Products > Perpetual Yield Tranches > Security > Default management policies

Yield Tranche strategies rely on various sources of yield. These sources can come from different markets that may have established default policies. Below we summarize the Idle processes that follow the given terms and conditions set by each protocol.

### Clearpool default policy

Yield Tranches interact with the Clearpool uncollateralized markets and due to this link are subject to the [default policy](https://docs.clearpool.finance/clearpool/how-it-works/protocol/default) of Clearpool.

> Clearpool’s smart contracts have been developed to incorporate a number of safety measures which protect both borrowers and lenders during black swan events.

Clearpool’s pools have a default mechanism based on each pool **utilization rate** which forces borrowers to repay loans if the pool’s utilization rate is too high.

<table><thead><tr><th width="205">Utilization rate</th><th width="228">Pool status</th><th>Time limit</th></tr></thead><tbody><tr><td>&#x3C; 95%</td><td>Active</td><td>No time limit</td></tr><tr><td>> 95%</td><td>High utilization</td><td>Until utilization = 99% or &#x3C; 95%</td></tr><tr><td>> 99%</td><td>Warning</td><td>120 hours</td></tr></tbody></table>

Yield Tranches users can enter and exit the market anytime when the utilization rate of the underlying pool is lower than 99%. When the pool reaches 99% utilization, it enters automatically the *Warning* mode and withdrawals for both borrowers and lenders will be halted.

The pool borrower has five days to deposit more capital and return the utilization rate below 95%, if not both the borrower and the pool will enter the *Default* state.

#### Default state

When a Clearpool's pool is in *Default*, an **auction** will be triggered allowing participants to bid for the pool's cpTokens (the total debt of the pool).

Following the auction, a voting process will ensue, providing all cpToken holders with the opportunity to accept or reject the winning bid.

* If the majority vote to reject the bid, then each cpToken holder will be able to redeem their cpTokens for their proportionate share of the pool's insurance account and maintain their rights to legally pursue the defaulted borrower individually.
* If the majority vote to accept the bid, then each cpToken holder will be able to redeem their cpTokens for their proportionate share of the winning bid amount but will relinquish their rights to legally pursue the defaulted borrower to the winning bidder.

Please refer to Clearpool's [documentation](https://docs.clearpool.finance/clearpool/how-it-works/protocol/default) and its [terms and conditions](https://docs.clearpool.finance/clearpool/terms-and-conditions) for more information.

### Clearpool's Yield Tranches

In the case of a default scenario on a Clearpool's tranche, Idle will open a sub-space on [Snapshot](https://snapshot.org/#/idlefinance.eth) to gather Yield Tranches depositors' votes and will uniquely cast their preference on Clearpool.

Only depositors in the affected Clearpool pool will be able to vote in the dedicated sub-space.

* Senior depositors will be always able to share their sentiments on the bid
* Junior depositors will share their preferences depending on their weight in the tranches.\
  An automatic 30% slashing of Junior voting power will be applied in this scenario.&#x20;

| Senior weight | Junior weight | Senior voting | Junior voting |
| ------------- | ------------- | ------------- | ------------- |
| > 60%         | < 40%         | ✅             | ❌             |
| < 40%         | > 60%         | ✅             | ✅             |


# Guides

Products > Yield Tranches > Guides

In these quick guides, we will show you how to deposit assets into the Idle protocol using the **Yield Tranches.** Similarly, we will cover the withdrawal process. Jump to the section of your interest following the list of contents below:

* [Deposit funds on Yield Tranches](broken://pages/c9d9G7DfDhCjFo6sUBM7)
* [Redeem funds on Yield Tranches](broken://pages/fvPT96wPNcg3ka7sR5wz)


# Deposit funds on YTs

Products > Yield Tranches > Guides > Deposit

## **Deposit funds**

This tutorial will guide users in the process of depositing new funds in Idle through the Yield Tranches on the Ethereum mainnet.

## <mark style="color:blue;">Ethereum</mark>

The sections [Before starting](/products/best-yield/guides/deposit-funds-on-by#before-you-start) and [Connecting to the Idle dApp](/products/best-yield/guides/deposit-funds-on-by#connecting-your-wallet) under the Best Yield strategy can be helpful to have a smooth onboarding in the Idle dApp.&#x20;

{% hint style="info" %}
Using **Senior Tranches**, in case of hacks or losses, users' funds will be covered by the funds deposited in the Junior Tranche.

Using **Junior Tranches**, in case of hacks or losses, users' funds will be employed first to cover Senior depositors' funds and then shared among Junior users.
{% endhint %}

### Depositing assets

1. Choose the Yield Tranches of preference by selecting *Yield Tranches* under the *Earn* section in the top-bar, then select the *Senior* or *Junior* pool.  There are different [assets](/products/yield-tranches/overview#protocols-and-assets) available (i.e. DAI, USDC, USDT) offering different *APY*s depending on supply and demand equilibria and the tranches side chosen.&#x20;
2. The user should click on the strategy he wishes to deposit.
3. Insert the number of tokens in the right panel and click on deposit. The smart contract will automatically set the gas limit based on current data.&#x20;
   * First-time users will be asked to approve the token spending on the contract before depositing. The spending allowance can be unlimited or exact. Users can then check their spending limits on third-party tools such as [Revoke Cash](https://revoke.cash/).
   * Once the approval is confirmed, the user will be able to deposit the approved asset into the YTs of choice. He will now possess `IdleCDO_AA/BB` tokens for the asset deposited.&#x20;
   * By visiting the *Dashboard* page, the user will be able to see an overview and the performance of his deposit/s.&#x20;

{% hint style="warning" %}
Please note that the gas limit should not be decreased to ensure that the transaction does not fail and it's executed promptly.
{% endhint %}

<figure><img src="/files/BKzIAMKTGlOonYPJWfve" alt=""><figcaption><p>Yield Tranches' (Senior) assets page</p></figcaption></figure>

<figure><img src="/files/yHYg7HlgnyxP7k5qN48C" alt=""><figcaption><p>Yield Tranches stETH (Senior) page</p></figcaption></figure>

Need further help? Check further our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# Redeem funds on YTs

Products > Yield Tranches > Guides > Redeem

## <mark style="color:blue;">Ethereum</mark>

### Redeem funds

1. Visit the [Idle dApp](https://app.idle.finance/#/dashboard) and connect your wallet.
2. Go to the *Senior/Junior Tranches* page under the *Earn* section. There will be a *Deposited assets* section showing the balances deposited.&#x20;
3. Click on the token of interest.&#x20;
4. In the right panel, click on *Withdraw* and then insert the amount of token to redeem.&#x20;
5. After the Tx executes, users will see their tokenized asset balance and any redeemed governance tokens less the current performance fee.

<figure><img src="/files/bto4DQLCHxfTu3aPqd7b" alt=""><figcaption><p>Yield Tranches (Senior) stETH page</p></figcaption></figure>

Need further help? Check our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# Live YTs guides

Products > Yield Tranches > Guides > Live YTs guides


# Lido stETH

Products > Yield Tranches > Guides > Live YTs guides > Lido stETH

This tutorial will guide users in the process of depositing new funds on the Lido YTs on top of the stETH market.

To deposit into the stETH YTs, follow these two steps:

1. Use [Lido](https://stake.lido.fi/) to stake your ETH
2. Deposit Lido LP tokens in Lido's stETH YTs

## <mark style="color:blue;">Ethereum</mark>

### 1. Use Lido to stake your ETH

1. Visit [Lido.fi](<https://stake.lido.fi/ >) to stake your ETH
2. Once staked, the user will own the stETH LP tokens

![Lido staking dashboard](/files/bn8sSJtvvb9Ga8FzvaUR)

### 2. Deposit Lido LP tokens in Idle's YTs

After having staked ETH on Lido, the user can go back to Idle and enjoy the different risk-return profiles of the Yield Tranches.&#x20;

* Choose the Yield Tranches side of preference selecting either *Senior* or *Junior Tranches* under the *Earn* section in the top-bar

{% hint style="info" %}
Using **Senior Tranches**, in case of hacks or losses, users' funds will be covered by the funds deposited in the Junior Tranche.

Using **Junior Tranches**, in case of hacks or losses, users' funds will be employed first to cover Senior depositors' funds and then shared among Junior users.
{% endhint %}

1. Type in the amount to deploy on the Tranche in the right panel
2. Click on *Approve* to approve the token spend limit (1st Tx)
3. Once the spending approval is confirmed, the user will be able to deposit stETH Lido LP tokens
4. Click on *Deposit* to deposit the funds (2nd Tx)
5. The user will receive back `wstETH-LP` tokens for the asset deposited depending on the side of the PYTs chosen (AA\_wstETH-LP for Senior, BB\_wstETH-LP for Junior)


# Clearpool USDC

Products > Yield Tranches > Guides > Live YTs guides > Clearpool USDC

This tutorial will guide users in the process of depositing new funds on the Clearpool YTs on top of the USDC market.

## <mark style="color:blue;">Ethereum</mark>

### 1. Deposit USDC in Idle's Clearpool YTs

Go to [Idle Finance](https://idle.finance/#/tranches/clearpool/USDC) and enjoy the different risk-return profiles of the Yield Tranches.

* Choose the Yield Tranches of preference by selecting *Yield Tranches* under the *Earn* section in the top-bar

{% hint style="info" %}
Using **Senior Tranches**, in case of hacks or losses, users' funds will be covered by the funds deposited in the Junior Tranche.

Using **Junior Tranches**, in case of hacks or losses, users' funds will be employed first to cover Senior depositors' funds and then shared among Junior users.
{% endhint %}

1. Type in the USDC amount to deploy liquidity in the Tranche
2. Click on *Approve* to approve the token spending limit (1st Tx)
3. Once the spending approval is confirmed, the user will be able to deposit USDC
4. Click on *Deposit* to deposit the funds (2nd Tx)
5. The user will receive back `idle_cpWIN-USDC-LP` tokens for the asset deposited depending on the side of the PYTs chosen (*AA\_idle\_cpWIN-USDC* for Senior, *BB\_idle\_cpWIN-USDC* for Junior)


# FAQs

Products > Yield Tranches > FAQs

<details>

<summary>What happens in the case of a default, hack to YTs funds?</summary>

Read the[ YTs Edge Cases ](/developers/yield-tranches/edge-cases)section to learn more about default or hack scenarios and how they would be managed.

</details>

<details>

<summary>If a protocol is hacked wouldn't its underlying token be useless? How does Junior create value after an exploit?</summary>

If the attacker is able to completely drain a protocol, both Senior and Junior tranches would be affected. This event is extremely rare, as usually a hack is composed of recursive interactions that steal part of the funds. When the protocol itself is hacked, there are guardians that can pause the system and prevent further losses. Even if validators are directly hacked, it's unlikely that all the validators will suffer the same issue, just causing partial losses.

In this vision, Senior Tranche increases the security profile of the liquidity provider, adding an extra layer of protection: Junior Tranche deposits.

</details>

<details>

<summary>How is the liquidation managed in case of a default of an uncollateralized lending borrower?</summary>

YTs would follow the [Clearpool default process](https://docs.clearpool.finance/clearpool/how-it-works/protocol/default) (insurance, auction) and then redistribute $USDC reimbursed to the Tranches token holders.

There can be 2 scenarios:

* Senior tranche is fully covered and Junior tranche redeems a portion of deposited assets: Senior LPs withdraw their entire deposit; Junior LPs will proportionally redeem their funds using a redistribution contract.&#x20;
* Senior tranche redeems a portion of deposited assets and no liquidity is left on Junior tranche: Senior LPs will proportionally redeem their funds using a redistribution contract.

In the case of borrower default on Clearpool, where the NAV does not decrease, the pausing process will be the following:

* on Clearpool itself, you cannot redeem because utilization rate is 100% and the pool is locked until auction.
* the YTs is manually paused, but the underlying is already locked.
* once the USDC refund is processed by Clearpool, YTs are unpaused (according to the 2 scenarios described above).

</details>

<details>

<summary>Is there a locking period when investing in YTs?</summary>

There are **no locking periods or epochs** and users are free to enter and exit at any time. The interest earned (and governance tokens, after being partially sold in the market) will be split between the two classes using the [Adaptive Yield split](/products/yield-tranches/overview#adaptive-yield-split).

</details>

<details>

<summary>Is there any locking period for staking?</summary>

There is no lockup period for staking.

</details>

<details>

<summary>How is the APY of YTs determined?</summary>

The base APY, before being split between tranches, is provided by the underlying strategy that takes into account the reinvestment of the accrued governance tokens (except for eventual IDLE rewards). The actual APY of each tranche class is determined by the ratio between the current underlying TVL of Senior and Junior tranches (i.e. APY = share of yield allocated to senior tranches/Senior TVL). The APY has to be considered net of fees.

</details>

<details>

<summary>How are fees collected?</summary>

Fees are collected at each harvest event. When the strategy auto-reinvest accrued tokens, the **Idle protocol charges a 10-15% performance fee** (see the [Fee structure](/products/fees#perpetual-yield-tranches) section).&#x20;

</details>

<details>

<summary>What are staking rewards?</summary>

To keep a good ratio between Senior and Junior tranches and a healthy APY, part of farmed governance tokens (e.g. IDLE) are redistributed to users who stake their tranche tokens in specific tranche rewards contracts.

</details>

<details>

<summary>Can I deposit and stake both on Senior and Junior Tranches?</summary>

You can always deposit in the Tranche of your preference. Staking is avaiable only in Senior tranches. Next to Senior tranches APYs you can over the ℹ️ and see the breakdown of the APR.

</details>

<details>

<summary>YTs emergency pause is triggered manually or automatically?</summary>

As a general rule, the YTs contracts automatically detect a NAV decrease and activate on-chain the pausing feature. No need for a DAO vote or multisig tx.

</details>

<details>

<summary>What is the difference between the APY and the realized APY shown in the dashboard?</summary>

The APY displayed is a spot gross return, while the realized APY is the average return, considering the time-based dependencies. \
\
The realized APY already counts the performance fee.

</details>

Need further help? Check our [guides](/other/guides) list or get in contact on [Discord](https://discord.com/invite/mpySAJp).


# Fee structure

Products > Fee structure

Idle strategies charge a **performance fee deducted from the earned yields**.&#x20;

### Best Yield

For *Best Yield* strategies, the fees are charged at funds redeem. Accrued fees are routed to the [`FeeTreasury`](https://etherscan.io/address/0x69a62c24f16d4914a48919613e8ee330641bcb94)contract governed by IDLE token holders and to the [`Treasury League multisig`](https://etherscan.io/address/0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814).&#x20;

<table><thead><tr><th width="258.3333333333333">BY</th><th>10% performance fee</th><th>15% performance fee</th></tr></thead><tbody><tr><td>Best Yield</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td></td></tr></tbody></table>

### Yield Tranches

For the *Yield Tranches* strategies, a 10-15% performance fee is deducted from earned yield every time a YT auto-compound accrued rewards. Accrued fees are currently routed to the [`Treasury League multisig`](https://etherscan.io/address/0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814).

<table><thead><tr><th width="306.3333333333333">YTs</th><th>10% performance fee</th><th>15% performance fee</th></tr></thead><tbody><tr><td><strong>Lido</strong>: stETH</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td></td></tr><tr><td><strong>Lido</strong>: stMATIC</td><td></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><strong>Instadapp</strong>: stETH</td><td></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><strong>Morpho</strong>: DAI, USDC, USDT, WETH</td><td></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><strong>Clearpool</strong>: USDC, DAI, USDT</td><td></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td><strong>Amphor</strong>: wstETH</td><td></td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr></tbody></table>

{% hint style="info" %}
Performance Fees are computed by difference using the average `IdleToken` or `IdleCDO`price paid by the user for all their deposits and the current `IdleToken` or `IdleCDO`price. All transfer methods (`tranfer` and `transferFrom`) of IdleToken will also transfer the eventual fee debt to the receiver.
{% endhint %}

## Product suite revenue

The revenue breakdown is available on Dune Analytics.&#x20;

{% embed url="<https://dune.com/idle.finance/revenue-outlook>" %}

The [Performance Reports](/governance/idle-dao/treasury/reports) published at every mandate's end summarize the overall financial health of the Idle DAO treasury and the performances of the Idle's strategies.

{% content-ref url="/pages/U63JKprkEKscCvuMTQRw" %}
[Reports](/governance/idle-dao/treasury/reports)
{% endcontent-ref %}


# Get involved

Products > Get involved

Idle DAO offers a comprehensive product suite for yield optimization and risk diversification, managing assets across the entire DeFi yield spectrum – from lending protocols to credit markets, liquid staking tokens, and structured strategies – to help deliver better outcomes, convenience, value, and transparency for our users.

{% hint style="info" %}
Our product suite is and always will be permissionless and accessible to everyone in the blockchain, there are, though, two programs specifically designed for DeFi protocols and big liquidity providers. Discover more, below!
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><strong>DeFi Integrators</strong> --></td><td></td><td></td><td></td><td></td></tr><tr><td><strong>Onboarding form</strong></td><td></td><td></td><td><a href="https://idlefinance.typeform.com/to/PUC7nO">https://idlefinance.typeform.com/to/PUC7nO</a></td><td><a href="/files/Mfx5W5bIdySrtlf6om2h">/files/Mfx5W5bIdySrtlf6om2h</a></td></tr><tr><td><strong>Program details</strong></td><td></td><td></td><td><a href="/pages/n4ssKcOWM0sooQoWpR5n">/pages/n4ssKcOWM0sooQoWpR5n</a></td><td><a href="/files/Mfx5W5bIdySrtlf6om2h">/files/Mfx5W5bIdySrtlf6om2h</a></td></tr><tr><td><strong>DeFi Institutions</strong> --></td><td></td><td></td><td></td><td></td></tr><tr><td><strong>Onboarding form</strong></td><td></td><td></td><td><a href="https://idlefinance.typeform.com/to/Bumd4UjV">https://idlefinance.typeform.com/to/Bumd4UjV</a></td><td><a href="/files/NnenTmEQ1Aqo52MqTXp8">/files/NnenTmEQ1Aqo52MqTXp8</a></td></tr><tr><td><strong>Program details</strong></td><td></td><td></td><td><a href="/pages/ISp4ZWWXoIggux75zLzJ">/pages/ISp4ZWWXoIggux75zLzJ</a></td><td><a href="/files/NnenTmEQ1Aqo52MqTXp8">/files/NnenTmEQ1Aqo52MqTXp8</a></td></tr></tbody></table>


# Integrators program

Products > Integrators program

<figure><img src="/files/V4v8l8lB3xL7CHo7PlQW" alt=""><figcaption></figcaption></figure>

The **Integrators program** allows DeFi protocols to efficiently integrate the Idle product suite into their services and workflow. Any partners that integrate Idle products can earn up to a <mark style="color:blue;">**50% profit share**</mark> from the contributed TVL originating from dApps, wallets, or payment gateways.

{% hint style="info" %}
We'd love to hear from you if you are interested in partnering with us! \
Please reach out to us by filling out the [Integrator program form](https://idlefinance.typeform.com/to/PUC7nO).
{% endhint %}

### Programs details

Best Yield vaults and Yield Tranches are deployed on the Ethereum and the Polygon chain. The program is then available on both chains.&#x20;

The [Treasury League](/governance/idle-dao/idle-leagues/treasury-league) periodically executes reward transfers, which an automated on-chain fee-sharing mechanism will then replace.

{% tabs %}
{% tab title="Tiers" %}
These tiers of fee sharing apply to all the active Integrators partner programs.

<table><thead><tr><th data-type="number">Tier</th><th align="right">Partner's TVL</th><th align="right">Fee share</th></tr></thead><tbody><tr><td>1</td><td align="right">$1 - 5m</td><td align="right">10%</td></tr><tr><td>2</td><td align="right">$5 - 10m</td><td align="right">15%</td></tr><tr><td>3</td><td align="right">$10 - 50m</td><td align="right">20%</td></tr><tr><td>4</td><td align="right">$50 - 100m</td><td align="right">25%</td></tr><tr><td>5</td><td align="right">$100 - 200m</td><td align="right">30%</td></tr><tr><td>6</td><td align="right">$200 - 400m</td><td align="right">35%</td></tr><tr><td>7</td><td align="right">$400 - 700m</td><td align="right">40%</td></tr><tr><td>8</td><td align="right">$700m - 1b</td><td align="right">45%</td></tr><tr><td>9</td><td align="right">> $1b</td><td align="right">50%</td></tr></tbody></table>
{% endtab %}

{% tab title="Ethereum" %}
The Ethereum program distributes the rewards on a monthly basis through a [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract) available under the [Tool section of the legacy app](https://legacy.idle.finance/#/tools/b2b-vesting-contract). Tokens are vested on a linear basis over a 3-month period.&#x20;

The minimum threshold to distribute the rewards is 500 IDLE.

* Product: Best Yield vaults and Yield Tranches
* Rewards: IDLE
* Frequency: monthly
* Distribution: [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract) with a 3-month length

Integrators can use the following Dune dashboards to track the program's rewards.

{% embed url="<https://dune.com/idle.finance/ipp-ethereum>" %}
{% endtab %}

{% tab title="Polygon" %}
The Polygon *zkEVM* program distributes rewards on a weekly basis to the partner's wallet address.

The minimum threshold to distribute the rewards is 100 MATIC.

* Product: Yield Tranches
* Rewards: MATIC
* Frequency: weekly
* Distribution: direct transfer to partner's wallet

Integrators can use the following Dune dashboards to track the program's rewards.

{% embed url="<https://dune.com/idle.finance/integration-partners-program-polygon>" %}
{% endtab %}

{% tab title="Optimism" %}
The *Optimism* program distributes rewards on a weekly basis to the partner's wallet address.

The minimum threshold to distribute the rewards is 100 MATIC.

* Product: Yield Tranches
* Rewards: OP
* Frequency: weekly
* Distribution: direct transfer to partner's wallet
  {% endtab %}
  {% endtabs %}

<details>

<summary>How to integrate</summary>

As an integrator partner, the methods you should look for are

#### **Best Yield**

* [<mark style="color:blue;">`mintIdleToken`</mark>](/developers/best-yield/methods/mintidletoken) method, where you should add the Ethereum or Polygon <mark style="color:blue;">`_referral`</mark> address

#### **Yield Tranches**

* [`depositAARef`](/developers/yield-tranches/methods/depositaaref) or [`depositBBRef`](/developers/yield-tranches/methods/depositbbref) methods depending on which side of the tranche you want to integrate, Senior (AA) or Junior (BB).&#x20;

The [Best Yield](/developers/best-yield) and the [Yield Tranches](/developers/yield-tranches) sections under the Developers chapter provide more technical and detailed information regarding the strategies.

</details>

<details>

<summary>Benefits</summary>

Idle is a battle-tested protocol since 2019 with a strong focus on protocol safety and the continuous development of its products suite. Starting a partnership with Idle would bring to the partner value, a solid reputation from the DeFi industry and would open the door to effortless financial autonomy opportunities.

**Best Yield**

* Get access to a seamless yield generation from multiple underlying sources with just one integration
* Optimize capital allocation in the best-performing strategies
* Deposit single-sided assets, with no impermanent loss
* Save money, with Idle subsidizing rebalance's fees
* Save time, with Idle taking care of underlying codebase upgrades

**Yield Tranches**

* Get access to risk-adjusted profiles to accommodate a wider audience, introducing coverage features and yield boosts
* Simplify integration, as Idle strategies are compatible with the ERC-4626 standard
* Increase returns thanks to periodic compounding
* Do not lock your users' funds, as YTs have no locking periods or epochs

</details>

<details>

<summary>Current integrators</summary>

Multiple partners have integrated either the Best Yield strategies or the Yield Tranches. \
A list of current on-top integrators follows.

**Best Yield**

* [ShapeShift](https://shapeshift.com/)
* [Spool](https://www.spool.fi/)
* [Enzyme](https://enzyme.finance/)
* [Yearn](https://yearn.finance/)
* [Harvest](https://harvest.finance/)
* [Balancer](https://balancer.fi/)

**Yield Tranches**

* [ShapeShift](https://shapeshift.com/)
* [Swissborg](https://swissborg.com/)
* [Spool](https://www.spool.fi/)
* [Harvest](https://harvest.finance/)
* [Sense](https://sense.finance/)
* [Clearpool](https://clearpool.finance/)
* [Popcorn](https://pop.network/)

</details>

<details>

<summary>FAQs</summary>

* **How do I earn fees?**\
  Include your wallet address as part of the deposit transaction data. More information regarding the input parameters of the deposit method can be found in the BY and YTs methods sections in the [Developers](/developers/introduction) chapter.
* **When do you share fees?**\
  Leagues process the IDLE distribution towards the vesting contracts on a monthly basis on Ethereum. The MATIC distribution on Polygon is done on a weekly basis.
* **Should I claim the tokens?**\
  The Ethereum fees should be claimed in the [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract). The Polygon fees instead are sent to the referral address attached to deposits, no need to claim it.
* **Do I lose the rewards if I do not reach the minimum threshold?**\
  Accrued fees that do not reach the minimum threshold are recorded in Dune's dashboards. Once rewards reach the distribution threshold, the fee-sharing payments are executed.
* **How is the fee sharing calculated?**\
  Let's see a practical example.\
  For the first 30 days, the Partner's TVL deposited is $90m, enabling him to receive a 25% fee-share. Ten days after the first sharing event, its TVL is worth $200m and holds the same value for the remaining 20 days of the second month. The time-weighted TVL for this 30-day timeframe would be worth $163M, letting him access Tier 5, i.e. 30% fee-share.&#x20;

</details>


# Institutions program

Products > Institutions program

<figure><img src="/files/2vOcAXjgyzN3S3vfRMcO" alt=""><figcaption></figcaption></figure>

The **Institutions program** is suited for liquidity providers that deposit in size, i.e. >$500k, into Idle's strategies. Any depositors that embed their wallet address can earn up to a <mark style="color:blue;">**50% profit share**</mark> from the contributed TVL.

{% hint style="info" %}
We'd love to hear from you if you are interested in partnering with us! \
Reach out to us by filling out the [Institutions program form](https://idlefinance.typeform.com/to/Bumd4UjV).
{% endhint %}

### Program details

Best Yield vaults and Yield Tranches are deployed on the Ethereum and the Polygon chain. The program is then available on both chains.&#x20;

The [Treasury League](/governance/idle-dao/idle-leagues/treasury-league) periodically executes reward transfers, which an automated on-chain fee-sharing mechanism will then replace.

{% tabs %}
{% tab title="Tiers" %}
These tiers of fee sharing apply to all the active Integrators partner programs.

<table><thead><tr><th data-type="number">Tier</th><th align="right">Partner's TVL</th><th align="right">Fee share</th></tr></thead><tbody><tr><td>1</td><td align="right">$1 - 5m</td><td align="right">10%</td></tr><tr><td>2</td><td align="right">$5 - 10m</td><td align="right">15%</td></tr><tr><td>3</td><td align="right">$10 - 50m</td><td align="right">20%</td></tr><tr><td>4</td><td align="right">$50 - 100m</td><td align="right">25%</td></tr><tr><td>5</td><td align="right">$100 - 200m</td><td align="right">30%</td></tr><tr><td>6</td><td align="right">$200 - 400m</td><td align="right">35%</td></tr><tr><td>7</td><td align="right">$400 - 700m</td><td align="right">40%</td></tr><tr><td>8</td><td align="right">$700m - 1b</td><td align="right">45%</td></tr><tr><td>9</td><td align="right">> $1b</td><td align="right">50%</td></tr></tbody></table>
{% endtab %}

{% tab title="Ethereum" %}
The Ethereum program distributes the rewards on a monthly basis through a [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract) available under the [Tool section of the legacy app](https://legacy.idle.finance/#/tools/b2b-vesting-contract). Tokens are vested on a linear basis over a 3-month period.&#x20;

The minimum threshold to distribute the rewards is 500 IDLE.

* Product: Best Yield vaults and Yield Tranches
* Rewards: IDLE
* Frequency: monthly
* Distribution: [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract) with a 3-month length

Integrators can use the following Dune dashboards to track the program's rewards.

{% embed url="<https://dune.com/idle.finance/ipp-ethereum>" %}
{% endtab %}

{% tab title="Polygon" %}
The Polygon *zkEVM* program distributes rewards on a weekly basis to the partner's wallet address.

The minimum threshold to distribute the rewards is 100 MATIC.

* Product: Yield Tranches
* Rewards: MATIC
* Frequency: weekly
* Distribution: direct transfer to partner's wallet

Integrators can use the following Dune dashboards to track the program's rewards.

{% embed url="<https://dune.com/idle.finance/integration-partners-program-polygon>" %}
{% endtab %}
{% endtabs %}

<details>

<summary>How to join to program</summary>

#### **Best Yield**

Please append your address in the Idle's pool URL as a referral during the deposit process `?_referral=ADDRESS` or use the function [`mintIdleToken`](/developers/best-yield/methods/mintidletoken) adding as a `_referral` your address.&#x20;

*Example* `app.idle.finance/#/earn/protected-yield/0x3eb6318b8d9f362a0e1d99f6032edb1c4c602500?_referral=ADDRESS`

#### **Yield Tranches**

Please append your address in the Idle's pool URL as a referral during the deposit process `?_referral=ADDRESS`  or use the functions [`depositAARef`](/developers/yield-tranches/methods/depositaaref), [`depositBBRef`](/developers/yield-tranches/methods/depositbbref) depending on your interest in depositing into the Senior (AA) or the Junior (BB) side.&#x20;

*Example* `app.idle.finance/#/earn/protected-yield/0x3eb6318b8d9f362a0e1d99f6032edb1c4c602500?_referral=ADDRESS`

The [Best Yield](/developers/best-yield) and the [Yield Tranches](/developers/yield-tranches) sections under the Developers chapter provide more technical and detailed information regarding the strategies.

</details>

<details>

<summary>Benefits</summary>

Idle is a battle-tested protocol since 2019 with a strong focus on protocol safety and the continuous development of its products suite.

**Best Yield**

* Get access to a seamless yield generation from multiple underlying sources with just one deposit, on autopilot
* Optimize capital allocation in the best-performing strategies
* Deposit single-sided assets, with no impermanent loss
* Save money, with Idle subsidizing rebalance's fees
* Redeem funds anytime, as BYs have no locking periods or epochs

**Yield Tranches**

* Get access to risk-adjusted profiles benefitting from coverage features via Senior or boosted yields via Junior
* Increase returns thanks to periodic compounding and avoid losing money during swaps due to sandwich attacks
* Simplify taxation and asset reporting by managing only one LP token
* Redeem funds anytime, as YTs have no locking periods or epochs

</details>

<details>

<summary>FAQs</summary>

* **How do I earn fees?**\
  Include your wallet address as part of the deposit transaction data. More information regarding the input parameters of the deposit method can be found in the BY and YTs methods sections in the [Developers](/developers/introduction) chapter.
* **When do you share fees?**\
  Leagues process the IDLE distribution towards the vesting contracts on a monthly basis on Ethereum. The MATIC distribution on Polygon is done on a weekly basis.
* **Should I claim the tokens?**\
  The Ethereum fees should be claimed in the [vesting contract](https://legacy.idle.finance/#/tools/b2b-vesting-contract). The Polygon fees instead are sent to the referral address attached to deposits, no need to claim it.
* **Do I lose the rewards if I do not reach the minimum threshold?**\
  Accrued fees that do not reach the minimum threshold are recorded in Dune's dashboards. Once rewards reach the distribution threshold, the fee-sharing payments are executed.
* **How is the fee sharing calculated?**\
  Let's see a practical example\
  For the first 30 days, the Partner's TVL deposited is $90m, enabling him to receive a 25% fee-share. Ten days after the first sharing event, its TVL is worth $200m and holds the same value for the remaining 20 days of the second month. The time-weighted TVL for this 30-day timeframe would be worth $163M, letting him access Tier 5, i.e. 30% fee-share.&#x20;

</details>


# Introduction

Developers > Introduction

<figure><img src="/files/SNrwV8g01GQ5lcznLFfJ" alt=""><figcaption></figcaption></figure>

The Developers chapter presents technical information about Idle protocols (Best Yield and Yield Tranches), as well as details about Idle [fees](/products/fees) and [security](broken://pages/OP1TNhXRAMlOBYYBfx37).

All the key initiatives concerning the Idle codebase are available on the [Idle Labs GitHub ](https://github.com/idle-labs)and [Idle DAO Github](https://github.com/Idle-Finance).

{% embed url="<https://github.com/idle-labs>" %}

{% embed url="<https://github.com/Idle-Finance>" %}

## Developers index

There are four main sections in the Developers chapter:

{% content-ref url="/pages/-Lw-vVLnkjJDBkgOTeu2" %}
[Networks and codebase](/developers/networks-and-codebase)
{% endcontent-ref %}

With a focus on all the Idle smart contracts links on-chain.

{% content-ref url="/pages/OXT1gi7g0hXsZlwCJbiJ" %}
[Best Yield](/developers/best-yield)
{% endcontent-ref %}

With a focus on the codebase behind the Best Yield protocol, such as [architecture](/developers/best-yield/architecture), [interface](/developers/best-yield/interface) and [methods](/developers/best-yield/methods).

{% content-ref url="/pages/-MizswprzJbOSti3lgHh" %}
[Yield Tranches](/developers/yield-tranches)
{% endcontent-ref %}

With a focus on the codebase behind the Yield Tranches protocol, such as [architecture](/developers/best-yield/architecture), [interface](/developers/yield-tranches/methods) and [methods](/developers/yield-tranches/methods).

{% content-ref url="/pages/NprPIb1ysJXZHPKZJiXz" %}
[Security](/developers/security)
{% endcontent-ref %}

Describing Idle's smart contracts [audits](/developers/security/audits) and its [bug bounty](/developers/security/bug-bounty) initiatives.


# Networks and codebase

Developers > Networks and codebase

The following sections list the governance contracts divided by blockchain networks

{% content-ref url="/pages/iJxT6RPxUJYHooPX9Iu1" %}
[Ethereum mainnet](/developers/networks-and-codebase/ethereum-mainnet)
{% endcontent-ref %}

{% content-ref url="/pages/bk33rtV3bp0ISqEqGAta" %}
[Polygon](/developers/networks-and-codebase/polygon)
{% endcontent-ref %}

{% content-ref url="/pages/JJRq8wJpDdgUT6IWN8Wo" %}
[Kovan testnet](/developers/networks-and-codebase/kovan-testnet)
{% endcontent-ref %}

All Idle contracts are verified on Etherscan and for your convenience, you can also find the source code of the codebase on GitHub [here](https://github.com/Idle-Labs/idle-contracts) for the IdleTokens contracts and [here](https://github.com/Idle-Labs/idle-governance) for the governance.

If you are looking for previous versions of the Idle protocol, check the [old contracts](/other/archive/old-contracts) section.

Please refer to the *deployed contracts* section under each product to get the pool addresses.


# Ethereum mainnet

Developers > Networks and codebase > Ethereum

You can find the currently deployed instances and ABIs of the product suite (linked below) and governance contracts (listed below) at the following addresses.

### [Best Yield](/developers/best-yield/deployed-contracts#best-yield-strategy-v4)

### [Yield Tranches](/developers/yield-tranches/deployed-contracts#perpetual-yield-tranches)

### Governance

The Idle Governance ABI can be found here: [JSON](https://github.com/Idle-Labs/idle-governance/tree/develop/abi).

<table><thead><tr><th width="283.40328368406045">Contract</th><th>Address</th></tr></thead><tbody><tr><td>IDLE</td><td><a href="http://etherscan.io/address/0x875773784Af8135eA0ef43b5a374AaD105c5D39e">0x875773784Af8135eA0ef43b5a374AaD105c5D39e</a></td></tr><tr><td>stkIDLE</td><td><a href="https://etherscan.io/address/0xaAC13a116eA7016689993193FcE4BadC8038136f">0xaAC13a116eA7016689993193FcE4BadC8038136f</a></td></tr><tr><td>Governor Alpha</td><td><a href="http://etherscan.io/address/0x2256b25CFC8E35c3135664FD03E77595042fe31B">0x2256b25CFC8E35c3135664FD03E77595042fe31B</a></td></tr><tr><td>Governor Bravo</td><td><a href="https://etherscan.io/address/0x3D5Fc645320be0A085A32885F078F7121e5E5375">0x3D5Fc645320be0A085A32885F078F7121e5E5375</a></td></tr><tr><td>Timelock</td><td><a href="http://etherscan.io/address/0xD6dABBc2b275114a2366555d6C481EF08FDC2556">0xD6dABBc2b275114a2366555d6C481EF08FDC2556</a></td></tr><tr><td>Rebalancer</td><td><a href="https://etherscan.io/address/0xB3C8e5534F0063545CBbb7Ce86854Bf42dB8872B">0xB3C8e5534F0063545CBbb7Ce86854Bf42dB8872B</a></td></tr><tr><td>Idle Controller</td><td><a href="http://etherscan.io/address/0x275DA8e61ea8E02d51EDd8d0DC5c0E62b4CDB0BE">0x275DA8e61ea8E02d51EDd8d0DC5c0E62b4CDB0BE</a></td></tr><tr><td>Early Rewards</td><td><a href="http://etherscan.io/address/0xa1F71ED24ABA6c8Da8ca8C046bBc9804625d88Fc">0xa1F71ED24ABA6c8Da8ca8C046bBc9804625d88Fc</a></td></tr><tr><td>Price Oracle (IIP-13)</td><td><a href="https://etherscan.io/address/0x758C10272A15f0E9D50Cbc035ff9a046945da0F2">0x758C10272A15f0E9D50Cbc035ff9a046945da0F2</a></td></tr><tr><td>Fee Treasury</td><td><a href="http://etherscan.io/address/0x69a62C24F16d4914a48919613e8eE330641Bcb94">0x69a62C24F16d4914a48919613e8eE330641Bcb94</a></td></tr><tr><td>Long LP Fund</td><td><a href="http://etherscan.io/address/0x107A369bc066c77FF061c7d2420618a6ce31B925">0x107A369bc066c77FF061c7d2420618a6ce31B925</a></td></tr><tr><td>Ecosystem Fund</td><td><a href="http://etherscan.io/address/0xb0aA1f98523Ec15932dd5fAAC5d86e57115571C7">0xb0aA1f98523Ec15932dd5fAAC5d86e57115571C7</a></td></tr><tr><td>Reservoir</td><td><a href="http://etherscan.io/address/0x031f71B5369c251a6544c41CE059e6b3d61e42C6">0x031f71B5369c251a6544c41CE059e6b3d61e42C6</a></td></tr><tr><td>VesterFactory</td><td><a href="https://etherscan.io/address/0xbF875f2C6e4Cc1688dfe4ECf79583193B6089972">0xbF875f2C6e4Cc1688dfe4ECf79583193B6089972</a></td></tr><tr><td>LockedIDLE*</td><td><a href="https://etherscan.io/address/0xF241a0151841AE2E6ea750D50C5794b5EDC31D99">0xF241a0151841AE2E6ea750D50C5794b5EDC31D99</a></td></tr></tbody></table>

**\***&#x75;sed to allow investors and team members to vote on snapshot polls. Team members are limited to 1/10th of the voting power.

### Governance Multisigs

<table><thead><tr><th width="284.64753749566734">Contract</th><th>Address</th></tr></thead><tbody><tr><td>Treasury League multisig</td><td><a href="https://etherscan.io/address/0xfb3bd022d5dacf95ee28a6b07825d4ff9c5b3814">0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814</a></td></tr><tr><td>Development League multisig</td><td><a href="https://etherscan.io/address/0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b">0xe8eA8bAE250028a8709A3</a><a href="https://etherscan.io/address/0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b">841E0Ae1a44820d677b</a></td></tr><tr><td>stkIDLE voting power multisig</td><td><a href="https://etherscan.io/address/0xb08696Efcf019A6128ED96067b55dD7D0aB23CE4">0xb08696Efcf019A6128ED96067b55dD7D0aB23CE4</a></td></tr></tbody></table>

### IIPs deployed contracts

<table><thead><tr><th width="295.11501981083035">Contract</th><th width="118.99640010285418">ABI</th><th>Address</th></tr></thead><tbody><tr><td>FeeCollector (IIP-2)</td><td><a href="https://github.com/AsafSilman/idle-smart-treasury/tree/main/contracts">JSON</a></td><td><a href="https://etherscan.io/address/0xBecC659Bfc6EDcA552fa1A67451cC6b38a0108E4">0xBecC659Bfc6EDcA552fa1A67451cC6b38a0108E4</a></td></tr><tr><td>Smart Treasury (IIP-2) [Deprecated]</td><td><a href="https://docs.balancer.finance/smart-contracts/interfaces">JSON</a></td><td><a href="https://etherscan.io/address/0x859e4d219e83204a2ea389dac11048cc880b6aa8">0x859e4d219e83204a2ea389dac11048cc880b6aa8</a></td></tr><tr><td>Smart Treasury bPool (IIP-2) [Deprecated]</td><td><a href="https://docs.balancer.finance/smart-contracts/interfaces">JSON</a></td><td><a href="https://etherscan.io/address/0xcaf467dfe064a1f54e4ece8515ddf326b9be801e">0xcaf467dfe064a1f54e4ece8515ddf326b9be801e</a></td></tr><tr><td>Geyser Sushi LP Staking (IIP-6)</td><td><a href="https://github.com/Idle-Finance/idle-geyser/blob/master/contracts/TokenGeyser.sol">JSON</a></td><td><a href="https://etherscan.io/address/0xcc0b9f7ed0e6bc7c2e69dbd247e8420f29aeb48d">0xcc0b9f7ed0e6bc7c2e69dbd247e8420f29aeb48d</a></td></tr><tr><td>wIDLESushiLP Wrapper (IIP-6)</td><td><a href="https://github.com/Idle-Finance/idle-geyser/blob/master/contracts/TokenGeyser.sol">JSON</a></td><td><a href="https://etherscan.io/address/0x076ff8E6402B02855ff82119B53E59bbDd67f0Ee">ff8E6402B02855ff82119B53E59bbDd67f0Ee</a></td></tr><tr><td>stkIDLE (IIP-10)</td><td><a href="https://github.com/Idle-Finance/idle-staking">LINK</a></td><td><a href="https://etherscan.io/address/0xaac13a116ea7016689993193fce4badc8038136f">0xaac13a116ea7016689993193fce4badc8038136f</a></td></tr><tr><td>Staking fee distributor (IIP-10)</td><td><a href="https://github.com/Idle-Finance/idle-staking">LINK</a></td><td><a href="https://etherscan.io/address/0xbabb82456c013fd7e3f25857e0729de8207f80e2">0xbabb82456c013fd7e3f25857e0729de8207f80e2</a></td></tr><tr><td>Staking fee swapper (IIP-10)</td><td><a href="https://github.com/Idle-Finance/idle-staking">LINK</a></td><td><a href="https://etherscan.io/address/0x1594375eee2481ca5c1d2f6ce15034816794e8a3">0x1594375eee2481ca5c1d2f6ce15034816794e8a3</a></td></tr><tr><td>Governor Bravo (IIP-18)</td><td><a href="https://github.com/Idle-Labs/idle-governance/blob/develop/contracts/GovernorBravoDelegate.sol">LINK</a></td><td><a href="https://etherscan.io/address/0x3D5Fc645320be0A085A32885F078F7121e5E5375">0x3D5Fc645320be0A085A32885F078F7121e5E5375</a></td></tr></tbody></table>

### Utilities

<table><thead><tr><th width="301.00528815150136">Contract</th><th width="118.89362362984869">ABI</th><th>Address</th></tr></thead><tbody><tr><td>IdleBatchedMint DAI</td><td><a href="http://api.etherscan.io/api?module=contract&#x26;action=getabi&#x26;address=0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5&#x26;format=raw">JSON</a></td><td><a href="http://etherscan.io/address/0x633fb4d38B24dC890b11Db2AE2B248D13F996A79">0x633fb4d38B24dC890b11Db2AE2B248D13F996A79</a></td></tr><tr><td>IdleBatchedMint USDC</td><td><a href="http://api.etherscan.io/api?module=contract&#x26;action=getabi&#x26;address=0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5&#x26;format=raw">JSON</a></td><td><a href="https://etherscan.io/address/0x562c4fd96f0652f5fcfa96b0a33088b5a6eaee9b">0x562C4fd96F0652F5Fcfa96b0a33088B5a6eAeE9B</a></td></tr><tr><td>IdlePriceHelper</td><td><a href="https://github.com/emilianobonassi/idle-token-helper">JSON</a></td><td><a href="https://etherscan.io/address/0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5">0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5</a></td></tr></tbody></table>


# Polygon

Developers > Networks and codebase > Polygon

You can find the currently deployed instances and ABIs of the product suite and governance contracts at the following addresses.

### Governance

<table><thead><tr><th width="265">Contract</th><th>Address</th></tr></thead><tbody><tr><td>Treasury League multisig</td><td><a href="https://polygonscan.com/address/0x61A944Ca131Ab78B23c8449e0A2eF935981D5cF6">0x61A944Ca131Ab78B23c8449e0A2eF935981D5cF6</a></td></tr><tr><td>Fees receiver</td><td><a href="https://polygonscan.com/address/0x1d60E17723f8Ca1F76F09126242AcD37a278b514">0x1d60E17723f8Ca1F76F09126242AcD37a278b514</a></td></tr></tbody></table>

### Utilities

<table><thead><tr><th width="268">Contract</th><th width="122.33333333333331">ABI</th><th>Address</th></tr></thead><tbody><tr><td>PriceOracleV3</td><td><a href="https://github.com/Idle-Labs/idle-governance/blob/develop/contracts/PriceOracleV3.sol">JSON</a></td><td><a href="https://polygonscan.com/address/0x12271d4Ba175F20Dd673218E780426158D0b0f07">0x12271d4Ba175F20Dd673218E780426158D0b0f07</a></td></tr><tr><td>IDLESushiLP Wrapper</td><td><a href="https://github.com/Idle-Finance/idle-geyser/blob/master/contracts/MasterChefTokenizerPolygon.sol">JSON</a></td><td><a href="https://polygonscan.com/address/0x0ac74Fe6f3C9123254418EEfcE37E4f7271a2b72">0x0ac74Fe6f3C9123254418EEfcE37E4f7271a2b72</a></td></tr><tr><td>Geyser Sushi LP Staking</td><td><a href="https://github.com/Idle-Finance/idle-geyser/blob/master/contracts/TokenGeyserPolygon.sol">JSON</a></td><td><a href="https://polygonscan.com/address/0x59CDF902b6A964CD5dB04d28f12b774bFB876Be9">0x59CDF902b6A964CD5dB04d28f12b774bFB876Be9</a></td></tr></tbody></table>


# Kovan testnet

Developers > Networks and codebase > Kovan

### C**ore contracts**

The core contracts ABI can be found here: [JSON](https://github.com/Idle-Labs/idle-contracts/tree/develop/abi).

{% hint style="info" %}
No Idle strategies' rebalances happen in Kovan.
{% endhint %}

<table><thead><tr><th width="288">Contract</th><th>Address</th></tr></thead><tbody><tr><td>IdleDAI</td><td><a href="https://kovan.etherscan.io/address/0x295CA5bC5153698162dDbcE5dF50E436a58BA21e">0x295CA5bC5153698162dDbcE5dF50E436a58BA21e</a></td></tr><tr><td>IdleUSDC</td><td><a href="https://kovan.etherscan.io/address/0x0de23D3bc385a74E2196cfE827C8a640B8774B9f">0x0de23D3bc385a74E2196cfE827C8a640B8774B9f</a></td></tr><tr><td>IDLE</td><td><a href="http://kovan.etherscan.io/address/0xAB6Bdb5CCF38ECDa7A92d04E86f7c53Eb72833dF">0xAB6Bdb5CCF38ECDa7A92d04E86f7c53Eb72833dF</a></td></tr><tr><td>GovernorAlpha</td><td><a href="http://kovan.etherscan.io/address/0x782cB1dbd0bD4df95c2497819be3984EeA5c2c25">0x782cB1dbd0bD4df95c2497819be3984EeA5c2c25</a></td></tr><tr><td>Timelock</td><td><a href="http://kovan.etherscan.io/address/0xfD88D7E737a06Aa9c62B950C1cB5eE63DA379AFd">0xfD88D7E737a06Aa9c62B950C1cB5eE63DA379AFd</a></td></tr><tr><td>IdleController</td><td><a href="https://kovan.etherscan.io/address/0x8Ad5F0644b17208c81bA5BDBe689c9bcc7143d87">0x8Ad5F0644b17208c81bA5BDBe689c9bcc7143d87</a></td></tr></tbody></table>


# ERC-4626 standard

Developers > Network and codebase > ERC-4626

### What is the ERC-4626 standard?

The [ERC-4626](https://eips.ethereum.org/EIPS/eip-4626) is a standard interface for yield-bearing tokens.&#x20;

> *The ERC-4626 is a standard to optimize and unify the technical parameters of yield-bearing vaults. It provides a standard API for tokenized yield-bearing vaults that represent shares of a single underlying ERC-20 token. ERC-4626 also outlines an optional extension for tokenized vaults utilizing ERC-20, offering basic functionality for depositing, withdrawing tokens and reading balances* - [Ethereum.org](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626/)

### Why is the ERC-4626 compatibility needed?

Tokenized vaults have a lack of standardization leading to diverse implementation details. Some examples include lending markets, aggregators, and intrinsically interest-bearing tokens. This makes integration difficult at the aggregator or plugin layer for protocols conforming to multiple standards, forcing each protocol to implement its error-prone adapters.

A standard for tokenized vaults will lower the integration effort for yield-bearing vaults while creating more consistent and robust implementation patterns enhancing the DeFi composability capacity. This standard will also reduce the cost of audits to secure their adapters from vulnerabilities.

#### Specs

All ERC-4626 tokenized vaults must implement ERC-20 to represent shares. If a vault is to be non-transferrable, it may revert on calls to `transfer` or `transferFrom`. The ERC-20 operations `balanceOf`, `transfer`, `totalSupply`, etc. operate on the Vault “shares” which represent a claim to ownership on a fraction of the Vault’s underlying holdings.

All ERC-4626 tokenized Vaults must implement ERC-20’s optional metadata extensions. The `name` and `symbol` functions should reflect the underlying token’s `name` and `symbol` in some way.

#### Backward Compatibility <a href="#backwards-compatibility" id="backwards-compatibility"></a>

[EIP-4626](https://github.com/ethereum/EIPs/pull/4626) is fully backward compatible with the ERC-20 standard and has no known compatibility issues with other standards. For production implementations of vaults that do not use ERC-4626, wrapper adapters can be developed and used.

### ERC-4626 compliant contracts

All deployed Best Yield strategies ERC-4626 wrappers can be found [here](/developers/best-yield/deployed-contracts#erc-4626-wrappers-for-best-yield-tokens).

All deployed Yield Tranches ERC-4626 wrappers can be found [here.](/developers/yield-tranches/deployed-contracts#erc-4626-wrappers-for-tranche-tokens)


# Best Yield

Developers > Best Yield

&#x20;


# Architecture

Developers > Best Yield > Architecture

The main smart contracts used by Idle are the following:

* `IdleToken` holds pooled funds of all users for a specific asset and issues ERC20 shares of the pool (IdleTokens) for each deposit.
* `IdleCompound`, `IdleAave` wrappers contract used by `IdleToken` to interact with the lending protocols implemented

<figure><img src="/files/ceofdbn6nod57jCJbY4g" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
BY strategies are also ERC-4626 compliant! Deployed wrappers can be found [here](/developers/best-yield/deployed-contracts#erc-4626-wrappers-for-best-yield-tokens).
{% endhint %}

Idle Rebalancer automatically analyses supply rate functions across integrated protocols and total funds in the pool to constantly rebalance capital across any number of protocols to **earn the highest interest rate possible** with very high precision. When a new allocation can improve the aggregated APY of an IdleTokens, the Rebalancer submits new allocations to the contract.&#x20;

{% hint style="info" %}
New allocations are not enforced, but when they are submitted, any user can trigger a rebalance.
{% endhint %}

During the rebalance process, `IdleToken` contracts check if the new allocation is different and eventually accept it. This triggers a rebalance which mints or redeem the pooled funds on different lending protocols via the dedicated wrappers (`IdleCompound`, `IdleAave`, ...).

{% hint style="warning" %}
If no rebalance is triggered after some time (currently every \~3h), an off-chain bot rebalances the pool for everyone.
{% endhint %}

All Idle strategies use the same set of smart contracts, but each allocation uses a different instance of those contracts.


# Deployed contracts

###


# Ethereum

Developers > Best Yield > Deployed contracts > Ethereum

You can find the currently deployed instances and ABIs of the Best Yield and LP staking contracts at the following addresses. The ABI of the Best Yield contract can be found here: [JSON](https://github.com/Idle-Labs/idle-contracts/tree/develop/abi).

### **Best Yield**

Aave, Compound, and whitelisted [Senior Yield Tranches](/developers/yield-tranches/deployed-contracts/ethereum) as underlying markets

<table><thead><tr><th width="205">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>idleDAI_Yield</td><td><a href="https://etherscan.io/address/0x3fe7940616e5bc47b0775a0dccf6237893353bb4">0x3fe7940616e5bc47b0775a0dccf6237893353bb4</a></td></tr><tr><td>idleUSDC_Yield</td><td><a href="http://etherscan.io/address/0x5274891bEC421B39D23760c04A6755eCB444797C">0x5274891bEC421B39D23760c04A6755eCB444797C</a></td></tr><tr><td>idleUSDT_Yield</td><td><a href="http://etherscan.io/address/0xF34842d05A1c888Ca02769A633DF37177415C2f8">0xF34842d05A1c888Ca02769A633DF37177415C2f8</a></td></tr></tbody></table>

### **Deprecated strategies**

Multiple versions of the BY vaults were released over time. Please refer to the list below to understand the BY type

* OG BY = vaults using only Aave and Compound as underlying markets
* Senior BY = vaults using Aave, Compound, and [Senior tranches](/developers/yield-tranches/deployed-contracts/ethereum) as underlying markets
* Junior BY = vaults using [Junior tranches](/developers/yield-tranches/deployed-contracts/ethereum) as underlying markets

<table><thead><tr><th width="137">Type</th><th width="163">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>OG</td><td>idleWBTC_Yield</td><td><a href="http://etherscan.io/address/0x8C81121B15197fA0eEaEE1DC75533419DcfD3151">0x8C81121B15197fA0eEaEE1DC75533419DcfD3151</a></td></tr><tr><td>OG</td><td>idleSUSD_Yield</td><td><a href="https://etherscan.io/address/0xf52cdcd458bf455aed77751743180ec4a595fd3f">0xf52cdcd458bf455aed77751743180ec4a595fd3f</a></td></tr><tr><td>OG</td><td>idleTUSD_Yield</td><td><a href="https://etherscan.io/address/0xc278041fdd8249fe4c1aad1193876857eea3d68c">0xc278041fdd8249fe4c1aad1193876857eea3d68c</a></td></tr><tr><td>OG</td><td>idleRAI_Yield</td><td><a href="https://etherscan.io/address/0x5c960a3dcc01be8a0f49c02a8cebcacf5d07fabe">0x5c960a3dcc01be8a0f49c02a8cebcacf5d07fabe</a></td></tr><tr><td>OG</td><td>idleFEI_Yield</td><td><a href="https://etherscan.io/address/0xb2d5CB72A621493fe83C6885E4A776279be595bC">0xb2d5CB72A621493fe83C6885E4A776279be595bC</a></td></tr><tr><td>Senior</td><td>idleWETH_Senior</td><td><a href="https://etherscan.io/address/0xc8e6ca6e96a326dc448307a5fde90a0b21fd7f80">0xC8E6CA6E96a326dC448307A5fDE90a0b21fd7f80</a></td></tr><tr><td>Junior</td><td>idleWETH_Junior</td><td><a href="https://etherscan.io/address/0x62a0369c6bb00054e589d12aad7ad81ed789514b">0x62a0369c6bb00054e589d12aad7ad81ed789514b</a></td></tr><tr><td>Junior</td><td>idleDAI_Junior</td><td><a href="https://etherscan.io/address/0xec9482040e6483b7459cc0db05d51dfa3d3068e1">0xec9482040e6483b7459cc0db05d51dfa3d3068e1</a></td></tr><tr><td>Junior</td><td>idleUSDC_Junior</td><td><a href="https://etherscan.io/address/0xdc7777c771a6e4b3a82830781bdde4dbc78f320e">0xdc7777c771a6e4b3a82830781bdde4dbc78f320e</a></td></tr><tr><td>Junior</td><td>idleUSDT_Junior</td><td><a href="https://etherscan.io/address/0xfa3afc9a194babd56e743fa3b7aa2ccbed3eaaad">0xfa3afc9a194babd56e743fa3b7aa2ccbed3eaaad</a></td></tr></tbody></table>

#### Deprecated strategies Polygon

<table><thead><tr><th width="137.33333333333331">Type</th><th width="159">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>OG</td><td>idleDAI_Yield</td><td><a href="https://polygonscan.com/address/0x8a999F5A3546F8243205b2c0eCb0627cC10003ab">0x8a999F5A3546F8243205b2c0eCb0627cC10003ab</a></td></tr><tr><td>OG</td><td>idleUSDC_Yield</td><td><a href="https://polygonscan.com/address/0x1ee6470CD75D5686d0b2b90C0305Fa46fb0C89A1">0x1ee6470CD75D5686d0b2b90C0305Fa46fb0C89A1</a></td></tr><tr><td>OG</td><td>idleWETH_Yield</td><td><a href="https://polygonscan.com/address/0xfdA25D931258Df948ffecb66b5518299Df6527C4">0xfdA25D931258Df948ffecb66b5518299Df6527C4</a></td></tr></tbody></table>


# Optimism

Developers > Best Yield > Deployed contracts > Optimism

{% hint style="warning" %}
The RWA Best Yield on Optimism has been decommissioned
{% endhint %}

You can find the currently deployed instances and ABIs of the Best Yield and LP staking contracts at the following addresses. The ABI of the Best Yield contract can be found here: [JSON](https://github.com/Idle-Labs/idle-contracts/tree/develop/abi).

### **Best Yield**

Whitelisted [Senior Yield Tranches](/developers/yield-tranches/deployed-contracts/ethereum) as underlying markets

<table><thead><tr><th width="205">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>RWA_USDT_Yield</td><td><a href="https://optimistic.etherscan.io/address/0x9Ebcb025949FFB5A77ff6cCC142e0De649801697">0x9Ebcb025949FFB5A77ff6cCC142e0De649801697</a></td></tr></tbody></table>


# Interface

Developers > Best Yield > Interface

### **IdleToken**

The interface for the `IdleToken` contract is the following:

```solidity
interface IdleToken {
  function token() external view returns (address underlying);
  function govTokens(uint256) external view returns (address govToken);
  function userAvgPrices(address) external view returns (uint256 avgPrice);
  function mintIdleToken(uint256 _amount, bool _skipWholeRebalance, address _referral) external returns (uint256 mintedTokens);
  function redeemIdleToken(uint256 _amount) external returns (uint256 redeemedTokens);
  function redeemInterestBearingTokens(uint256 _amount) external;
  function rebalance() external returns (bool);
  function tokenPrice() external view returns (uint256 price);
  function getAPRs() external view returns (address[] memory addresses, uint256[] memory aprs);
  function getAvgAPR() external view returns (uint256 avgApr);
  function getGovTokensAmounts(address _usr) external view returns (uint256[] memory _amounts);
  function getAllocations() external view returns (uint256[] memory);
  function getGovTokens() external view returns (address[] memory);
  function getAllAvailableTokens() external view returns (address[] memory);
  function getProtocolTokenToGov(address _protocolToken) external view returns (address);
  function tokenPriceWithFee(address user) external view returns (uint256 priceWFee);
}
```

Note that IdleTokens are ERC20 compliant, so they will also support methods from the ERC20 standard like `approve`, `transfer`, `balanceOf`.


# Methods

Developers > Best Yield > Methods

Idle allows you to lend different underlying assets (e.g. *DAI*, *USDC*) through the use of IdleTokens. So for each underlying asset supported there is a corresponding IdleToken (e.g. IdleDAI, IdleUSDC) implemented as an IdleToken instance.

### Core methods

[`mintIdleToken`](/developers/best-yield/methods/mintidletoken)**:** lends assets in Idle and receives IdleTokens back.

[`redeemIdleToken`](/developers/best-yield/methods/redeemidletoken-1)**:** redeems your assets and interests and burns IdleTokens.

[`redeemInterestBearingTokens`](/developers/best-yield/methods/redeeminterestbearingtokens)**:** redeems interest-bearing assets and burns IdleTokens.

[`rebalance`](/developers/best-yield/methods/rebalance)**:** reads allocations from IdleRebalancer and changes IdleToken pool allocations if needed.

[`tokenPrice`](/developers/best-yield/methods/tokenprice)**:** gets current IdleToken price without fees.

[`getAPRs`](/developers/best-yield/methods/getaprs)**:** gets APRs from all implemented protocols.

[`getAvgApr`](/developers/best-yield/methods/getavgapr)**:** gets current IdleToken average APR.

[`userAvgPrices`](/developers/best-yield/methods/useravgprices): gets avg price per IdleToken paid by a user (used to calculate earnings).

[`getGovTokensAmounts`](/developers/best-yield/methods/getgovtokensamounts): gets the number of redeemable governance tokens a user can withdraw.

[`getAllocations`](/developers/best-yield/methods/getallocations): gets an array with the last allocations.

[`getGovTokens`](/developers/best-yield/methods/getgovtokens): gets an array with the governance token addresses distributed.

[`getAllAvailableTokens`](/developers/best-yield/methods/getallavailabletokens): gets an array with all interest-bearing token addresses supported.

[`getProtocolTokenToGov`](/developers/best-yield/methods/getprotocoltokentogov): gets the governance token associated with a specific interest bearing token, if any.

[`tokenPriceWithFee`](/developers/best-yield/methods/tokenpricewithfee): gets the current IdleToken price for a specific user, counting fees


# mintIdleToken

Developers > Best Yield > mintIdleToken

This method is used to deposit money into the Idle protocol. When you call `mintIdleToken` we will transfer the amount of underlying supplied to IdleToken contract and then mint interest-bearing tokens with that amount.&#x20;

Interest-bearing tokens of each user are pooled together inside the IdleToken contract and you will then receive Idle LP tokens which represent your share of Idle pools.

**Users should call `approve` on the underlying asset used (eg. DAI) to allow IdleToken contract to spend `_amount` of tokens before calling this method.**

{% hint style="info" %}
Please note that after the first mint all subsequent ones will also send governance tokens (e.g. IDLE) to `msg.sender` (if `msg.sender` had other previously minted idleTokens in the account).
{% endhint %}

### Function

```solidity
function mintIdleToken(
    uint256 _amount, 
    bool _skipWholeRebalance, 
    address _referral
) external returns (uint256 mintedTokens);
```

### **Parameters**

<table><thead><tr><th width="277">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>The amount of underlying token to be lent</td></tr><tr><td><code>_skipWholeRebalance</code></td><td>Boolean flag. Not used anymore so can receive either true or false</td></tr><tr><td><code>_referral</code></td><td>Address for an eventual future referral program</td></tr></tbody></table>

### **Return values**

<table><thead><tr><th width="282">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>mintedTokens</code></td><td>The amount of Idle LP tokens minted</td></tr></tbody></table>


# redeemIdleToken

Developers > Best Yield > redeemIdleToken

With this method, users can redeem their underlying balance by burning Idle LP tokens. We calculate the pool share one can withdraw given the amount of Idle LP tokens they want to burn and redeem the corresponding underlying amount from each lending protocol currently used (if the unlent pool is not sufficient). We then send the underlying to the `msg.sender` .

With this call also governance tokens accrued by a user will be redeemed and sent to the user. This method can be called with `_amount` equal to 0 to redeem governance tokens only and maintain the position in Idle.&#x20;

### Function

```solidity
function redeemIdleToken(
    uint256 _amount
) external returns (uint256 redeemedTokens);
```

### **Parameters**

<table><thead><tr><th width="303">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>The amount of Idle LP tokens to be burned</td></tr></tbody></table>

### **Return values**

<table><thead><tr><th width="307">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>redeemedTokens</code></td><td>The amount of underlying tokens redeemed</td></tr></tbody></table>


# redeemInterestBearingTokens

Developers > Best Yield > redeemInterestBearingTokens

{% hint style="info" %}
This method can be called only in emergency situations when the BY contract is paused.
{% endhint %}

This method calculates the pool share one user can withdraw given the amount of idleTokens (idleDAI, idleUSDC, idleUSD, ...) he wants to burn and send interest-bearing tokens (aTokens from Aave, cTokens from Compound, ...) directly to the user's wallet alongside his share of unlent underlying (e.g. DAI) present in the vault.

### Function

```solidity
function redeemInterestBearingTokens(
    uint256 _amount
) external;
```

### **Parameters**

<table><thead><tr><th width="309">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>The amount of idleTokens to be burned</td></tr></tbody></table>


# rebalance

Developers > Best Yield > rebalance

This method dynamically allocates all the pooled funds across different lending protocols if needed.&#x20;

Everyone should be incentivized in calling this method if they spot an allocation that is not the optimal one.

This method will read allocations set by IdleRebalancer and check if current IdleToken allocations should be updated. It then calculates the exact amount to redeem and mint for each protocol.

In case of low liquidity on a protocol where we are trying to redeem, the rebalance process will try to redeem all the liquidity available, but it won't update the IdleToken allocations. In this way every subsequent rebalance (and also mint and redeem which calls the rebalance method) will try to redeem all the liquidity available at that moment until the correct allocations submitted by IdleRebalancer are enforced.

If a `maxUnlentPerc` is set in the contract this method will lend everything except for a small unlent pool (usually 1%) used for cheap redeems

### Function

```solidity
function rebalance(
) external returns (bool);
```

### **Return values**

<table><thead><tr><th width="299">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>bool</code></td><td>A boolean representing whether a rebalance has been performed or not</td></tr></tbody></table>


# tokenPrice

Developers > Best Yield > tokenPrice

This method returns the current $IDLE token price, in underlying (e.g. DAI) terms.

{% hint style="info" %}
Note: the **price does not include fees.** If you need the token price with fee you should take a look at the `tokenPriceWithFee` method.
{% endhint %}

### Function

```solidity
function tokenPrice(
) external view returns (uint256 price);
```

### Return values

| Value   | Description                       |
| ------- | --------------------------------- |
| `price` | Return the underlying token price |

{% hint style="info" %}
Note: $IDLE tokens for Risk-Adjusted strategy do not have a `tokenPriceWithFee` method so you need to take account of those on your side or use [this](https://etherscan.io/address/0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5#code) helper.
{% endhint %}

[Here](https://twitter.com/emilianobonassi/status/1344419709597458432) you can find a Twitter thread with more info about Idle Token Helper and also a [follow up here](https://twitter.com/emilianobonassi/status/1344550511538802688).


# tokenPriceWithFee

Developers > Best Yield > tokenPriceWithFee

This method returns $IDLE token price for a specific user considering fees, in underlying. This is useful when you need to redeem exactly X amount of underlying tokens.

### Function

```solidity
function tokenPriceWithFee(
    address _user
) external view returns (uint256 priceWFee);
```

### Parameters

<table><thead><tr><th width="292">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_user</code></td><td>The address of the user</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="302">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>priceWFee</code></td><td>The $IDLE token price with fees</td></tr></tbody></table>


# getAPRs

Developers > Best Yield > getAPRs

This method gives the actual (counting eventual fees) APR of every implemented lending protocol.

### Function

```solidity
function getAPRs(
) external view returns (address[] memory addresses, uint256[] memory aprs);
```

### Return values

<table><thead><tr><th width="265">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>addresses</code></td><td>An array of interest-bearing token addresses</td></tr><tr><td><code>aprs</code></td><td>An array of APRs (ordered with respect to the <code>addresses</code> array)</td></tr></tbody></table>


# getAvgApr

Developers > Best Yield > getAvgApr

This method gives the base layer aggregated APR of $IDLE token. This method does not take into account fees, unlent percentage and additional APR given by $IDLE governance token.

### Function

```solidity
function getAvgAPR(
) external view returns (uint256 avgApr);
```

### Return values

<table><thead><tr><th width="286">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>avgApr</code></td><td>The average APR for $IDLE tokens</td></tr></tbody></table>


# userAvgPrices

Developers > Best Yield > userAvgPrices

This method gives the average price paid for $IDLE tokens of one specific user.

### Function

```solidity
function userAvgPrices(
    address _user
) external view returns (uint256 avgPrice);
```

### Parameters

<table><thead><tr><th width="305">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_user</code></td><td>The address of the user</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="309">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>avgPrice</code></td><td>The average price paid for $IDLE tokens</td></tr></tbody></table>


# getGovTokensAmounts

Developers > Best Yield > getGovTokensAmounts

This method gets a lower bound estimate of the fair share of governance tokens a user is entitled to. The actual amount is calculated during redeem only.

### Function

```solidity
function getGovTokensAmounts(
    address _user
) external view returns (uint256[] calldata _amounts);
```

### **Parameters**

<table><thead><tr><th width="286">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_user</code></td><td>The address of the user</td></tr></tbody></table>

### **Return value**

<table><thead><tr><th width="290">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_amounts</code></td><td>An array of gov tokens amounts ordered following the <code>govTokens</code> order of the storage variable of the contract containing all the governance token addresses supported</td></tr></tbody></table>


# getAllocations

Developers > Best Yield > getAllocations

This method returns an array with the last allocations in lending protocols (100% = `100000`)

### Function

```solidity
function getAllocations(
) external view returns (uint256[] memory);
```

### Return values

<table><thead><tr><th width="312">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_allocations</code></td><td>array with lending protocols allocations. Sum is always equal to <code>100000</code> (100%)</td></tr></tbody></table>


# getGovTokens

Developers > Best Yield > getGovTokens

This method gets the gov tokens distributed for this IdleToken.

### Function

```solidity
function getGovTokens(
) external view returns (address[] memory);
```

### Return values

<table><thead><tr><th width="289">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>An array of governance token addresses</td></tr></tbody></table>


# getAllAvailableTokens

Developers > Best Yield > getAllAvailableTokens

This method gives a list of currently used protocol tokens (cDAI, aDAI).

### Function

```solidity
function getAllAvailableTokens(
) external view returns (address[] memory);
```

### Return values

<table><thead><tr><th width="290">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>An array of protocol tokens currently supported</td></tr></tbody></table>


# getProtocolTokenToGov

Developers > Best Yield > getProtocolTokenToGov

This method gives the governance token associated to a protocol token, e.g. `protocolTokenToGov[cDAI]` == COMP address.

```solidity
function getProtocolTokenToGov(
    address _protocolToken
) external view returns (address);
```

### Parameters

<table><thead><tr><th width="301">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_protocolToken</code></td><td>Address of one of the interest-bearing tokens currently used</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="305">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address</code></td><td>An array of the address of the governance token</td></tr></tbody></table>


# Edge cases

Developers > Best Yield > Edge cases

If one of the implemented lending providers does not have all the liquidity requested available when the `redeemIdleToken` is called and no unlent balance is left then the tx will revert.&#x20;

The only options are to either wait for new liquidity to be returned (the rebalance method already takes this into account and tries to redeem as much as possible) or reduce the redeemed amount.


# Security management policy

Developers > Best Yield > Security management policy

## Best Yield vaults

`IdleTokenV4`, the factory contract for the *Best Yield* strategy is an upgradable contract that uses [OpenZeppelin upgradability pattern](https://docs.openzeppelin.com/upgrades/2.8/proxies). Its upgradability is owned by the `Timelock` contract, which is controlled by IDLE token holders (as described in the [governance process](/governance/idle-dao/governance-process) section).

Each *Best Yield* strategy consists of a proxy that points to a shared implementation of `IdleTokenV4` contracts. The implementation for each strategy can be upgraded through a shared Proxy Admin which is [`0x7740792812A00510b50022D84e5c4AC390e01417`](http://etherscan.io/address/0x7740792812A00510b50022D84e5c4AC390e01417).

The owner of the Proxy Admin and of Best Yield strategy's proxy is the `Timelock` contract which is owned by the `GovernorBravo`, controlled by `IDLE` holders.

There are a few administrative privileges that the `Timelock` have besides the ability to upgrade `IdleTokenV4` implementation logic:

* It can change Idle wrappers (`IdleCompound`, `IdleAave`, ...) and associated assets supported for lending protocols;
* It can add and or remove governance tokens supported for distribution;
* `fee` and `feeAddress`can be updated. \
  The fee is capped and can be at most 10% of the interest earned currently;
* It can set `maxUnlentPerc`, i.e. a percentage of unlent funds used for cheap redemption (currently 1% of all deposited assets).

### Additional functions

As part of the Security Management policy, there are 2 more functions with different privileges on the `IdleToken` contract

{% tabs %}
{% tab title="Pause Guardian" %}
`mintIdleToken` and `rebalance` can be paused during emergency situations, while `redeemIdleToken` and `redeemInterestBearingTokens` will always be available.

<table><thead><tr><th width="209">Product</th><th>Guardian</th></tr></thead><tbody><tr><td>Senior BY vaults</td><td><a href="https://etherscan.io/address/0xaDa343Cb6820F4f5001749892f6CAA9920129F2A">Idle Labs</a> multisig and <a href="https://etherscan.io/address/0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f">Hypernative</a> pauser multisig</td></tr><tr><td>Junior BY vaults</td><td><a href="https://etherscan.io/address/0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814">Treasury League</a> multisig, <a href="https://etherscan.io/address/0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b">Development League</a> multisig and <a href="https://etherscan.io/address/0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f">Hypernative</a> pauser multisig</td></tr></tbody></table>

where&#x20;

* Idle Labs multisig has a 2/4 threshold [`0xaDa343Cb6820F4f5001749892f6CAA9920129F2A`](http://etherscan.io/address/0xaDa343Cb6820F4f5001749892f6CAA9920129F2A)
* Treasury League multisig has a 3/6 threshold\
  [`0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814`](https://etherscan.io/address/0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814)
* Development League multisig has a 3/6 threshold\
  [`0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b`](https://etherscan.io/address/0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b)
* Hypernative pauser multisig has a 2/5 threshold\
  [`0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f`](https://etherscan.io/address/0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f)

The guardian can be changed at any time by the governance with a proposal.
{% endtab %}

{% tab title="Rebalancer" %}
The address designated to submit new allocations is currently set to [`0xB3C8e5534F0063545CBbb7Ce86854Bf42dB8872B`](https://etherscan.io/address/0xb3c8e5534f0063545cbbb7ce86854bf42db8872b).&#x20;

The Rebalancer can be changed at any time by the governance with a proposal.

For the Best Yield vaults, there is also the [`openRebalance`](broken://pages/-MMH6E1_SCmJlb0dScro) available that allows anyone to submit new allocations, currently disabled for security reasons.
{% endtab %}
{% endtabs %}


# Get integrated as yield source

Developers > Best Yield > Get integrated as yield source

Currently, the Best Yield is integrated with Compound, and Aave as yield sources.&#x20;

If you want to promote a new integration, you can create an `IdleWrapper` that adhere to the following interface:

```javascript
interface ILendingProtocol {
  function mint() external returns (uint256);
  function redeem(address account) external returns (uint256);
  function nextSupplyRate(uint256 amount) external view returns (uint256);
  function getAPR() external view returns (uint256);
  function getPriceInToken() external view returns (uint256);
  function token() external view returns (address);
  function underlying() external view returns (address);
  function availableLiquidity() external view returns (uint256);
}
```

You can find the current wrappers for Compound as a reference on GitHub [here](https://github.com/Idle-Labs/idle-contracts/tree/develop/contracts/wrappers) (`IdleCompoundV2` is used for DAI only).

The `nextSupplyRate(uint256 amount)` is the rate that the protocol would have after a new deposit of underlying `amount` (e.g. if the current APR for DAI in Compound is 10% and then we deposit 100.000 DAI what would the next rate be?)

The Idle DAO implemented the [Integration Standard Requirements](/developers/security/integration-standard-requirements), guidelines to help the Idle community, builders, protocol founders, and Idle liquidity providers to perform adequate due diligence on the current and future yield generating integrations and infrastructures.


# Get user earnings

Developers > Best Yield > Get user earnings

Tracking earnings on Idle is easy, you just need the avg buy price of the IdleTokens, the amount of IdleTokens held by a user and the current price.

IdleToken contract saves and updates the `userAvgPrices` mapping which contains the avg price paid for each IdleToken of a user, so to calculate earnings (in underlying) one can do the following:

```javascript
address user = <address_of_user>;
IIdleToken idleDAI = IIdleToken(<address_idle_token>);
uint256 userBalance = idleDAI.balanceOf(user);
uint256 avgCost = userBalance.times(idleDAI.userAvgPrices(user)).div(10**18);
uint256 currentValue = userBalance.times(idleDAI.tokenPriceWithFee()).div(10**18);
uint256 earnings = currentValue.minus(avgCost);
```

{% hint style="info" %}
Note: `tokenPriceWithFee` is available only for IdleToken of the Best yield strategy. For the Risk adjusted strategy fee must be accounted on the integrators side or by using [this helper](https://etherscan.io/address/0x04Ce60ed10F6D2CfF3AA015fc7b950D13c113be5#code).\
\
[Here](https://twitter.com/emilianobonassi/status/1344419709597458432) you can find more info and also a [follow up here](https://twitter.com/emilianobonassi/status/1344550511538802688).
{% endhint %}


# Yield Tranches

Developers > Yield Tranches


# Architecture

Developers > Yield Tranches > Architecture

The main contract used by users is called `IdleCDO` which allows depositing the underlying and mint tranche tokens (ERC-20), either AA or BB, and redeeming principal and interest from it.

{% hint style="success" %}
YTs are also ERC-4626 compliant! Deployed wrappers can be found [here.](/developers/yield-tranches/deployed-contracts#erc-4626-wrappers-for-tranche-tokens)
{% endhint %}

The IdleCDO contract pools users' funds together and uses `IIdleCDOStrategy` as a proxy for interacting with the underlying DeFi protocol to deposit funds and collect interest and rewards.

Governance tokens collected as rewards are not redistributed to users directly in the IdleCDO contract but rather sold to the market (`harvest` method) and the underlying reinvested in the downstream lending provider where possible.

### Codebase and contracts

The codebase and a general overview of the architecture can be found at <https://github.com/Idle-Labs/idle-tranches>.

These are the core contracts used:

<details>

<summary>IdleCDO.sol</summary>

A contract that holds all the user pooled assets (both underlying, e.g. DAI, and interest-bearing tokens, e.g. *idleDAI*) and is an entry point for the user to mint tranche tokens and burn them to redeem principal and interest.&#x20;

When users deposit into the CDO they will:&#x20;

* update the global accounting of the system (i.e. split accrued rewards)
* mint their chosen tranche tokens.&#x20;

Funds won't get put in lending right away.&#x20;

The `harvest` method will be called periodically to put new deposits in lending, get fees and update the accounting.&#x20;

During the harvest call, some predefined rewards will be sold into the market (via Uniswap) and released linearly over *x* (currently set a 1500) blocks, to increase the value of all tranche holders. \
On redeem, users will burn their tranche tokens and get underlying using a checkpointed price (set at last harvest to avoid potential theft of interest, updated when dumping governance tokens to increase the tranche price).

</details>

<details>

<summary>IdleCDOTranche.sol</summary>

ERC-20 representing a specific (either AA or BB) tranche token. Only IdleCDO contract can mint and burn tranche tokens.

</details>

On top of these, all the strategies (`IIdleCDOStrategy`) currently used can be found here <https://github.com/Idle-Labs/idle-tranches/tree/master/contracts/strategies>.


# Deployed contracts

Developers > Yield Tranches > Deployed contracts

Yield Tranches are deployed on multiple chains. For each chain, we list the different pools available following this scheme:

* CDO = Main YTs contract address
* Senior = Senior tranche LP token (AA)
* Junior = Junior tranche LP token (BB)

The ABI of the Yield Tranches contract can be found here: [JSON](https://github.com/Idle-Labs/idle-tranches/blob/master/abi/IdleCDO.json).

{% content-ref url="/pages/R0HC2DRQK2mS5yosiQkO" %}
[Ethereum](/developers/yield-tranches/deployed-contracts/ethereum)
{% endcontent-ref %}

{% content-ref url="/pages/OKqBz7s6kqK4zqS6AL47" %}
[Polygon zkEVM](/developers/yield-tranches/deployed-contracts/polygon)
{% endcontent-ref %}

{% content-ref url="/pages/P6JPO3N5INt0iIUGxJUt" %}
[Optimism](/developers/yield-tranches/deployed-contracts/optimism)
{% endcontent-ref %}


# Ethereum

Developers > Yield Tranches > Deployed contracts > Ethereum

You can find the currently deployed instances and ABIs of the Yield Tranches contracts at the following addresses. The tables list all the YTs addresses currently available and the specific token addresses following this scheme:&#x20;

* CDO = Main YTs contract address
* Senior = Senior tranche LP token (AA)
* Junior = Junior tranche LP token (BB)

The ABI of the Yield Tranches contract can be found here: [JSON](https://github.com/Idle-Labs/idle-tranches/blob/master/abi/IdleCDO.json).

### Lido

**stETH**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="183">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>lido_stETH</td><td><a href="https://etherscan.io/address/0x34dCd573C5dE4672C8248cd12A99f875Ca112Ad8">0x34dCd573C5dE4672C8248cd12A99f875Ca112Ad8</a></td></tr><tr><td>Senior</td><td>AA_lido_stETH</td><td><a href="https://etherscan.io/address/0x2688fc68c4eac90d9e5e1b94776cf14eade8d877">0x2688fc68c4eac90d9e5e1b94776cf14eade8d877</a></td></tr><tr><td>Junior</td><td>BB_lido_stETH</td><td><a href="https://etherscan.io/address/0x3a52fa30c33caf05faee0f9c5dfe5fd5fe8b3978">0x3a52fa30c33caf05faee0f9c5dfe5fd5fe8b3978</a></td></tr></tbody></table>

**MATIC**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="184">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>lido_MATIC</td><td><a href="https://etherscan.io/address/0xF87ec7e1Ee467d7d78862089B92dd40497cBa5B8">0xF87ec7e1Ee467d7d78862089B92dd40497cBa5B8</a></td></tr><tr><td>Senior</td><td>AA_lido_stMATIC</td><td><a href="https://etherscan.io/address/0xAEf4FCC4E5F2dc270760063446d4116D24704Ad1">0xAEf4FCC4E5F2dc270760063446d4116D24704Ad1</a></td></tr><tr><td>Junior</td><td>BB_lido_stMATIC</td><td><a href="https://etherscan.io/address/0x077212c69A66261CF7bD1fd3b5C5db7CfFA948Ee">0x077212c69A66261CF7bD1fd3b5C5db7CfFA948Ee</a></td></tr></tbody></table>

### Instadapp

**stETH**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="192">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>instadapp_stETH</td><td><a href="https://etherscan.io/address/0x8E0A8A5c1e5B3ac0670Ea5a613bB15724D51Fc37">0x8E0A8A5c1e5B3ac0670Ea5a613bB15724D51Fc37</a></td></tr><tr><td>Senior</td><td>AA_instadapp_stETH</td><td><a href="https://etherscan.io/address/0xdf17c739b666B259DA3416d01f0310a6e429f592">0xdf17c739b666B259DA3416d01f0310a6e429f592</a></td></tr><tr><td>Junior</td><td>BB_instadapp_stETH</td><td><a href="https://etherscan.io/address/0x990b3af34ddb502715e1070ce6778d8eb3c8ea82">0x990b3aF34dDB502715E1070CE6778d8eB3c8Ea82</a></td></tr></tbody></table>

### Morpho

**USDC (Steakhouse)**

<table><thead><tr><th width="97.33333333333331">Side</th><th width="204">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>mm_STEAK_USDC</td><td><a href="https://etherscan.io/address/0x87E53bE99975DA318056af5c4933469a6B513768">0x87E53bE99975DA318056af5c4933469a6B513768</a></td></tr><tr><td>Senior</td><td>AA_mm_STEAK_USDC</td><td><a href="https://etherscan.io/address/0x2B0E31B8EE653D2077db86dea3ACf3F34ae9d5D2">0x2B0E31B8EE653D2077db86dea3ACf3F34ae9d5D2</a></td></tr><tr><td>Junior</td><td>BB_mm_STEAK_USDC</td><td><a href="https://etherscan.io/address/0x7b713B1Cb6EaFD4061064581579ffCCf7DF21545">0x7b713B1Cb6EaFD4061064581579ffCCf7DF21545</a></td></tr></tbody></table>

### Gearbox

**USDC**

<table><thead><tr><th width="102">Side</th><th width="185">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>gear_USDC</td><td><a href="https://etherscan.io/address/0xdd4D030A4337CE492B55bc5169F6A9568242C0Bc">0xdd4D030A4337CE492B55bc5169F6A9568242C0Bc</a></td></tr><tr><td>Senior</td><td>AA_gear_USDC</td><td><a href="https://etherscan.io/address/0x450C055a00226F1Eba09E8D9627034565b7C4C8A">0x450C055a00226F1Eba09E8D9627034565b7C4C8A</a></td></tr><tr><td>Junior</td><td>BB_gear_USDC</td><td><a href="https://etherscan.io/address/0x2a84A042DB06222C486BcB815E961f26599D0dF6">0x2a84A042DB06222C486BcB815E961f26599D0dF6</a></td></tr></tbody></table>

**WETH**

<table><thead><tr><th width="105">Side</th><th width="185">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>gear_WETH</td><td><a href="https://etherscan.io/address/0xbc48967C34d129a2ef25DD4dc693Cc7364d02eb9">0xbc48967C34d129a2ef25DD4dc693Cc7364d02eb9</a></td></tr><tr><td>Senior</td><td>AA_gear_WETH</td><td><a href="https://etherscan.io/address/0x0f09A04AD551Dd941b589625BD2360FC962FF9f7">0x0f09A04AD551Dd941b589625BD2360FC962FF9f7</a></td></tr><tr><td>Junior</td><td>BB_gear_WETH</td><td><a href="https://etherscan.io/address/0x1223ddeEe77F8F379ea7a49e7650Ff1Ec1e2dE8a">0x1223ddeEe77F8F379ea7a49e7650Ff1Ec1e2dE8a</a></td></tr></tbody></table>

### Ethena

**USDe**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="189">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>ethena_USDe</td><td><a href="https://etherscan.io/address/0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C">0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C</a></td></tr><tr><td>Senior</td><td>ethena_USDe_Sr</td><td><a href="https://etherscan.io/address/0xF3188697Bd35Df73E4293d04A07ebAAf1FfC4018">0xF3188697Bd35Df73E4293d04A07ebAAf1FfC4018</a></td></tr><tr><td>Junior</td><td>ethena_USDe_Jr</td><td><a href="https://etherscan.io/address/0xb8d0be502a8f12cc5213733285b430a43d07349d">0xb8d0BE502A8F12Cc5213733285b430A43d07349D</a></td></tr></tbody></table>

### Deprecated strategies

The expandable lists all the YTs addresses deprecated and the specific token addresses following this order:&#x20;

1. Main YTs contract address (CDO)
2. Senior tranche LP token (AA)
3. Junior tranche LP token (BB)

{% tabs %}
{% tab title="Idle" %}
**DAI**

<table><thead><tr><th width="198">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>idle_DAIYield</td><td><a href="https://etherscan.io/address/0xd0DbcD556cA22d3f3c142e9a3220053FD7a247BC">0xd0DbcD556cA22d3f3c142e9a3220053FD7a247BC</a></td></tr><tr><td>AA_idle_DAIYield</td><td><a href="https://etherscan.io/address/0xE9ada97bDB86d827ecbaACCa63eBcD8201D8b12E">0xE9ada97bDB86d827ecbaACCa63eBcD8201D8b12E</a></td></tr><tr><td>BB_idle_DAIYield</td><td><a href="https://etherscan.io/address/0x730348a54bA58F64295154F0662A08Cbde1225c2">0x730348a54bA58F64295154F0662A08Cbde1225c2</a></td></tr></tbody></table>

**FEI**

<table><thead><tr><th width="198">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>idle_FEIYield</td><td><a href="https://etherscan.io/address/0x77648a2661687ef3b05214d824503f6717311596">0x77648a2661687ef3b05214d824503f6717311596</a></td></tr><tr><td>AA_idle_FEIYield</td><td><a href="https://etherscan.io/address/0x9cE3a740Df498646939BcBb213A66BBFa1440af6">0x9cE3a740Df498646939BcBb213A66BBFa1440af6</a></td></tr><tr><td>BB_idle_FEIYield</td><td><a href="https://etherscan.io/address/0x2490D810BF6429264397Ba721A488b0C439aA745">0x2490D810BF6429264397Ba721A488b0C439aA745</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Convex" %}
**FRAX-3Crv**

<table><thead><tr><th width="215">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_frax3Crv</td><td><a href="https://etherscan.io/address/0x4CCaf1392a17203eDAb55a1F2aF3079A8Ac513E7">0x4CCaf1392a17203eDAb55a1F2aF3079A8Ac513E7</a></td></tr><tr><td>AA_convex_frax3Crv</td><td><a href="https://etherscan.io/address/0x15794da4dcf34e674c18bbfaf4a67ff6189690f5">0x15794da4dcf34e674c18bbfaf4a67ff6189690f5</a></td></tr><tr><td>BB_convex_frax3Crv</td><td><a href="https://etherscan.io/address/0x18cf59480d8c16856701f66028444546b7041307">0x18cf59480d8c16856701f66028444546b7041307</a></td></tr></tbody></table>

**ste-3Crv**

<table><thead><tr><th width="213">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_steCRV</td><td><a href="https://etherscan.io/address/0x7EcFC031758190eb1cb303D8238D553b1D4Bc8ef">0x7EcFC031758190eb1cb303D8238D553b1D4Bc8ef</a></td></tr><tr><td>AA_convex_steCRV</td><td><a href="https://etherscan.io/address/0x060a53bcfdc0452f35ebd2196c6914e0152379a6">0x060a53bcfdc0452f35ebd2196c6914e0152379a6</a></td></tr><tr><td>BB_convex_steCRV</td><td><a href="https://etherscan.io/address/0xd83246d2bcbc00e85e248a6e9aa35d0a1548968e">0xd83246d2bcbc00e85e248a6e9aa35d0a1548968e</a></td></tr></tbody></table>

**alUSD-3Crv**

<table><thead><tr><th width="214">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_alusd3crv</td><td><a href="https://etherscan.io/address/0x008C589c471fd0a13ac2B9338B69f5F7a1A843e1">0x008C589c471fd0a13ac2B9338B69f5F7a1A843e1</a></td></tr><tr><td>AA_convex_alusd3crv</td><td><a href="https://etherscan.io/address/0x790e38d85a364dd03f682f5ecdc88f8ff7299908">0x790e38d85a364dd03f682f5ecdc88f8ff7299908</a></td></tr><tr><td>BB_convex_alusd3crv</td><td><a href="https://etherscan.io/address/0xa0e8c9088afb3fa0f40ecdf8b551071c34aa1aa4">0xa0e8c9088afb3fa0f40ecdf8b551071c34aa1aa4</a></td></tr></tbody></table>

**3EUR**

<table><thead><tr><th width="216">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_3eur</td><td><a href="https://etherscan.io/address/0x858F5A3a5C767F8965cF7b77C51FD178C4A92F05">0x858F5A3a5C767F8965cF7b77C51FD178C4A92F05</a></td></tr><tr><td>AA_convex_3eur</td><td><a href="https://etherscan.io/address/0x158e04225777bbea34d2762b5df9ebd695c158d2">0x158e04225777bbea34d2762b5df9ebd695c158d2</a></td></tr><tr><td>BB_convex_3eur</td><td><a href="https://etherscan.io/address/0x3061c652b49ae901bbecf622624cc9f633d01bbd">0x3061c652b49ae901bbecf622624cc9f633d01bbd</a></td></tr></tbody></table>

**pBTC-Crv**

<table><thead><tr><th width="217">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_pbtccrv</td><td><a href="https://etherscan.io/address/0xf324Dca1Dc621FCF118690a9c6baE40fbD8f09b7">0xf324Dca1Dc621FCF118690a9c6baE40fbD8f09b7</a></td></tr><tr><td>AA_convex_pbtccrv</td><td><a href="https://etherscan.io/address/0x4657b96d587c4d46666c244b40216beeea437d0d">0x4657b96d587c4d46666c244b40216beeea437d0d</a></td></tr><tr><td>BB_convex_pbtccrv</td><td><a href="https://etherscan.io/address/0x3872418402d1e967889ac609731fc9e11f438de5">0x3872418402d1e967889ac609731fc9e11f438de5</a></td></tr></tbody></table>

**MIM-3Crv**

<table><thead><tr><th width="220">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_mim3Crv</td><td><a href="https://etherscan.io/address/0x151e89e117728ac6c93aae94c621358b0ebd1866">0x151e89e117728ac6c93aae94c621358b0ebd1866</a></td></tr><tr><td>AA_convex_mim3Crv</td><td><a href="https://etherscan.io/address/0xFC96989b3Df087C96C806318436B16e44c697102">0xFC96989b3Df087C96C806318436B16e44c697102</a></td></tr><tr><td>BB_convex_mim3Crv</td><td><a href="https://etherscan.io/address/0x5346217536852CD30A5266647ccBB6f73449Cbd1">0x5346217536852CD30A5266647ccBB6f73449Cbd1</a></td></tr></tbody></table>

**mUSD-3Crv**

<table><thead><tr><th width="225">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>convex_musd3Crv</td><td><a href="https://etherscan.io/address/0x16d88C635e1B439D8678e7BAc689ac60376fBfA6">0x16d88C635e1B439D8678e7BAc689ac60376fBfA6</a></td></tr><tr><td>AA_convex_musd3Crv</td><td><a href="https://etherscan.io/address/0x4585F56B06D098D4EDBFc5e438b8897105991c6A">0x4585F56B06D098D4EDBFc5e438b8897105991c6A</a></td></tr><tr><td>BB_convex_musd3Crv</td><td><a href="https://etherscan.io/address/0xFb08404617B6afab0b19f6cEb2Ef9E07058D043C">0xFb08404617B6afab0b19f6cEb2Ef9E07058D043C</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Clearpool" %}
**USDC (Wintermute)**

<table><thead><tr><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_WIN_USDC</td><td><a href="https://etherscan.io/address/0xDBCEE5AE2E9DAf0F5d93473e08780C9f45DfEb93">0xDBCEE5AE2E9DAf0F5d93473e08780C9f45DfEb93</a></td></tr><tr><td>AA_cp_WIN_USDC</td><td><a href="https://etherscan.io/address/0xb86264c21418aa75f7c337b1821ccb4ff4d57673">0xb86264c21418aa75f7c337b1821ccb4ff4d57673</a></td></tr><tr><td>BB_cp_WIN_USDC</td><td><a href="https://etherscan.io/address/0x4d9d9aa17c3fcea05f20a87fc1991a045561167d">0x4d9d9aa17c3fcea05f20a87fc1991a045561167d</a></td></tr></tbody></table>

**DAI (Folkvang)**

<table><thead><tr><th width="198">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_FOL_DAI</td><td><a href="https://etherscan.io/address/0xDcE26B2c78609b983cF91cCcD43E238353653b0E">0xDcE26B2c78609b983cF91cCcD43E238353653b0E</a></td></tr><tr><td>AA_cp_FOL_DAI</td><td><a href="https://etherscan.io/address/0x1692F6574a6758ADfbD12544e209146dD4510BD7">0x1692F6574a6758ADfbD12544e209146dD4510BD7</a></td></tr><tr><td>BB_cp_FOL_DAI</td><td><a href="https://etherscan.io/address/0xCb980b5A4f5BdB81d0B4b97A9eDe64578ba9D48A">0xCb980b5A4f5BdB81d0B4b97A9eDe64578ba9D48A</a></td></tr></tbody></table>

**DAI (Portofino)**

<table><thead><tr><th width="188">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_POR_DAI</td><td><a href="https://etherscan.io/address/0x5dca0b3ed7594a6613c1a2acd367d56e1f74f92d">0x5dcA0B3Ed7594A6613c1A2acd367d56E1f74F92D</a></td></tr><tr><td>AA_cp_POR_DAI</td><td><a href="https://etherscan.io/address/0x43eD68703006add5F99ce36b5182392362369C1c">0x43eD68703006add5F99ce36b5182392362369C1c</a></td></tr><tr><td>BB_cp_POR_DAI</td><td><a href="https://etherscan.io/address/0x38d36353d07cfb92650822d9c31fb4ada1c73d6e">0x38d36353d07cfb92650822d9c31fb4ada1c73d6e</a></td></tr></tbody></table>

**USDC (Portofino)**

<table><thead><tr><th width="195">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_POR_USDC</td><td><a href="https://etherscan.io/address/0x1329e8db9ed7a44726572d44729427f132fa290d">0x1329E8DB9Ed7a44726572D44729427F132Fa290D</a></td></tr><tr><td>AA_cp_POR_USDC</td><td><a href="https://etherscan.io/address/0x9cacd44cfdf22731bc99facf3531c809d56bd4a2">0x9CAcd44cfDf22731bc99FaCf3531C809d56BD4A2</a></td></tr><tr><td>BB_cp_POR_USDC</td><td><a href="https://etherscan.io/address/0xf85fd280b301c0a6232d515001da8b6c8503d714">0xf85fd280b301c0a6232d515001da8b6c8503d714</a></td></tr></tbody></table>

**USDC (Fasanara)**

<table><thead><tr><th width="188">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_FAS_USDC</td><td><a href="https://etherscan.io/address/0xE7C6A4525492395d65e736C3593aC933F33ee46e">0xE7C6A4525492395d65e736C3593aC933F33ee46e</a></td></tr><tr><td>AA_cp_FAS_USDC</td><td><a href="https://etherscan.io/address/0xdca1dae87f5c733c84e0593984967ed756579bee">0xdcA1daE87f5c733c84e0593984967ed756579BeE</a></td></tr><tr><td>BB_cp_FAS_USDC</td><td><a href="https://etherscan.io/address/0xbcc845bb731632ebe8ac0bfacde056170aaaaa06">0xbcC845bB731632eBE8Ac0BfAcdE056170aaaaa06</a></td></tr></tbody></table>

**USDT (Fasanara)**

<table><thead><tr><th width="186">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_FAS_USDT</td><td><a href="https://etherscan.io/address/0xc4574C60a455655864aB80fa7638561A756C5E61">0xc4574C60a455655864aB80fa7638561A756C5E61</a></td></tr><tr><td>AA_cp_FAS_USDT</td><td><a href="https://etherscan.io/address/0x0a6f2449c09769950cfb76f905ad11c341541f70">0x0a6f2449C09769950cFb76f905Ad11c341541f70</a></td></tr><tr><td>BB_cp_FAS_USDT</td><td><a href="https://etherscan.io/address/0x3eb6318b8d9f362a0e1d99f6032edb1c4c602500">0x3Eb6318b8D9f362a0e1D99F6032eDB1C4c602500</a></td></tr></tbody></table>

**USDC (Wincent)**

<table><thead><tr><th width="199">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_WINC_USDC</td><td><a href="https://etherscan.io/address/0xB9c8d0A004772000eE199c4348f1933AcbFDC1bB">0xB9c8d0A004772000eE199c4348f1933AcbFDC1bB</a></td></tr><tr><td>AA_cp_WINC_USDC</td><td><a href="https://etherscan.io/address/0x00b51Fc6384A120Eac68bEA38b889Ea92524ab93">0x00b51Fc6384A120Eac68bEA38b889Ea92524ab93</a></td></tr><tr><td>BB_cp_WINC_USDC</td><td><a href="https://etherscan.io/address/0xe6de3a77b4e71356f4e5e52fd695ead5e5dbcd27">0xe6De3A77B4e71356F4E5e52fd695EAD5E5DBcd27</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Euler" %}
**DAI**

<table><thead><tr><th width="198">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eDAI</td><td><a href="https://etherscan.io/address/0x46c1f702A6aAD1Fd810216A5fF15aaB1C62ca826">0x46c1f702A6aAD1Fd810216A5fF15aaB1C62ca826</a></td></tr><tr><td>AA_euler_eDAI</td><td><a href="https://etherscan.io/address/0x852c4d2823e98930388b5ce1ed106310b942bd5a">0x852c4d2823e98930388b5ce1ed106310b942bd5a</a></td></tr><tr><td>BB_euler_eDAI</td><td><a href="https://etherscan.io/address/0x6629baa8c7c6a84290bf9a885825e3540875219d">0x6629baa8c7c6a84290bf9a885825e3540875219d</a></td></tr></tbody></table>

**USDC**

<table><thead><tr><th width="200">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eUSDC</td><td><a href="https://etherscan.io/address/0xF5a3d259bFE7288284Bd41823eC5C8327a314054">0xF5a3d259bFE7288284Bd41823eC5C8327a314054</a></td></tr><tr><td>AA_euler_eUSDC</td><td><a href="https://etherscan.io/address/0x1e095cbf663491f15cc1bdb5919e701b27dde90c">0x1e095cbf663491f15cc1bdb5919e701b27dde90c</a></td></tr><tr><td>BB_euler_eUSDC</td><td><a href="https://etherscan.io/address/0xe11679cdb4587fee907d69e9ec4a7d3f0c2bcf3b">0xe11679cdb4587fee907d69e9ec4a7d3f0c2bcf3b</a></td></tr></tbody></table>

**USDT**

<table><thead><tr><th width="198">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eUSDT</td><td><a href="https://etherscan.io/address/0xD5469DF8CA36E7EaeDB35D428F28E13380eC8ede">0xD5469DF8CA36E7EaeDB35D428F28E13380eC8ede</a></td></tr><tr><td>AA_euler_eUSDT</td><td><a href="https://etherscan.io/address/0xe0f126236d2a5b13f26e72cbb1d1ff5f297dda07">0xe0f126236d2a5b13f26e72cbb1d1ff5f297dda07</a></td></tr><tr><td>BB_euler_eUSDT</td><td><a href="https://etherscan.io/address/0xb1ec065abf6783bcce003b8d6b9f947129504854">0xb1ec065abf6783bcce003b8d6b9f947129504854</a></td></tr></tbody></table>

**agEUR**

<table><thead><tr><th width="199">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eagEUR</td><td><a href="https://etherscan.io/address/0x2398Bc075fa62Ee88d7fAb6A18Cd30bFf869bDa4">0x2398Bc075fa62Ee88d7fAb6A18Cd30bFf869bDa4</a></td></tr><tr><td>AA_euler_eagEUR</td><td><a href="https://etherscan.io/address/0x624dfe05202b66d871b8b7c0e14ab29fc3a5120c">0x624dfe05202b66d871b8b7c0e14ab29fc3a5120c</a></td></tr><tr><td>BB_euler_eagEUR</td><td><a href="https://etherscan.io/address/0xcf5fd05f72ca777d71fb3e38f296aad7ce735cb7">0xcf5fd05f72ca777d71fb3e38f296aad7ce735cb7</a></td></tr></tbody></table>

**DAI staking**

<table><thead><tr><th width="200">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eDAI_stk</td><td><a href="https://etherscan.io/address/0x264E1552Ee99f57a7D9E1bD1130a478266870C39">0x264E1552Ee99f57a7D9E1bD1130a478266870C39</a></td></tr><tr><td>AA_euler_eDAI_stk</td><td><a href="https://etherscan.io/address/0x62Eb6a8c7A555eae3e0B17D42CA9A3299af2787E">0x62Eb6a8c7A555eae3e0B17D42CA9A3299af2787E</a></td></tr><tr><td>BB_euler_eDAI_stk</td><td><a href="https://etherscan.io/address/0x56263BDE26b72b3e3D26d8e03399a275Aa8Bbfb2">0x56263BDE26b72b3e3D26d8e03399a275Aa8Bbfb2</a></td></tr></tbody></table>

**USDC staking**

<table><thead><tr><th width="210">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eUSDC_stk</td><td><a href="https://etherscan.io/address/0xf615a552c000B114DdAa09636BBF4205De49333c">0xf615a552c000B114DdAa09636BBF4205De49333c</a></td></tr><tr><td>AA_euler_eUSDC_stk</td><td><a href="https://etherscan.io/address/0x1AF0294524093BFdF5DA5135853dC2fC678C12f7">0x1AF0294524093BFdF5DA5135853dC2fC678C12f7</a></td></tr><tr><td>BB_euler_eUSDC_stk</td><td><a href="https://etherscan.io/address/0x271db794317B44827EfE81DeC6193fFc277050F6">0x271db794317B44827EfE81DeC6193fFc277050F6</a></td></tr></tbody></table>

**USDT staking**

<table><thead><tr><th width="213">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eUSDT_stk</td><td><a href="https://etherscan.io/address/0x860B1d25903DbDFFEC579d30012dA268aEB0d621">0x860B1d25903DbDFFEC579d30012dA268aEB0d621</a></td></tr><tr><td>AA_euler_eUSDT_stk</td><td><a href="https://etherscan.io/address/0x6796FCd41e4fb26855Bb9BDD7Cad41128Da1Fd59">0x6796FCd41e4fb26855Bb9BDD7Cad41128Da1Fd59</a></td></tr><tr><td>BB_euler_eUSDT_stk</td><td><a href="https://etherscan.io/address/0x00B80FCCA0fE4fDc3940295AA213738435B0f94e">0x00B80FCCA0fE4fDc3940295AA213738435B0f94e</a></td></tr></tbody></table>

**WETH staking**

<table><thead><tr><th width="210">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>euler_eWETH_stk</td><td><a href="https://etherscan.io/address/0xec964d06cD71a68531fC9D083a142C48441F391C">0xec964d06cD71a68531fC9D083a142C48441F391C</a></td></tr><tr><td>AA_euler_eWETH_stk</td><td><a href="https://etherscan.io/address/0x2B7Da260F101Fb259710c0a4f2EfEf59f41C0810">0x2B7Da260F101Fb259710c0a4f2EfEf59f41C0810</a></td></tr><tr><td>BB_euler_eWETH_stk</td><td><a href="https://etherscan.io/address/0x2e80225f383F858E8737199D3496c5Cf827670a5">0x2e80225f383F858E8737199D3496c5Cf827670a5</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Morpho" %}
**DAI (Aave)**

<table><thead><tr><th width="208">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>morpho_aDAI</td><td><a href="https://etherscan.io/address/0xDB82dDcb7e2E4ac3d13eBD1516CBfDb7b7CE0ffc">0xDB82dDcb7e2E4ac3d13eBD1516CBfDb7b7CE0ffc</a></td></tr><tr><td>AA_morpho_aDAI</td><td><a href="https://etherscan.io/address/0x69d87d0056256e3df7Be9b4c8D6429B4b8207C5E">0x69d87d0056256e3df7Be9b4c8D6429B4b8207C5E</a></td></tr><tr><td>BB_morpho_aDAI</td><td><a href="https://etherscan.io/address/0xB098AF638aF0c4Fa3edb1A24f807E9c22dA0fE73">0xB098AF638aF0c4Fa3edb1A24f807E9c22dA0fE73</a></td></tr></tbody></table>

**USDC (Aave)**

<table><thead><tr><th width="207">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>morpho_aUSDC</td><td><a href="https://etherscan.io/address/0x9C13Ff045C0a994AF765585970A5818E1dB580F8">0x9C13Ff045C0a994AF765585970A5818E1dB580F8</a></td></tr><tr><td>AA_morpho_aUSDC</td><td><a href="https://etherscan.io/address/0x376B2dCF9eBd3067BB89eb6D1020FbE604092212">0x376B2dCF9eBd3067BB89eb6D1020FbE604092212</a></td></tr><tr><td>BB_morpho_aUSDC</td><td><a href="https://etherscan.io/address/0x86a40De6d77331788Ba24a85221fb8DBFcBC9bF0">0x86a40De6d77331788Ba24a85221fb8DBFcBC9bF0</a></td></tr></tbody></table>

**USDT (Aave)**

<table><thead><tr><th width="207">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>morpho_aUSDT</td><td><a href="https://etherscan.io/address/0x440ceAd9C0A0f4ddA1C81b892BeDc9284Fc190dd">0x440ceAd9C0A0f4ddA1C81b892BeDc9284Fc190dd</a></td></tr><tr><td>AA_morpho_aUSDT</td><td><a href="https://etherscan.io/address/0x745e005a5dF03bDE0e55be811350acD6316894E1">0x745e005a5dF03bDE0e55be811350acD6316894E1</a></td></tr><tr><td>BB_morpho_aUSDT</td><td><a href="https://etherscan.io/address/0xF0C177229Ae1cd41BF48dF6241fae3e6A14A6967">0xF0C177229Ae1cd41BF48dF6241fae3e6A14A6967</a></td></tr></tbody></table>

**WETH (Aave)**

<table><thead><tr><th width="206">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>morpho_aWETH</td><td><a href="https://etherscan.io/address/0xb3F717a5064D2CBE1b8999Fdfd3F8f3DA98339a6">0xb3F717a5064D2CBE1b8999Fdfd3F8f3DA98339a6</a></td></tr><tr><td>AA_morpho_aWETH</td><td><a href="https://etherscan.io/address/0x6c0c8708e2FD507B7057762739cb04cF01b98d7b">0x6c0c8708e2FD507B7057762739cb04cF01b98d7b</a></td></tr><tr><td>BB_morpho_aWETH</td><td><a href="https://etherscan.io/address/0xd69c52E6AF3aE708EE4b3d3e7C0C5b4CF4d6244B">0xd69c52E6AF3aE708EE4b3d3e7C0C5b4CF4d6244B</a></td></tr></tbody></table>

**wstETH (Block Analitica & B.Protocol)**

<table><thead><tr><th width="205">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>mm_BB_wstETH</td><td><a href="https://etherscan.io/address/0x260D1E0CB6CC9E34Ea18CE39bAB879d450Cdd706">0x260D1E0CB6CC9E34Ea18CE39bAB879d450Cdd706</a></td></tr><tr><td>AA_mm_BB_wstETH</td><td><a href="https://etherscan.io/address/0x10036C2E5C441Cdef24A30134b6dF5ebf116205e">0x10036C2E5C441Cdef24A30134b6dF5ebf116205e</a></td></tr><tr><td>BB_mm_BB_wstETH</td><td><a href="https://etherscan.io/address/0x3331B21Abb39190a0426ca54D68F9E3E953Eec8e">0x3331B21Abb39190a0426ca54D68F9E3E953Eec8e</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Amphor" %}
**wstETH**

<table><thead><tr><th width="189">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>ethena_USDe</td><td><a href="https://etherscan.io/address/0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C">0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C</a></td></tr><tr><td>ethena_USDe_Sr</td><td><a href="https://etherscan.io/address/0xF3188697Bd35Df73E4293d04A07ebAAf1FfC4018">0xF3188697Bd35Df73E4293d04A07ebAAf1FfC4018</a></td></tr><tr><td>ethena_USDe_Jr</td><td><a href="https://etherscan.io/address/0xb8d0be502a8f12cc5213733285b430a43d07349d">0xb8d0BE502A8F12Cc5213733285b430A43d07349D</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# Polygon zkEVM

Developers > Yield Tranches > Deployed contracts > Polygon zkEVM

{% hint style="warning" %}
The Tranches on Polygon zkEVM have been decommissioned
{% endhint %}

You can find the currently deployed instances and ABIs of the Yield Tranches contracts at the following addresses. The tables list all the YTs addresses currently available and the specific token addresses following this scheme:&#x20;

* CDO = Main YTs contract address
* Senior = Senior tranche LP token (AA)
* Junior = Junior tranche LP token (BB)

The ABI of the Yield Tranches contract can be found here: [JSON](https://github.com/Idle-Labs/idle-tranches/blob/master/abi/IdleCDO.json).

<table><thead><tr><th width="299.50164149548493">Contract</th><th>Address</th></tr></thead><tbody><tr><td>Idle CDO registry</td><td><a href="https://etherscan.io/address/0x84FDeE80F18957A041354E99C7eB407467D94d8E">0x84FDeE80F18957A041354E99C7eB407467D94d8E</a></td></tr></tbody></table>

### Clearpool

**USDT (Portofino)**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>cp_POR_USDT</td><td><a href="https://zkevm.polygonscan.com/address/0x6b8A1e78Ac707F9b0b5eB4f34B02D9af84D2b689">0x6b8A1e78Ac707F9b0b5eB4f34B02D9af84D2b689</a></td></tr><tr><td>Senior</td><td>AA_cp_POR_USDT</td><td><a href="https://zkevm.polygonscan.com/address/0x6aab2db845b23729af1f5b0902ff4bdc32bbf948">0x6AaB2db845b23729aF1F5B0902Ff4BDc32BBf948</a></td></tr><tr><td>Junior</td><td>BB_cp_POR_USDT</td><td><a href="https://zkevm.polygonscan.com/address/0x1fdaf221ff3929e86266d6a5930fa7263c1bd4df">0x1FdAF221fF3929e86266D6A5930fa7263c1bD4DF</a></td></tr></tbody></table>

**USDC (Fasanara)**

<table><thead><tr><th width="192">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_FAS_USDC</td><td><a href="https://zkevm.polygonscan.com/address/0x8890957f80d7d771337f4ce42e15ec40388514f1">0x8890957F80d7D771337f4ce42e15Ec40388514f1</a></td></tr><tr><td>AA_cp_FAS_USDC</td><td><a href="https://zkevm.polygonscan.com/address/0x3ed123e94c95a5777149aeec50f4c956b29eccec">0x3Ed123E94C95A5777149AeEc50F4C956b29EcceC</a></td></tr><tr><td>BB_cp_FAS_USDC</td><td><a href="https://zkevm.polygonscan.com/address/0xbf78b393d14a90b52cdc2325e11c92f24f2f54f3">0xBF78b393d14A90B52cdc2325e11c92F24f2F54F3</a></td></tr></tbody></table>

### QuickSwap

#### WETH

<table><thead><tr><th width="250">Contract</th><th>Address</th></tr></thead><tbody><tr><td>Quickswap idleCSUNI-V2</td><td><a href="https://polygonscan.com/address/0xb144ee58679e15f1b25a5f6efcebdd0ab8c8bef5">0xB144eE58679e15f1b25A5F6EfcEBDd0AB8c8BEF5</a></td></tr></tbody></table>


# Optimism

Developers > Yield Tranches > Deployed contracts > Optimism

{% hint style="warning" %}
The Tranches on Optimism have been decommissioned
{% endhint %}

You can find the currently deployed instances and ABIs of the Yield Tranches contracts at the following addresses. The tables list all the YTs addresses currently available and the specific token addresses following this scheme:&#x20;

* CDO = Main YTs contract address
* Senior = Senior tranche LP token (AA)
* Junior = Junior tranche LP token (BB)

The ABI of the Yield Tranches contract can be found here: [JSON](https://github.com/Idle-Labs/idle-tranches/blob/master/abi/IdleCDO.json).

### Clearpool

**USDT (Portofino)**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>cp_POR_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x8771128e9E386DC8E4663118BB11EA3DE910e528">0x8771128e9E386DC8E4663118BB11EA3DE910e528</a></td></tr><tr><td>Senior</td><td>AA_cp_POR_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x8552801C75C4f2b1Cac088aF352193858B201D4E">0x8552801C75C4f2b1Cac088aF352193858B201D4E</a></td></tr><tr><td>Junior</td><td>BB_cp_POR_USDT</td><td><a href="https://optimistic.etherscan.io/address/0xafbAeA12DE33bF6B44105Eceecec24B29163077c">0xafbAeA12DE33bF6B44105Eceecec24B29163077c</a></td></tr></tbody></table>

**USDT (Fasanara)**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>cp_FAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x94e399Af25b676e7783fDcd62854221e67566b7f">0x94e399Af25b676e7783fDcd62854221e67566b7f</a></td></tr><tr><td>Senior</td><td>AA_cp_FAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x50ba0c3f940f0e851f8e30f95d2a839216ec5ec9">0x50BA0c3f940f0e851f8e30f95d2A839216EC5eC9</a></td></tr><tr><td>Junior</td><td>BB_cp_FAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x7038d2a5323064f7e590eadc0e8833f2613f6317">0x7038D2A5323064f7e590EADc0E8833F2613F6317</a></td></tr></tbody></table>

**USDC (Wincent)**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>cp_WINC_USDC</td><td><a href="https://optimistic.etherscan.io/address/0xe49174f0935f088509cca50e54024f6f8a6e08dd">0xe49174F0935F088509cca50e54024F6f8a6E08Dd</a></td></tr><tr><td>Senior</td><td>AA_cp_WINC_USDC</td><td><a href="https://optimistic.etherscan.io/address/0x6ab470a650e1e0e68b8d1c0f154e78ca1a7147bf">0x6AB470a650E1E0E68b8D1C0f154E78ca1a7147BF</a></td></tr><tr><td>Junior</td><td>BB_cp_WINC_USDC</td><td><a href="https://optimistic.etherscan.io/address/0xb1ad1e9309e5f10982d9bf480bc241580ccc4b02">0xB1aD1E9309e5f10982d9bf480bC241580ccc4b02</a></td></tr></tbody></table>

**USDT (Bastion)**

<table><thead><tr><th width="98.33333333333331">Side</th><th width="197">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>CDO</td><td>cp_BAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x67D07aA415c8eC78cbF0074bE12254E55Ad43f3f">0x67D07aA415c8eC78cbF0074bE12254E55Ad43f3f</a></td></tr><tr><td>Senior</td><td>AA_cp_BAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x8324cb085ffdce6256c2aee4a63bc878870ff04d">0x8324cB085Ffdce6256C2aEe4a63Bc878870Ff04d</a></td></tr><tr><td>Junior</td><td>BB_cp_BAS_USDT</td><td><a href="https://optimistic.etherscan.io/address/0x9837cc130fb339fab85dc09e9de6343b3324246f">0x9837cC130FB339FAB85Dc09E9de6343b3324246F</a></td></tr></tbody></table>

**USDC.e (Wincent)**

<table><thead><tr><th width="211">Ticker</th><th>Address</th></tr></thead><tbody><tr><td>cp_WINC_USDC.e</td><td><a href="https://optimistic.etherscan.io/address/0xa26b308B2386DBd906Cf1F8a653ca7d758f301B3">0xa26b308B2386DBd906Cf1F8a653ca7d758f301B3</a></td></tr><tr><td>AA_cp_WINC_USDC.e</td><td><a href="https://optimistic.etherscan.io/address/0xb00BbFD1bD0ee3EefF953FA02cdBe4A55BaaC55f">0xb00BbFD1bD0ee3EefF953FA02cdBe4A55BaaC55f</a></td></tr><tr><td>BB_cp_WINC_USDC.e</td><td><a href="https://optimistic.etherscan.io/token/0x0BD3cC920926472606bAe4CE479430df18E99F75">0x0BD3cC920926472606bAe4CE479430df18E99F75</a></td></tr></tbody></table>


# Interface

Developers > Yield Tranches > Interface

### **IdleCDO**

The interface for the `IdleCDO` contract is the following:

```solidity
interface IdleCDO {
  function AATranche() external view returns(address);
  function BBTranche() external view returns(address);
  function AAStaking() external view returns(address);
  function BBStaking() external view returns(address);
  function strategy() external view returns(address);
  function strategyToken() external view returns(address);
  function token() external view returns(address);

  function allowAAWithdraw() external view returns(bool);
  function allowBBWithdraw() external view returns(bool);
  function fee() external view returns(uint256);
  function getApr(address _tranche) external view returns(uint256);
  function getContractValue() external view returns(uint256);
  function trancheAPRSplitRatio() external view returns(uint256);
  function getCurrentAARatio() external view returns(uint256);
  function tranchePrice(address _tranche) external view returns(uint256);
  function virtualPrice(address _tranche) external view returns(uint256);
  function getIncentiveTokens() external view returns(address[] memory);

  function depositAA(uint256) external returns(uint256);
  function depositBB(uint256) external returns(uint256);
  function withdrawAA(uint256) external returns(uint256);
  function withdrawBB(uint256) external returns(uint256);
}
```


# Methods

Developers > Yield Tranches > Methods

## Core Methods

[`AAStaking`](/developers/yield-tranches/methods/aastaking): returns the address of the StakingRewards contract for AA tranche staking.

[`BBStaking`](/developers/yield-tranches/methods/bbstaking): returns the address of the StakingRewards contract for BB tranche staking.

[`AATranche`](/developers/yield-tranches/methods/aatranche): returns the address of the AA Tranche token contract (ERC20).

[`BBTranche`](/developers/yield-tranches/methods/bbtranche): returns the address of the BB Tranche token contract (ERC20).

[`depositAA`](/developers/yield-tranches/methods/depositaa): transfers underlying from the user to the contract and mint AA tranche tokens for the user.

[`depositAARef`](/developers/yield-tranches/methods/depositaaref): transfers underlying from the user to the contract (using a referral) and mint AA tranche tokens for the user.

[`depositBB`](/developers/yield-tranches/methods/depositbb): transfers underlying from the user to the contract and mint BB tranche tokens for the user.

[`depositBBRef`](/developers/yield-tranches/methods/depositbbref): transfers underlying from the user to the contract (using a referral) and mint BB tranche tokens for the user.

[`fee`](/developers/yield-tranches/methods/fee): returns the Performance Fee.

[`getAPR`](/developers/yield-tranches/methods/getapr): returns the current APR for a tranche based on `trancheAPRSplitRatio` and the current AA ratio.

[`getContractValue`](/developers/yield-tranches/methods/getcontractvalue): calculates the current total value locked (in underlyings).

[`getCurrentAARatio`](/developers/yield-tranches/methods/getcurrentaaratio): returns the AA tranches ratio (in underlying value) considering all interest.

[`getIncentiveTokens`](/developers/yield-tranches/methods/getincentivetokens): returns an array of tokens used to incentive tranches via `StakingRewards`.

[`lastNAVAA`](/developers/yield-tranches/methods/lastnavaa): returns the last saved net asset value (TVL) for AA tranches only.

[`lastNAVBB`](/developers/yield-tranches/methods/lastnavbb): returns the last saved net asset value (TVL) for BB tranches only.

[`strategy`](/developers/yield-tranches/methods/strategy): returns the address of the lending strategy used for deploying capital.

[`strategyToken`](/developers/yield-tranches/methods/strategytoken): returns the interest bearing asset of the lending provider used in this IdleCDO (e.g. idleDAI).

[`token`](/developers/yield-tranches/methods/token): returns the underlying asset address deposited by the user (eg DAI).

[`trancheAPRSplitRatio`](/developers/yield-tranches/methods/trancheaprsplitratio): returns the set interest split ratio between senior and junior holders.

[`tranchePrice`](/developers/yield-tranches/methods/trancheprice): returns the last tranche price saved on the last smart contract interaction (it may not include interest earned since the last update, for an up to date price check the [virtualPrice](/developers/yield-tranches/methods/virtualprice) method).

[`virtualPrice`](/developers/yield-tranches/methods/virtualprice):  calculates the current tranches price considering the interest that is yet to be split (i.e. the interest generated since the last interaction done on depositXX/withdrawXX/harvest).

[`withdrawAA`](/developers/yield-tranches/methods/withdrawaa): allows a user to burn a AA tranche token and get the principal + interest back (if no emergency shutdown is in progress).

[`withdrawBB`](/developers/yield-tranches/methods/withdrawbb): allows a user to burn a BB tranche token and get the principal + interest back (if no emergency shutdown is in progress).


# AAStaking

Developers > Yield Tranches > Methods > AAstaking

This method returns the address of the StakingRewards contract for AA (Senior) tranche staking.

### Function

```solidity
function AAStaking(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="264">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address _val</code></td><td>Address of the StakingRewards contract for AA tranche staking (can be <code>address(0)</code> which means that staking is disabled for AA)</td></tr></tbody></table>


# BBStaking

Developers > Yield Tranches > Methods > BBStaking

This method returns the address of the StakingRewards contract for BB (Junior) tranche staking.

### Function

```solidity
function BBStaking(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="247">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address _val</code></td><td>Address of the StakingRewards contract for BB tranche staking (can be address(0) which means that staking is disabled for BB)</td></tr></tbody></table>


# AATranche

Developers > Yield Tranches > Methods > AATranche

This method returns the address of the AA (Senior) tranche token contract (ERC20).

### Function

```solidity
function AATranche(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="252">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address _val</code></td><td>Address of the AA Tranche token contract (ERC-20)</td></tr></tbody></table>


# BBTranche

Developers > Yield Tranches > Methods > BBTranche

This method returns the address of the BB (Junior) tranche token contract (ERC20).

### Function

```solidity
function BBTranche(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="259">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>address _val</code></td><td>Address of the BB Tranche token contract (ERC-20)</td></tr></tbody></table>


# depositAA

Developers > Yield Tranches > Methods > depositAA

This method transfers `token` from the user to the contract and mint AA (Senior) tranche tokens for the user.

`msg.sender` should approve this contract first to spend `_amount` of `token`

### Function

```solidity
function depositAA(
    uint256 _amount
) external returns (uint256)
```

### Parameters

<table><thead><tr><th width="303">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>Amount of <code>token</code> to deposit</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="307">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>AA tranche tokens minted</td></tr></tbody></table>


# depositAARef

Developers > Yield Tranches > Methods > depositAARef

This method transfers `token` from the user to the contract and mint AA (Senior) tranche tokens for the user. It gives also the possibility to add a referral address.&#x20;

`msg.sender` should approve this contract first to spend `_amount` of `token`

### Function

```solidity
function depositAARef(
    uint256 _amount
    address _referral
) external returns (uint256)
```

### Parameters

<table><thead><tr><th width="303">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>Amount of <code>token</code> to deposit</td></tr><tr><td><code>_referral</code></td><td>Referral address</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="307">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>AA tranche tokens minted</td></tr></tbody></table>


# depositBB

Developers > Yield Tranches > Methods > depositBBnonpayable

This method transfer `token` from the user to the contract and mint BB (Junior) tranche tokens for the user.

`msg.sender` should approve this contract first to spend `_amount` of `token`

### Function

```solidity
function depositBB(
    uint256 _amount
) external returns (uint256)
```

### Parameters

| Parameter | Description                  |
| --------- | ---------------------------- |
| `_amount` | Amount of `token` to deposit |

### Return values

<table><thead><tr><th width="273">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>BB tranche tokens minted</td></tr></tbody></table>


# depositBBRef

Developers > Yield Tranches > Methods > depositBBRef

This method transfers `token` from the user to the contract and mint BB (Junior) tranche tokens for the user. It gives also the possibility to add a referral address.&#x20;

`msg.sender` should approve this contract first to spend `_amount` of `token`

### Function

```solidity
function depositBBRef(
    uint256 _amount
    address _referral
) external returns (uint256)
```

### Parameters

<table><thead><tr><th width="303">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>Amount of <code>token</code> to deposit</td></tr><tr><td><code>_referral</code></td><td>Referral address</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="307">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>BB tranche tokens minted</td></tr></tbody></table>


# fee

Developers > Yield Tranches > Methods > fee

This method returns the Performance fee.

### Function

```solidity
function fee(
) external view returns(uint256);
```

### Return values

<table><thead><tr><th width="264">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>The performance fee (relative to FULL_ALLOC where 100% is <code>100000</code>)</td></tr></tbody></table>


# getApr

Developers > Yield Tranches > Methods > getAPR

This method returns the current apr for a tranche based on `trancheAPRSplitRatio` and the provided AA (Senior) ratio.

### Function

```solidity
function getApr(
    address _tranche
) external view returns (uint256);
```

### Parameters

<table><thead><tr><th width="276">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_tranche</code></td><td>AA or BB Tranche token address</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="278">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>APR for the specific tranche</td></tr></tbody></table>


# getContractValue

Developers > Yield Tranches > Methods > getContractValue

This method calculates the current total value locked (in `token` terms).

{% hint style="info" %}
**Note 1**: `unclaimedFees`are not included in the contract value.

**Note 2**: fees that *will* be taken (in the next `_updateAccounting` call) are counted
{% endhint %}

### Function

```solidity
function getContractValue(
) external view returns (uint256)
```

### Return values

<table><thead><tr><th width="270">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>TVL (is the sum of unlent balance in the contract + the balance in lending - the reduction for harvested rewards - unclaimedFee)</td></tr></tbody></table>

{% hint style="info" %}
Unlent balance (`unlentPerc`) is currently set at 2% of the total funds.&#x20;
{% endhint %}


# getCurrentAARatio

Developers > Yield Tranches > Methods > getCurrentAARatio

This method returns the AA (Senior) tranches ratio (in underlying value) considering all interest.

### Function

```solidity
function getCurrentAARatio(
) external view returns (uint256)
```

### Return values

<table><thead><tr><th width="258">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>Current AA tranche split ratio</td></tr></tbody></table>


# getIncentiveTokens

Developers > Yield Tranches > Methods > getIncentiveTokens

This method returns an array of tokens used to incentive tranches via `IdleCDOTrancheRewards`.

### Function

```solidity
function getIncentiveTokens(
) external view returns (address[] memory)
```

### Return values

<table><thead><tr><th width="267">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>incentiveTokens</code></td><td>Array with addresses of incentiveTokens (can be empty)</td></tr></tbody></table>


# lastNAVAA

Developers > Yield Tranches > Methods > lastNAVAA

This method returns the last saved net asset value (TVL) for AA (Senior) tranches only.

### Function

```solidity
function lastNAVAA(
) external view returns(uint256);
```

### Return values

<table><thead><tr><th width="247">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>last saved net asset value (in <code>token</code>) for AA tranches</td></tr></tbody></table>


# lastNAVBB

Developers > Yield Tranches > Methods > lastNAVBB

This method returns the last saved net asset value (TVL) for BB (Junior) tranches only.

### Function

```solidity
function lastNAVBB(
) external view returns(uint256);
```

### Return values

<table><thead><tr><th width="276">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>last saved net asset value (in <code>token</code>) for BB tranches</td></tr></tbody></table>


# strategy

Developers > Yield Tranches > Methods > strategy

This method returns the address of the lending strategy used for deploying capital.

### Function

```solidity
function strategy(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="270">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>Address of the strategy used to lend funds.</td></tr></tbody></table>


# strategyToken

Developers > Yield Tranches > Methods > strategyToken

This method returns the interest bearing asset of the yield source used in the specific IdleCDO (e.g. idleDAI, stETH, ...).

### Function

```solidity
function strategyToken(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="266">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>Address of the strategy token which represent the position in the lending provider</td></tr></tbody></table>


# token

Developers > Yield Tranches > Methods > token

This method returns the underlying asset address deposited by the user (e.g. DAI).

### Function

```solidity
function token(
) external view returns(address);
```

### Return values

<table><thead><tr><th width="242">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>Underlying token address (e.g. DAI)</td></tr></tbody></table>


# trancheAPRSplitRatio

Developers > Yield Tranches > Methods > trancheAPRSplitRatio

This method returns the set interest split ratio between the Senior and Junior holders.

### Function

```solidity
function trancheAPRSplitRatio(
) external view returns(uint256);
```

### Return values

<table><thead><tr><th width="276">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_val</code></td><td>Percentage of interest that will go to AA tranche holders (where 100% is <code>100000</code>)</td></tr></tbody></table>


# tranchePrice

Developers > Yield Tranches > Methods > tranchePrice

This method returns the last tranche price saved on the last smart contract interaction (it may not include interest earned since the last update. For an up-to-date price, check the [virtualPrice](/developers/yield-tranches/methods/virtualprice) method).

### Function

```solidity
function tranchePrice(
    address _tranche
) external view returns (uint256)
```

### Parameters

<table><thead><tr><th width="264">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_tranche</code></td><td>Tranche address</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="266">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_tranchePrice</code></td><td><p>Last saved tranche price. </p><p>This price gets updated right before each deposit and redeems call in order to split the interest accrued since the last interaction. </p></td></tr></tbody></table>


# virtualPrice

Developers > Yield Tranches > Methods > virtualPrice

This method calculates the current tranches price considering the interest that is yet to be split (i.e. the interest generated since the last interaction done on depositXX/withdrawXX/harvest).

This should always be $$\geq$$ of `tranchePrice`

### Function

```solidity
function virtualPrice(
    address _tranche
) public view returns (uint256 _virtualPrice)
```

### Parameters

<table><thead><tr><th width="293">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_tranche</code></td><td>Address of the requested tranche</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="297">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_virtualPrice</code></td><td>Tranche price considering all interest since last interaction</td></tr></tbody></table>


# withdrawAA

Developers > Yield Tranches > Methods > withdrawAA nonpayable

This method allows a user to burn a AA (Senior) tranche token and get the principal and interests back (if no emergency shutdown is in progress).

### Function

```solidity
function withdrawAA(
    uint256 _amount
) external returns (uint256)
```

### Parameters

<table><thead><tr><th width="263">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>Amount of AA tranche tokens to burn</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="265">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_withdraw</code></td><td>Underlying tokens redeemed</td></tr></tbody></table>


# withdrawBB

Developers > Yield Tranches > Methods > withdrawBB

This method allows a user to burn a BB (Junior) tranche token and get the principal and interests back (if no emergency shutdown is in progress).

### Function

```solidity
function withdrawBB(
    uint256 _amount
) external returns (uint256)
```

### Parameters

<table><thead><tr><th width="283">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>_amount</code></td><td>Amount of BB tranche tokens to burn</td></tr></tbody></table>

### Return values

<table><thead><tr><th width="288">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>_withdraw</code></td><td>Underlying tokens redeemed</td></tr></tbody></table>


# Integration example

Developers > Yield Tranches > Integration example

## Routing Contract

One way for external protocols to integrate Yield Tranches is to create a Routing Contract around the [`IdleCDO`](https://github.com/Idle-Labs/idle-tranches/blob/master/contracts/IdleCDO.sol) contracts.

{% hint style="info" %}
Integrators use a routing contract to keep track of users' deposits in Yield Tranches originally made through their platforms.
{% endhint %}

### How it works

1. Users deposit funds into the Routing Contract
2. The Routing contract moves funds deposited into the [`IdleCDO`](https://github.com/Idle-Labs/idle-tranches/blob/master/contracts/IdleCDO.sol) contracts on behalf of users
3. IdleCDO contract issues `IdleCDO_AA_StrategyName` (if Senior tranche) or `IdleCDO_BB_StrategyName` (if Junior tranche) tokens to users

### Example

An example of a Routing contract used by [ShapeShift](https://shapeshift.com/) to integrate Best Yield and Yield Tranches, with related tests, is available [on GitHub](https://github.com/shapeshift/idle-router).

### Integrators program

Protocols deploying funds into the Yield Tranches are eligible to join the [Integrators program](/products/get-involved/integrators-program).


# Edge cases

Developers > Yield Tranches > Edge cases

In this section, we explain the Yield Tranches (YTs) risk situations, whether they are managed and covered automatically, and what the procedure is case by case.

### What if the underlying protocols’ contracts are hacked?&#x20;

Each YT contract (called `IdleCDO`) has an underlying token managed (e.g. DAI) and an associated interest-bearing asset (e.g. `idleDAI`) which is used through a specific strategy.

{% hint style="warning" %}
If the interest-bearing asset price decreases over time, this means that the underlying related protocol (accessed through a “strategy”) is hacked, and the YTs contract is automatically "paused", thus no redeems or deposits are allowed until the Idle governance reactivates those selectively (first for the Senior tranches).
{% endhint %}

### What if the YTs contract is hacked?&#x20;

If the YTs contract is hacked, there are no automatic triggers to block subsequent deposits and redeems. Nevertheless, the contract owner (currently the Idle Dev League multisig) or the Guardian can still pause the contract.

{% hint style="warning" %}
If the contract is manually paused or, in general, if Idle suffers an attack that is not automatically managed, and there are any funds left, those will get distributed to Senior holders first.
{% endhint %}

### Up to which amount are the Senior Tranches covered?&#x20;

Senior Tranches are first in line to be repaid in case of default, while Junior holders have a second lien or no lien at all in case of fund losses.&#x20;

The loss for Senior Tranches is covered by the Junior TVL.

> Let's imagine having $100m deposited in Senior Tranches and $400m deposited in Junior Tranches, for a total of $500m of the pool. In a hacking scenario, Senior tranches will be covered up to $400m (namely the Junior TVL) of losses; this means having coverage of 400% of the funds deposited in Senior and up to 80% coverage of pool hacks.

{% hint style="warning" %}
If a hack occurs, full protection for Senior Tranches happens only if there will be enough funds deposited in the Junior tranche to cover the hack.
{% endhint %}


# Security management policy

Developers > Yield Tranches > Security management policy

## Yield Tranches

The implementation for each Tranche can be upgraded through a shared Proxy Admin, which is [`0x9438904ABC7d8944A6E2A89671fEf51C629af351`](https://etherscan.io/address/0x9438904abc7d8944a6e2a89671fef51c629af351).

The owner of the Proxy Admin and of Yield Tranches' contracts  is the `Treasury League Multisig`, which is [`0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814`](https://etherscan.io/address/0xFb3bD022D5DAcF95eE28a6B07825D4Ff9C5b3814).

### Additional functions

As part of the Security Management policy, there is one more function in the `IdleCDO` contract.

{% tabs %}
{% tab title="Pause Guardian" %}
The pause guardian can pause, unpause and call `emergencyShutdown`. YTs contracts can be paused during emergency situations.

<table><thead><tr><th width="209">Product</th><th>Guardian</th></tr></thead><tbody><tr><td>Yield Tranches</td><td><a href="https://etherscan.io/address/0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f">Hypernative</a> pauser multisig</td></tr></tbody></table>

where&#x20;

* Hypernative pauser multisig has a 2/5 threshold\
  [`0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f`](https://etherscan.io/address/0xBaeCba470C229984b75BC860EFe8e97AE082Bb9f)

The guardian can be changed at any time by the governance with a proposal.
{% endtab %}
{% endtabs %}


# Subgraph

Developers > Yield Tranches > Subgraph

Idle uses a [subgraph](https://thegraph.com/docs/about/introduction#what-the-graph-is) for indexing and organizing data from the Yield Tranches `IdleCDO` smart contract. This subgraph can be found on The Graph hosted service and can be used to query Idle YTs data:

* **YTs subgraph** <https://thegraph.com/hosted-service/subgraph/samster91/idle-tranches>
* **Graphql endpoint**
  * Ethereum <https://api.thegraph.com/subgraphs/name/samster91/idle-tranches>
  * Polygon zkEVM [https://api.studio.thegraph.com/query/12583/idle-tranches-zkevm/version/latest ](<https://api.studio.thegraph.com/query/12583/idle-tranches-zkevm/version/latest >)
  * Optimism <https://api.thegraph.com/subgraphs/name/samster91/idle-tranches-optimism>
* **Code** <https://github.com/Idle-Labs/idle-tranches-subgraph>

<figure><img src="/files/SojJscaIqlPBnuAbHZ00" alt=""><figcaption></figcaption></figure>

### Useful entities

* ***TrancheInfos*****:** contains the data of each YTs tranche (type, apr, `virtualPrice`, `totalSupply`) updated every hour
* ***Tranche*****:** all deployed YTs tranches (id, type)

### Querying YTs

{% hint style="info" %}
Subgraph is case-sensitive. Remember to use all lowercase when inputting tranches' addresses.&#x20;
{% endhint %}

#### Example 1

To obtain the latest *TrancheInfos* you can use the following query

```graphql
{ 
    trancheInfos(orderBy:"timeStamp", orderDirection:"desc") { 
        id
        apr
        Tranche { 
            id 
        }
        timeStamp
        blockNumber
        totalSupply
        virtualPrice
    }
}
```

#### Example 2

To obtain the latest *TrancheInfos* for a specific tranche add a `where` filter. Let's query for example the Clearpool Portofino DAI Senior tranche `0xfc96989b3df087c96c806318436b16e44c697102`

```graphql
{ 
    trancheInfos(orderBy:"timeStamp", orderDirection:"desc", 
                 where:{ Tranche:"0xfc96989b3df087c96c806318436b16e44c697102" }) { 
        id
        apr
        Tranche { 
            id 
            CDO {
              id
            }
        }
        timeStamp
        blockNumber
        totalSupply
        virtualPrice
    }
}
```

For more info about GraphQL API, check [TheGraph Documentation](https://thegraph.com/docs/en/developer/graphql-api/).


# API

Developers > API

### Authentication&#x20;

For authentication, users need to use the Bearer authentication scheme by adding the following header to their request: **Authorization** -> Bearer `<token>`.

{% hint style="info" %}
To request full access to the APIs please fill out [this form](https://idlefinance.typeform.com/to/CzRkDH).
{% endhint %}

### Network endpoints

Idle's smart contracts are deployed on multiple networks, hence users should use the appropriate endpoint to retrieve the information needed

* Ethereum `https://api.idle.finance`&#x20;
* Polygon zkEVM `https://api-zkevm.idle.finance`
* Optimism `https://api-optimism.idle.finance`&#x20;

### Endpoints

### pools

<mark style="color:blue;">`GET`</mark> `api.idle.finance`return all the network pools for both Best Yield and Yield Tranches vaults.&#x20;

#### Headers

<table><thead><tr><th width="223">Name</th><th width="189">Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;token><mark style="color:red;">*</mark></td><td></td><td>Authentication using Bearer token</td></tr></tbody></table>

## tvls

<mark style="color:blue;">`GET`</mark> `api.idle.finance`return the total value locked (TVL) per underlying token.

#### Headers

<table><thead><tr><th width="224">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;token><mark style="color:red;">*</mark></td><td>String</td><td>Authentication using Bearer token</td></tr></tbody></table>

## rates

<mark style="color:blue;">`GET`</mark> `api.idle.finance`return historical daily data for Best Yield vaults in a given calendar range.&#x20;

#### Path parameters

<table><thead><tr><th width="225">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;address><mark style="color:red;">*</mark></td><td>String</td><td>Underlying token address</td></tr></tbody></table>

#### Query parameters

<table><thead><tr><th width="227">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;params></td><td>String</td><td><a href="#less-than-params-greater-than">Params</a> to filter data</td></tr><tr><td>frequency</td><td>86400</td><td>Seconds in one day</td></tr></tbody></table>

#### Headers

<table><thead><tr><th width="226">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>&#x3C;token><mark style="color:red;">*</mark></td><td>String</td><td>Authentication using Bearer token</td></tr></tbody></table>

{% tabs %}
{% tab title="<params>" %}
The query string params are:

* `start`: filter results from a specific timestamp
* `end`: filter results to a specific timestamp
* `isRisk` (true/false): if true returns only results for risk-adjusted strategy (deprecated), if false returns only results for Best Yield vaults
* `frequency`: seconds between two records
* `order` (asc/desc): order results by timestamp
* `limit`: limit results
  {% endtab %}

{% tab title="<address>" %}
Represents the underlying token address:

* DAI: `0x6b175474e89094c44da98b954eedeac495271d0f`
* USDC: `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`
* USDT: `0xdac17f958d2ee523a2206206994597c13d831ec7`
* WETH: `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`
  {% endtab %}
  {% endtabs %}

### Request examples

* Return historical daily data for the Best Yield DAI vault from 22 July 2020 to 24 July 2020 in descending order.

{% code overflow="wrap" %}

```html
https://api.idle.finance/rates/0x6b175474e89094c44da98b954eedeac495271d0f?start=1595412616&end=1595581466&isRisk=false&frequency=86400&order=desc
```

{% endcode %}

* Return the latest data for Best Yield DAI vault.&#x20;

<pre data-overflow="wrap"><code><strong>https://api.idle.finance/rates/0x6b175474e89094c44da98b954eedeac495271d0f?isRisk=false&#x26;order=desc&#x26;limit=1
</strong></code></pre>

* Return the available Yield Tranches on Polygon zkEVM

{% code title="cURL" overflow="wrap" %}

```javascript
curl -H "Authorization: Bearer YOUR_TOKEN" "https://api-zkevm.idle.finance/pools"
```

{% endcode %}

{% code title="Axios" %}

```javascript
const data = await axios
  .get("https://api-zkevm.idle.finance/pools", {
    headers:{ Authorization: `Bearer YOUR_TOKEN` }
  })
  .catch(err => {
    // Handle request error
  });
```

{% endcode %}

{% code title="Request" %}

```javascript
const request = require('request');

const apiUrl = 'https://api-zkevm.idle.finance/pools';
const accessToken = 'YOUR_TOKEN';

const options = {
  url: apiUrl,
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${accessToken}`
  },
};

request(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(response.statusCode);
    console.log(body);
  }
});
```

{% endcode %}


# Security

Developers > Security


# Hats Finance vault

Developers > Security > Hats Finance vault

In July 2022, Idle opened a vault on Hats Finance as a new form of **bug bounty** for its protocols. Idle DAO voted in favour of the official [Governance proposal](https://gov.idle.finance/t/bug-bounty-vault-proposal-by-hats-finance/996) through a Snapshot poll.

:arrow\_right:[Bug bounty vault link](https://app.hats.finance/bug-bounties/idlefinance-0xda25de498845b30e05d6a766350a9dc96ef1986f38922b77038208ac73b17608/rewards)

<figure><img src="/files/whvTM01IQxwxG3SjdSPk" alt=""><figcaption></figcaption></figure>


# Hypernative monitoring

Developers > Security > Hypernative monitoring

<figure><img src="/files/LJQrspiyOZThWo7grlGh" alt=""><figcaption></figcaption></figure>

[Idle has partnered with Hypernative](https://gov.idle.finance/t/security-management-policy-update-and-hypernative-integration/1187) to offer cutting-edge and customized security alerts for Yield Tranches and Best Yield vaults for full-spectrum proactive threat response and prevention.&#x20;

[Hypernative](https://www.hypernative.io/) is a Web3 real-time security and risk prevention platform that prevents zero-day cyber-attacks and financial risks, all while monitoring on-chain anomalies to safeguard digital assets, protocols, and dApps.


# Immunefi bug bounty

Developers > Security > Immunefi bug bounty

<figure><img src="/files/q2eUcUJrBvlcUgY6GN8K" alt=""><figcaption></figcaption></figure>

### Report an issue

To report a security issue, visit our bug bounty program on the [Immunefi website](https://immunefi.com/bounty/idlefinance/) and file a report there.

![](/files/irvYJHdxWcy69RK78zBn)

The Immunefi team will send a response indicating the next steps in handling your report.

After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement and may ask for additional information or guidance.

{% embed url="<https://immunefi.com/bounty/idlefinance>" %}


# Integration Standard Requirements

Developers > Security > Integration Standard Requirements

The [Security](#security) and [Resiliency](#resiliency) tables show the requirements to onboard a new yield source or an asset in the [Best Yield](/developers/best-yield) strategies.

{% hint style="info" %}
The Integration Standard Requirements made part of a due diligence process to evaluate new possible yield improvements.
{% endhint %}

### **Security**&#x20;

| Metrics                                                                                                                    | Minimum requirement                                     |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| Has a reputable company audited contracts, or are they fork of audited projects?                                           | 1 custom audit                                          |
| Months of activities since last contract update                                                                            | 3 months                                                |
| Are contracts immutable or upgradeable by admins? If upgradable, how many admins control the keys, and are they anonymous? | Immutable preferred, but answers evaluated case by case |
| Is there an emergency exit plan?                                                                                           | Evaluated case by case                                  |
| Are there protocol dependences?                                                                                            | Evaluated case by case                                  |
| Has the protocol/asset suffered losses in the past?                                                                        | Evaluated case by case                                  |

### **Resiliency**

| Metrics                                             | Minimum requirement                    |
| --------------------------------------------------- | -------------------------------------- |
| Current protocol TVL or asset market capitalization | $ 50M+                                 |
| Expected TVL or market capitalization in 3 months   | $ 100M+                                |
| Current protocol's or supported service' APYs       | +30% than Idle 30-day strategy average |
| Expected impact on APY when deploying Idle TVL      | Less than 10% change                   |


# Risk Framework

Developers > Security > Risk Framework

This framework aims to standardize analyses of new underlying markets to be integrated into [Yield Tranches](/products/yield-tranches) and [Best Yield](/products/best-yield) by quantifying and assessing the risks related to new underlying strategies. It is composed of four sections that lead to a final rating.&#x20;

* [Structure](#structure)
  * [Third-party review](#1.-third-party-review)
  * [Internal Security review](#2.-internal-security-review)
  * [Strategy review](#3.-strategy-review)
  * [Coverage](#4.-coverage)
* [Risk rating](#risk-rating)

Risks affecting DeFi protocols can be segregated into **systemic risks** or risks that impact a large part or all of the DeFi ecosystem such as currency, regulatory and chain risks, and **idiosyncratic risks** or risks that impact a single protocol or group of protocols, such as smart contract, governance, market, financial and oracle risks.

<table><thead><tr><th width="208">Risk</th><th>Metrics</th></tr></thead><tbody><tr><td>Smart contract</td><td>Immutable or upgradeable SC, audits, track record of auditors, number of hacks and third-party protocol dependencies</td></tr><tr><td>Governance</td><td>Team transparency, admin keys control, level of governance concentration and governance-related issues, emergency exit plan</td></tr><tr><td>Market &#x26; Financial</td><td>Total Value Locked, complexity, longevity, tokenomics</td></tr><tr><td>Oracle</td><td>Oracle dependencies, oracle fallbacks</td></tr></tbody></table>

## Structure

The framework is constituted of four parts:

1. [**Third-party review** ](#1.-third-party-review)\
   (33%) considering the reports of [DeFi Safety](https://defisafety.com/app) and [Exponential](https://exponential.fi/pools/search). These reviews will ensure that part of the risk rating will be based on independent analyses, avoiding any centralization issue that could affect Idle’s risk-scoring impartiality.
2. [**Internal Security review** ](#2.-internal-security-review)\
   (33%) focusing on [Protocols risks](https://gov.idle.finance/t/risk-framework-version-1/1143#Protocol-risks) from a smart contract, governance and market perspective. This review will be done by Idle DAO based on publicly available information and will use the same metrics for every protocol analyzed.
3. [**Strategy review** ](#3.-strategy-review)\
   (34%) assessing the risks of each specific vertical, such as overcollateralized lending, uncollateralized lending, automated market makers, liquid staking and more.
4. [**Coverage** ](#4.-coverage)\
   measuring the minimum coverage needed to let the Best Yield deposit funds into the Yield Tranches pools.

### 1. Third-party review

The DeFi Safety and Exponential scores consider the vast majority of the Protocol risks related to Idiosyncratic risks:

{% tabs %}
{% tab title="DeFi Safety metrics" %}
The DeFi Safety score will be time-adjusted, considering when the report was last updated. The older the analysis, the lower the score.

Components:

* Smart contracts and team
* Documentation
* Testing
* Security
* Admin controls
* Oracles
  {% endtab %}

{% tab title="Exponential metrics" %}
where *PF* stands for Protocol fundamentals and *PE* for Pool economics.

Components:

* (PF) Asset strength
* (PF) Protocol code quality
* (PF) Protocol maturity
* (PF) Protocol design
* (PF) Chain design
* (PE) Collateralization and leverage
* (PE) Impermanent loss
* (PE) Yield outlook
* (PE) Chain reliability
  {% endtab %}
  {% endtabs %}

### 2. Internal Security review

This review mainly focuses on smart contracts and market/financial risks.

<table><thead><tr><th width="235">Type</th><th>Description</th></tr></thead><tbody><tr><td>Audit</td><td>Number of audits and quality of auditors</td></tr><tr><td>Bad debt, LP losses</td><td>Severity of losses incurred, if any (% vs TVL)</td></tr><tr><td>Bug bounty, Insurance</td><td>Size of bug bounty program</td></tr><tr><td>Protocol TVL</td><td>Total value locked across all chains (average since protocol inception)</td></tr><tr><td>Pool TVL</td><td>Total value locked on Ethereum (average since pool inception)</td></tr><tr><td>Protocol longevity</td><td>Months of activity</td></tr><tr><td>Pool longevity</td><td>Months of activity</td></tr></tbody></table>

### 3. Strategy review

The Strategy component refers to specific risks related to each underlying market integrated into Idle strategies. The strategy score will be composed of a fixed parameter associated with the vertical and a score associated with thematic risks.

**Current underlying sources**

* Best Yield: Aave, Compound and either Senior or Junior tranches.
* Yield Tranches: Euler, Morpho, Lido and Clearpool.

<table><thead><tr><th width="249">Vertical</th><th>Metric</th></tr></thead><tbody><tr><td>Overcollateralized lending</td><td>Collateral fully diluted value (FDV)</td></tr><tr><td></td><td>Maximum borrowed amount</td></tr><tr><td>Uncollateralized lending</td><td>Credora's borrower capacity</td></tr><tr><td></td><td>Credora's borrower rating</td></tr><tr><td>Liquid staking</td><td>Validator concentration</td></tr><tr><td></td><td>Validators key management</td></tr></tbody></table>

### 4. Coverage

The Coverage component measures **the minimum coverage needed to let the Best Yield deposit funds into the Yield Tranches pools**.&#x20;

This metric behaves differently with respect to the others listed and will be computed on a case by case need. It will be summed to the previous scores obtained with the reviews: Third-party, Internal Security and Strategy.

## Risk rating

The Risk Framework will assign a percentage score that will be then translated to a letter rating (A-E) based on the protocol risks evaluation, where

* A will be given to the highest-rated protocols in terms of overall risks
* E will be given to the lowest-rated protocols in terms of overall risks

| Rating      |   A  |  B  |  C  |  D  |  E  |
| ----------- | :--: | :-: | :-: | :-: | :-: |
| Upper bound | 100% | 85% | 70% | 55% | 40% |
| Lower bound |  85% | 70% | 55% | 40% |  0% |

{% hint style="success" %}
The Governance discussion can be found here: [Risk Framework (v1)](https://gov.idle.finance/t/risk-framework-version-1/1143)

The full analysis is available here: [Risk Framework \[PUBLIC\]](https://docs.google.com/spreadsheets/d/1vfnv49n688vYrxR9lk5ze0jCM7y2pLrCNPY0S9Yxc90/edit?usp=sharing)
{% endhint %}


# Smart contract audits

Developers > Security > Smart contracts audits

<table><thead><tr><th width="130">Date</th><th width="250">Scope</th><th width="221">Auditor</th><th>Report</th></tr></thead><tbody><tr><td>Nov 2024</td><td>Credit vaults withdraw queue</td><td><a href="https://code4rena.com/@hansfriese">Hans Friese</a></td><td><a href="https://drive.google.com/file/d/1bu-K45CsMWeIST676uEyIgTSAOImDtXe/view?usp=sharing">Link</a></td></tr><tr><td>Oct 2024</td><td>Credit vaults deposit queue</td><td><a href="https://code4rena.com/@hansfriese">Hans Friese</a></td><td><a href="https://drive.google.com/file/d/1aIGWfo1-WXTgE3DfLfZYyJ6NNs8-esNT/view?usp=sharing">Link</a></td></tr><tr><td>Oct 2024</td><td>Credit vaults</td><td><a href="https://code4rena.com/@hansfriese">Hans Friese</a></td><td><a href="https://drive.google.com/file/d/1rTfKCkQbhVEk6qgYsluuHD2acXRxA4e1/view?usp=sharing">Link</a></td></tr><tr><td>Aug 2024</td><td>Credit vaults</td><td><a href="https://code4rena.com/@hansfriese">Hans Friese</a></td><td><a href="https://drive.google.com/file/d/1nr5kvwheKoYBDWe4M5DotKcapHWoqFSh/view?usp=sharing">Link</a></td></tr><tr><td>Oct 2023</td><td><a href="/pages/iC3dddbydnvWikphBVWe">Tranches</a> vaults v2</td><td><a href="https://hats.finance/">Hats Finance</a></td><td><a href="https://drive.google.com/file/d/1OC3TEhRQNeHrVSdRTbrOteSrafNYXoHq/view?usp=sharing">Link</a></td></tr><tr><td>Sep 2023</td><td><a href="/pages/iC3dddbydnvWikphBVWe">Tranches</a> vaults v2</td><td><a href="https://code4rena.com/@hansfriese">Hans Friese</a></td><td><a href="https://drive.google.com/file/d/12q-79KRkB9r2zPjyztFRYVBo1ynb-FFn/view?usp=sharing">Link</a></td></tr><tr><td>Oct 2021</td><td><a href="/pages/iC3dddbydnvWikphBVWe">Tranches</a> vaults</td><td><a href="https://www.certik.com/">Certik</a></td><td><a href="https://skynet.certik.com/projects/idle-finance">Link</a></td></tr><tr><td>Jun 2021</td><td><a href="/pages/iC3dddbydnvWikphBVWe">Tranches</a> vaults</td><td><a href="https://consensys.io/diligence/">Consensys Diligence</a></td><td><a href="https://consensys.io/diligence/audits/2021/06/idle-finance/">Link</a></td></tr><tr><td>Apr 2021</td><td><a href="/pages/-M7IoMVVK5mJLs9egyhr">Best Yield</a> vaults</td><td><a href="https://quantstamp.com/">Quantstamp</a></td><td><a href="https://certificate.quantstamp.com/full/idle-finance.pdf">Link</a></td></tr><tr><td>Nov 2020</td><td><a href="/pages/HaaWsnu3MtfV2afLMxhs">Governance</a></td><td><a href="https://quantstamp.com/">Quantstamp</a></td><td><a href="https://certificate.quantstamp.com/full/idle-governance.pdf">Link</a></td></tr></tbody></table>


# Introduction

Governance > Introduction

<figure><img src="/files/Ow1L22h3tP4P9ZhqXSl6" alt=""><figcaption></figcaption></figure>

The Governance chapter presents useful information related to the Idle DAO processes and $IDLE token. All the key initiatives concerning Idle Governance are discussed in the [Idle Governance Forum](https://gov.idle.finance/).

{% embed url="<https://gov.idle.finance/>" %}
gov.idle.finance
{% endembed %}

## Governance index

There are three main sections in the Governance chapter:

{% content-ref url="/pages/NCESfVeuO6Jzpqu35kYp" %}
[Idle DAO](/governance/idle-dao)
{% endcontent-ref %}

With a focus on Idle DAO [governance processes](https://docs.idle.finance/governance/pages/HaaWsnu3MtfV2afLMxhs#1.-idea-discussion) and [Idle Leagues](/governance/idle-dao/idle-leagues) structure.

{% content-ref url="/pages/-MMH8WaIh5OgVSqjbigt" %}
[IDLE token](/governance/idle)
{% endcontent-ref %}

With a focus on $IDLE token, its [distribution](/governance/idle/distribution) and [use cases](/governance/idle/use-cases).&#x20;




---

[Next Page](/llms-full.txt/1)

