Appearance
Risk & Limits
The protocol enforces risk limits at multiple levels to bound worst-case losses relative to pool capital. Risk is measured through two primary metrics, Open Interest (OI) and DV01, with caps enforced at the position, market, and pool level.
Risk Metrics
Open Interest (OI)
OI is the sum of absolute notional across all open positions in a market:
It measures the total size of outstanding positions regardless of direction. OI caps limit the raw notional exposure a market can accept, but OI alone doesn't capture how sensitive that exposure is to rate movements. That's what DV01 is for.
DV01 (Dollar Value of a Basis Point)
DV01 measures how much a position's value changes for a 1 basis point move in rates:
Where
Cap Levels
Caps are enforced at three levels, each catching a different kind of concentration risk.
Position-level: Each position's absolute notional must not exceed max_notional_per_position_wad, preventing any single position from dominating a market's exposure.
Market-level: Each market enforces an OI cap (oi_cap_notional_wad) and a DV01 cap (dv01_cap_wad). These are hard limits. When a market reaches either cap, only risk-reducing trades are accepted.
Pool-level: The pool enforces aggregate caps across all its markets: a pool-wide OI cap and a pool-wide DV01 cap. Each market has a configurable risk weight that determines how its exposure counts against pool-level limits, so higher-risk markets can be given smaller allocations of the pool's total risk budget.
DV01 Budget and Reserve
The pool allocates a DV01 budget that represents the maximum rate sensitivity it can absorb. This budget, combined with the max_rate_move_bps parameter, determines how much capital is reserved against potential losses:
The reserve is subtracted from LP equity when computing withdrawable liquidity (see Pool & LP), ensuring the pool always holds enough capital to survive its configured worst-case rate scenario.
Bucket-Level Tracking
Exposure is tracked per bucket in each market's ring buffer. Every position's OI and DV01 contribution is recorded in the bucket corresponding to its expiry time. When buckets expire and are ticked, their exposure is removed from market aggregates.
This granular tracking enables precise cap enforcement. The protocol knows exactly how much exposure expires at each time horizon, and market aggregates stay consistent with the underlying bucket data rather than relying on a separate bookkeeping system.
Risk-Reducing Bypass
Trades that reduce the trader's absolute notional and DV01 are exempt from all cap checks. This is a fundamental safety property: traders must always be able to reduce their exposure, even when the market is at capacity. Blocking risk reduction could trap traders in positions and lead to cascading liquidations.
The bypass applies at all three levels (position, market, and pool). Only the cap checks are bypassed; other safeguards like the Open Interest Fee and margin requirements still apply normally.