Shadow Arena #019: Real Wagmi
Real Wagmi's leverage engine does not fork Uniswap V3 — it borrows against the very V3 positions you learned to mint. LPs deposit concentrated-liquidity NFTs, borrowers rent that liquidity, and repayment restores it by re-swapping through the same pool. You already wrote the pool, the slot0 slot, the CREATE2 pool address, and the amounts-from-liquidity math; this contest is what happens when someone builds a lending market on top of all of it and trusts each piece a little too much. Four representative findings (2 H + 2 M).
Scope (1345 SLOC)
| File | SLOC |
|---|---|
| wagmi-leverage/contracts/LiquidityBorrowingManager.sol | 661 |
| wagmi-leverage/contracts/abstract/LiquidityManager.sol | 344 |
| wagmi-leverage/contracts/abstract/ApproveSwapAndPay.sol | 161 |
| wagmi-leverage/contracts/abstract/DailyRateAndCollateral.sol | 66 |
| wagmi-leverage/contracts/vendor0.8/uniswap/LiquidityAmounts.sol | 86 |
| wagmi-leverage/contracts/Vault.sol | 27 |
Documentation
Part of the Uniswap V3 Path
This shadow audit connects to the Uniswap V3 Build module. Students who built the concentrated-liquidity pool have an advantage because they understand tick accounting, the swap loop, fee growth, the observation oracle, and callback-based payment.
View Build Module