The main smart contracts used by Idle are the following ones:
IdleTokenV4 - holds pooled funds of all users for a specific asset and issues ERC20 shares of the pool (IdleTokens) for each deposit.
IdleDSR are all wrappers contract used by
IdleToken to interact with the lending protocols implemented
We constantly monitor APR and risk scores of every lending protocol and when new allocations can improve the main performance metric of the specific strategy chosen, we submit new allocations to the contract with our rebalance manager. Those allocations are still not enforced, but after new allocations are set every subsequent interaction with
IdleToken can potentially trigger a rebalance. During the rebalance
IdleToken checks new allocations and if those are different from the current ones then we change the pool composition accordingly, by minting and redeeming on different lending protocols via our wrappers (
IdleFulcrum, ...). If no interaction is made after some time (currently 1h) we rebalance the pool for everyone
In addition to that, anyone can also submit new allocations and rebalance the pool if needed. This type of 'open rebalance' will then check submitted allocations on-chain and if valid then those will be applied. This functionality is available for the Best Yield strategy only at the moment but it will get ported to the Risk-Adjusted strategy too.
Both Idle strategies use the same set of smart contracts, but each allocation uses a different instance of those contracts.