Building Yearn V2
Build the most-forked vault aggregator in DeFi from scratch. Multi-strategy yield allocation, dynamic debt rebalancing, locked profit degradation, first-depositor and donation defenses, and the harvest cycle that turns strategy gains into share-price growth. Every function, every invariant. Modernized to Solidity 0.8.x.
What you are building
You will write the actual Yearn V2 vault and BaseStrategy: VaultStorage, VaultShareToken with EIP-2612 permit, share math with first-depositor and donation defenses, the strategy registry and credit/debt allocation, the report cycle, locked profit degradation, the multi-strategy withdraw queue, fees paid via share dilution, emergency shutdown, and the harvest cycle on the strategy side. Two inheritance chains, eighteen sections, modernized to Solidity 0.8.x.