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

Methods

Developers > Yield Tranches > Methods

Last updated 2 years ago

Was this helpful?

Core Methods

: returns the address of the StakingRewards contract for AA tranche staking.

: returns the address of the StakingRewards contract for BB tranche staking.

: returns the address of the AA Tranche token contract (ERC20).

: returns the address of the BB Tranche token contract (ERC20).

: transfers underlying from the user to the contract and mint AA tranche tokens for the user.

: transfers underlying from the user to the contract (using a referral) and mint AA tranche tokens for the user.

: transfers underlying from the user to the contract and mint BB tranche tokens for the user.

: transfers underlying from the user to the contract (using a referral) and mint BB tranche tokens for the user.

: returns the Performance Fee.

: returns the current APR for a tranche based on trancheAPRSplitRatio and the current AA ratio.

: calculates the current total value locked (in underlyings).

: returns the AA tranches ratio (in underlying value) considering all interest.

: returns an array of tokens used to incentive tranches via StakingRewards.

: returns the last saved net asset value (TVL) for AA tranches only.

: returns the last saved net asset value (TVL) for BB tranches only.

: returns the address of the lending strategy used for deploying capital.

: returns the interest bearing asset of the lending provider used in this IdleCDO (e.g. idleDAI).

: returns the underlying asset address deposited by the user (eg DAI).

: returns the set interest split ratio between senior and junior holders.

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

: allows a user to burn a AA tranche token and get the principal + interest back (if no emergency shutdown is in progress).

: allows a user to burn a BB tranche token and get the principal + interest back (if no emergency shutdown is in progress).

💻
AAStaking
BBStaking
AATranche
BBTranche
depositAA
depositAARef
depositBB
depositBBRef
fee
getAPR
getContractValue
getCurrentAARatio
getIncentiveTokens
lastNAVAA
lastNAVBB
strategy
strategyToken
token
trancheAPRSplitRatio
tranchePrice
virtualPrice
virtualPrice
withdrawAA
withdrawBB