Developers > Best Yield > Architecture
The main smart contracts used by Idle are the following:
IdleTokenholds pooled funds of all users for a specific asset and issues ERC20 shares of the pool (IdleTokens) for each deposit.
IdleAavewrappers contract used by
IdleTokento interact with the lending protocols implemented
Idle Rebalancer automatically analyses supply rate functions across integrated protocols and total funds in the pool to constantly rebalance capital across any number of protocols to earn the highest interest rate possible with very high precision. When a new allocation can improve the aggregated APY of an IdleTokens, the Rebalancer submits new allocations to the contract.
New allocations are not enforced, but when they are submitted, any user can trigger a rebalance.
During the rebalance process,
IdleTokencontracts check if the new allocation is different and eventually accept it. This triggers a rebalance which mints or redeem the pooled funds on different lending protocols via the dedicated wrappers (
If no rebalance is triggered after some time (currently every ~3h), an off-chain bot rebalances the pool for everyone.
All Idle strategies use the same set of smart contracts, but each allocation uses a different instance of those contracts.