Shadow Arena/Shadow Arena #019: Real Wagmi
DEX/AMMIntermediate

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)

FileSLOC
wagmi-leverage/contracts/LiquidityBorrowingManager.sol661
wagmi-leverage/contracts/abstract/LiquidityManager.sol344
wagmi-leverage/contracts/abstract/ApproveSwapAndPay.sol161
wagmi-leverage/contracts/abstract/DailyRateAndCollateral.sol66
wagmi-leverage/contracts/vendor0.8/uniswap/LiquidityAmounts.sol86
wagmi-leverage/contracts/Vault.sol27

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
Duration4 days
Total Findings4
Scope1345 SLOC
PriceFree