How cyfrin/2024-12-alchemix works
Main Components
a) Core Strategy Components:
• StrategyOp.sol (Optimism)
• StrategyMainnet.sol (Ethereum)
• StrategyArb.sol (Arbitrum)
b) External Protocol Integrations:
• Yearn V3 (Base Strategy)
• Alchemix Transmuter
• Velodrome/Uniswap (for token swaps)
• Token Contracts (WETH, alETH)
User Deposit Flow
• User → Strategy Contract → Alchemix Transmuter
• Token flow (alETH → yTokens)
Keeper Flow
• Keeper → Strategy Contract → Transmuter (claim)
• Strategy → DEX (swap)
• Circular flow of: alETH → WETH → alETH
Component Organization
• Blue rectangles: Core strategy contracts
• Green hexagons: External protocols (Yearn, Alchemix)
• Yellow diamonds: Token contracts
• Purple circles: User roles (Keeper, Owner, Manager, Depositor)
• Orange rectangles: DEX components
Specific Implementation Details
Create three parallel sections showing implementation across:
• Optimism
• Ethereum Mainnet
• Arbitrum
For each chain, show:
• Strategy contract
• Related interfaces (IAlchemist, ITransmuter, IVeloRouter)
• Chain-specific DEX implementations
Additional Elements
• Network boundaries
• Security boundaries
Notes Section
A small notes section indicating:
• nSLOC: 253
• Supported tokens
• Key dependencies
• Emergency procedures