LogoLogo
AddressesAuditsGitHub
  • 📥Introduction
  • 🌀Products
    • Introduction
    • Best Yield
      • Overview
      • Guides
        • Deposit funds on BY
        • Redeem funds on BY
      • FAQs
    • Yield Tranches
      • Overview
      • Adaptive Yield Split
      • Security
        • Covered risks
      • Guides
        • Deposit funds on YTs
        • Redeem funds on YTs
        • Live YTs guides
          • Lido stETH
      • FAQs
    • Fee structure
    • Get involved
      • Integrators program
      • Institutions program
  • 💻Developers
    • Introduction
    • Networks and codebase
      • Ethereum mainnet
      • Polygon
      • Kovan testnet
      • ERC-4626 standard
    • Best Yield
      • Architecture
      • Deployed contracts
        • Ethereum
        • Optimism
      • Interface
      • Methods
        • mintIdleToken
        • redeemIdleToken
        • redeemInterestBearingTokens
        • rebalance
        • tokenPrice
        • tokenPriceWithFee
        • getAPRs
        • getAvgApr
        • userAvgPrices
        • getGovTokensAmounts
        • getAllocations
        • getGovTokens
        • getAllAvailableTokens
        • getProtocolTokenToGov
      • Edge cases
      • Security management policy
      • Get integrated as yield source
      • Get user earnings
    • Yield Tranches
      • Architecture
      • Deployed contracts
        • Ethereum
        • Polygon zkEVM
        • Optimism
      • Interface
      • Methods
        • AAStaking
        • BBStaking
        • AATranche
        • BBTranche
        • depositAA
        • depositAARef
        • depositBB
        • depositBBRef
        • fee
        • getApr
        • getContractValue
        • getCurrentAARatio
        • getIncentiveTokens
        • lastNAVAA
        • lastNAVBB
        • strategy
        • strategyToken
        • token
        • trancheAPRSplitRatio
        • tranchePrice
        • virtualPrice
        • withdrawAA
        • withdrawBB
      • Integration example
      • Edge cases
      • Security management policy
      • Subgraph
    • API
    • Security
      • Hats Finance vault
      • Hypernative monitoring
      • Immunefi bug bounty
      • Integration Standard Requirements
      • Risk Framework
      • Smart contract audits
  • 🏛️Governance
    • Introduction
    • Idle DAO
      • Governance process
        • Governance forum
        • Governance dashboard
        • Snapshot IDLE
        • Snapshot stkIDLE
      • Idle Leagues
        • Communication League
        • Development League
        • Treasury League
        • Leagues contributors
      • Treasury
        • Reports
      • Governance guides
        • How to monitor off-chain voting pools
        • How to propose an IIP
        • How to create an on-chain proposal
        • How to delegate votes
        • How to vote for an IIP
      • FAQs
    • IDLE token
      • Distribution
      • Use cases
        • Lending, borrowing & collateral
        • DEXs liquidity provision
      • Buybacks
      • Delegates
      • CoinGecko
    • IDLE staking
      • Prime staking
        • Examples
      • Staking integration
      • Guides
        • How to stake your IDLE
        • How to vote in Gauges
        • How to boost your $IDLE rewards
        • How to give VEV
  • 🗂️Other
    • Brand assets
    • Guides
      • How to see IDLE in your wallet
      • Deposit funds through Idle
      • Deposit funds through smart contracts
      • Redeem funds through Idle
      • Redeem funds through smart contracts
    • FAQs
    • Glossary
    • Resources
    • Archive
      • 👇Get in touch
        • 🏛️Governance Forum
        • 🏆Idle Grants Program
        • 👾Discord
        • 🐦Twitter
      • Gauges
        • Architecture
        • Deployed contracts
        • Gauges repository
        • stkIDLE repository
      • Gauges
        • Gauges integration
        • FAQs
      • Boost
      • DEXs liquidity provison
      • Risk Adjusted (deprecated)
      • Deployed contracts
      • Idle Smart Treasury (deprecated)
      • Ethereum LP staking (deprecated)
      • Polygon LP staking (deprecated)
      • Flash Loans (deprecated)
      • QuickSwap cxETH-WETH
      • Integrate PYTs
      • Idle Grants program
      • Idle on Polygon
        • Add Polygon network to MetaMask
        • Bridge $IDLE to Polygon
        • Deposit funds on Polygon
        • Add liquidity to $IDLE pools
        • Stake IDLE LP tokens on Polygon
Powered by GitBook

Ecosystem

  • Website
  • App
  • Governance
  • Brand assets

Developers

  • Feedback
  • GitHub
  • Bug bounty
  • Audits

Community

  • Blog
  • Twitter
  • Telegram
  • Discord

Analytics

  • Stats
  • Dune
  • DeFiLlama
  • CoinGecko
On this page

Was this helpful?

  1. Developers
  2. Yield Tranches

Architecture

Developers > Yield Tranches > Architecture

Last updated 1 year ago

Was this helpful?

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.

YTs are also ERC-4626 compliant! Deployed wrappers can be found

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 .

These are the core contracts used:

IdleCDO.sol

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.

When users deposit into the CDO they will:

  • update the global accounting of the system (i.e. split accrued rewards)

  • mint their chosen tranche tokens.

Funds won't get put in lending right away.

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

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

IdleCDOTranche.sol

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

On top of these, all the strategies (IIdleCDOStrategy) currently used can be found here .

💻
https://github.com/Idle-Labs/idle-tranches
https://github.com/Idle-Labs/idle-tranches/tree/master/contracts/strategies
here.