Shadow Arena #010: Tokemak v2
Tokemak v2 is a sibling-architecture vault system. LMPVault (Autopilot Vault) sits in front of multiple DestinationVaults, each wrapping a Curve, Balancer, or Maverick LP position. The accounting model splits totalIdle and totalDebt, runs a permissionless updateDebtReporting cycle to value LP positions via oracles, and mints management/performance fees as new shares. This is not a Yearn V2 fork. It re-derives many of the same patterns Yearn uses (debt reporting, locked-profit smoothing, fee-as-share-mint), and re-derives some of the same bugs.
Scope (3700 SLOC)
| File | SLOC |
|---|---|
| src/vault/LMPVault.sol | 600 |
| src/vault/DestinationVault.sol | 400 |
| src/vault/LMPVaultRouter.sol | 300 |
| src/destinations/ | 800 |
| src/oracles/ | 500 |
| src/rewarders/ | 300 |
| src/strategy/ | 400 |
| src/liquidation/ | 250 |
| src/SystemRegistry.sol | 150 |
Documentation
Part of the Uniswap V2 Path
This shadow audit connects to the Uniswap V2 Build module. Students who completed the CFAMM build have an advantage because they understand the core architecture.
View Build Module