Implementation Path

BakerFi Leveraged Vault

Learn how BakerFi separates vault share accounting from a leveraged strategy, how the strategy calculates net assets from collateral and debt, and how deposits and withdrawals convert between assets and shares. Then audit the completed implementation and determine whether an attacker can manipulate the share price and capture a disproportionate portion of a later depositor’s assets.

DifficultyGuided
Estimated1h
Versionv0.1.0
AvailabilityAvailable

Explore how a BakerFi-style Vault issues shares while a separate leveraged Strategy manages collateral and debt. You will trace the complete deposit and withdrawal flow, understand how totalAssets() and Rebase determine share value, and then audit the finished implementation in a hands-on Foundry lab.

Path Outcome

By the end of this path, you should be able to read the vault’s accounting flow, identify its sensitive assumptions, and demonstrate a valid exploit without modifying the protocol contracts.