Shadow Arena/Shadow Arena #010: Tokemak v2
VaultAdvanced

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)

FileSLOC
src/vault/LMPVault.sol600
src/vault/DestinationVault.sol400
src/vault/LMPVaultRouter.sol300
src/destinations/800
src/oracles/500
src/rewarders/300
src/strategy/400
src/liquidation/250
src/SystemRegistry.sol150

Documentation

Part of the Yearn V2 Path

This shadow audit connects to the Yearn V2 Build module. Students who completed the vault-strategy build have an advantage because they understand locked-profit reporting, gain/loss accounting, and strategy chains.

View Build Module
Duration7 days
Total Findings6
Scope3700 SLOC
PriceFree