# Methods

## Core Methods

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

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

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

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

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

[`depositAARef`](https://docs.idle.finance/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`](https://docs.idle.finance/developers/yield-tranches/methods/depositbb): transfers underlying from the user to the contract and mint BB tranche tokens for the user.

[`depositBBRef`](https://docs.idle.finance/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`](https://docs.idle.finance/developers/yield-tranches/methods/fee): returns the Performance Fee.

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

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

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

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

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

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

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

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

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

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

[`tranchePrice`](https://docs.idle.finance/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](https://docs.idle.finance/developers/yield-tranches/methods/virtualprice) method).

[`virtualPrice`](https://docs.idle.finance/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`](https://docs.idle.finance/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`](https://docs.idle.finance/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).
