Developers > Perpetual Yield Tranches > Architecture
The main contract used by users is called IdleCDO which allows depositing underlyings and mint tranche tokens (ERC20), either AA or BB, and redeeming principal and interest from it.
The IdleCDO contract pools funds of users together and uses an IIdleCDOStrategy as a proxy for interacting with a Defi protocol where to deposit funds to earn interest and rewards.
Governance tokens collected as rewards, are not redistributed to users directly in the IdleCDO contract but rather sold to the market (harvest method) and the underlying reinvested in the downstream lending provider where possible.
Other tokens (e.g. IDLE that won't be sold or tokens that have no liquid markets) will get redistributed to people who staked their tranches in a separate StakingRewards or a LiquidityGauge contract usually one for AA and sometimes one for BB (for more info on Gauges see here).

Codebase and contracts

The codebase and a general overview of the architecture can be found at
These are the core contracts used:
On top of these, all the strategies (IIdleCDOStrategy) currently used can be found here
Copy link