Developers > Perpetual Yield Tranches > Architecture
The main contract used by users is called IdleCDO which allows depositing the underlying and mint tranche tokens (ERC-20), either AA or BB, and redeeming principal and interest from it.
An ERC-4626 wrapper is available for the tranche token contracts. ERC-4626 is a standard to optimize and unify the technical parameters of yield-bearing vaults.
Deployed ERC4626 wrappers can be found here
The IdleCDO contract pools users' funds together and uses IIdleCDOStrategy as a proxy for interacting with an underlying DeFi protocol to deposit funds and collect 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, if any (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 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