Methods

Developers > Yield Tranches > Methods

Core Methods

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

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

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

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

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

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

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

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

fee: returns the Performance Fee.

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

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

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

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

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

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

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

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

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

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

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

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: allows a user to burn a AA tranche token and get the principal + interest back (if no emergency shutdown is in progress).

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

Last updated