Skip to content

Margin & Liquidation

The margin system ensures that every position is backed by sufficient collateral, and the liquidation mechanism forces undercollateralized positions closed to protect pool capital.

Margin Accounts

Each margin account is linked to a single pool and holds collateral (quote tokens like USDC) alongside up to 16 embedded positions across different markets. Collateral is shared across all positions within the account, so a single deposit backs the entire portfolio and gains on one position can offset losses on another. Users can create multiple margin accounts to isolate different strategies or risk profiles.

Margin Requirements

Every position is subject to two margin thresholds, and the relationship between them is what creates the buffer that keeps the system healthy.

Initial margin (IM) is the higher threshold, required to open or increase a position. By demanding more collateral upfront, the protocol ensures new positions start with meaningful headroom above the liquidation boundary.

Maintenance margin (MM) is the lower threshold: the minimum needed to avoid liquidation. When account health drops below zero (equity falls below the maintenance requirement), the account becomes eligible for liquidation.

How Margin Is Computed

For each position, the margin requirement is the greater of two calculations:

BPS-based margin takes a straight percentage of absolute notional:

BPS Margin=|notional|×margin_bps10,000

Floor-based margin prevents the requirement from collapsing when rates are low or expiry is near:

Floor Margin=|notional|×Reff×TeffSeconds Per Year×multiplier

Here Reff is the greater of the absolute mark rate and a configured rate floor, and Teff is the greater of time to maturity and a configured time floor. The multiplier differs for IM vs MM (IM multiplier ≥ MM multiplier). This floor-based formula ensures that even positions with very low rates or near expiry maintain a meaningful margin requirement proportional to their actual risk.

The account's total margin requirement is the sum across all open positions.

Health

Account health is the single number that determines solvency:

Equity=Collateral+ΣRealized PnL+ΣUnrealized MTM+ΣFunding DeltaHealth=EquityMaintenance Requirement

When health is non-negative, the account is healthy. When it drops below zero, the account is liquidatable. Health is evaluated both before and after risk-increasing trades (pre-swap and post-swap checks). Risk-reducing trades are always allowed regardless of health. A trader must be able to deleverage even when underwater.

Liquidation

Liquidation is permissionless. Anyone can liquidate an unhealthy account by submitting the liquidation instruction against a specific (margin account, market) pair.