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: lends assets in Idle and receives IdleTokens back.

redeemIdleToken: redeems your assets and interests and burns IdleTokens.

redeemInterestBearingTokens: redeems interest-bearing assets and burns IdleTokens.

rebalance: reads allocations from IdleRebalancer and changes IdleToken pool allocations if needed.

tokenPrice: gets current IdleToken price without fees.

getAPRs: gets APRs from all implemented protocols.

getAvgApr: gets current IdleToken average APR.

userAvgPrices: gets avg price per IdleToken paid by a user (used to calculate earnings).

getGovTokensAmounts: gets the number of redeemable governance tokens a user can withdraw.

getAllocations: gets an array with the last allocations.

getGovTokens: gets an array with the governance token addresses distributed.

getAllAvailableTokens: gets an array with all interest-bearing token addresses supported.

getProtocolTokenToGov: gets the governance token associated with a specific interest bearing token, if any.

tokenPriceWithFee: gets the current IdleToken price for a specific user, counting fees

Last updated