Shadow Arena/Shadow Arena #016: Ramses Exchange V3
DEX/AMMIntermediate

Shadow Arena #016: Ramses Exchange V3

You built Uniswap V3 from scratch. Ramses V3 is a near-verbatim v3-core fork that shipped on Arbitrum with two surgical changes: it replaced V3's bit-packed feeProtocol denominator with a plain percentage, and it wove per-period active-liquidity reward accounting (positionPeriodSecondsInRange) through Tick, Position, and Oracle to feed a ve(3,3) GaugeV3. Every bug in this arena lives exactly where a canonical-V3 assumption met one of those two changes and silently broke. 4 representative findings (2 M + 2 L).

Scope (2480 SLOC)

FileSLOC
contracts/CL/core/RamsesV3Pool.sol720
contracts/CL/core/libraries/Oracle.sol320
contracts/CL/core/libraries/Position.sol180
contracts/CL/core/libraries/Tick.sol260
contracts/CL/core/RamsesV3Factory.sol190
contracts/CL/gauge/GaugeV3.sol380
contracts/CL/periphery/NonfungiblePositionManager.sol430

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
Scope2480 SLOC
PriceFree