DocsThe exchange

Margin and liquidation

Margin modes, requirements, liquidation, and the order in which losses are absorbed.

Margin modes

ModeBehavior
CrossEquity and maintenance pooled across every cross position
IsolatedOwn margin per position, returned to cross with the result on close

An isolated position is liquidated on its own margin and never draws on cross. A loss that runs past its margin reaches cross only when the owner reduces or closes the position; the shortfall is then realized against cross.

Leverage and margin mode are set per market. Margin mode changes only while that market has no position or order; leverage can be raised at any time and lowered while initial margin is met at the new setting. A market with no setting trades at 20x cross, or at its maximum leverage when that is lower.

Position modes

ModeBehavior
One-wayOne net position per market
HedgeA long and a short side by side, each with its own entry and margin

Hedged sides are margined separately, without netting. The mode applies to the whole account and can be changed only while the account has no open position or order.

Margin requirements

IM=Nmin⁡(L,Ltier)MM=∑kNk2Lk
N
Position notional at the mark
L
Leverage set by the account
Ltier
Max leverage of the tier the notional reaches
Nk
Part of the notional inside tier k, with max leverage Lk

Order checks add adverse execution against the mark and the order's fee to initial margin. Each market's tiers are returned by the meta reply.

Liquidation

An account is liquidated when its equity at the mark falls below maintenance margin. Its orders are canceled and its positions close reduce-only into the book, no further past the mark than the maintenance rate and never more than 10%. Positions above 100,000 USDC close in 20% clips 30 s apart. Below two thirds of maintenance the AMM vault takes over the positions with the margin that remains. A close fill that would leave the account below zero is not taken; auto-deleveraging covers the deficit instead. There is no liquidation fee beyond the taker fee on close fills.

Loss waterfall

Liquidationbelow maintenanceCONFIDENTIAL EXECUTION ENGINEpassed onabsorbed here1Margin and the bookBelow maintenance: orders canceled,positions closed reduce-only2AMM vault backstopBelow two thirds of maintenance: thevault takes the position at the mark3Auto-deleveragingRanked opposite positions close at theprevious mark, none below maintenance4AMM vault, againTakes the lots no holder can carry, atthe bankruptcy price; depositors carrythe resultLiquidationCONFIDENTIAL EXECUTION ENGINEpassed onabsorbed here1Margin and the bookBelow maintenance: orders canceled,positions closed reduce-only2AMM vault backstopBelow two thirds of maintenance: thevault takes the position at the mark3Auto-deleveragingRanked opposite positions close at theprevious mark, none below maintenance4AMM vault, againTakes the lots no holder can carry, atthe bankruptcy price; depositors carrythe result
Each step absorbs part of the loss and passes only the remainder to the next. The vault appears twice: as the backstop for accounts that still have equity and for bankrupt lots no holder can carry. Proportions are illustrative.

The insurance fund is not part of this waterfall. It is held apart to make users whole after a hack or exploit (Insurance fund).

The AMM vault appears twice: at step 2 it takes over an account that still has equity at the mark and at step 4 it takes the lots of a bankrupt position that no ranked holder can carry, at the bankruptcy price. Its capacity to absorb both is its equity, which is public and which vault depositors carry (AMM vault).

Auto-deleveraging

A shortfall past an account’s margin goes to auto-deleveraging, which closes the most profitable and most leveraged opposite positions in the same market at the previous mark, highest rank first. The AMM vault settles the difference to the bankrupt account’s bankruptcy price, so the bankrupt account ends at exactly zero.

Rlong=PmarkPentry×NERshort=PentryPmark×NE
N
Position notional
E
Holder's account equity
  • A holder takes only as many lots as it can while staying at or above its maintenance margin; whatever no holder can carry goes to the AMM vault.
  • The previous mark is the mark before the price update that triggered the liquidation.

Withdrawal rules

Account stateWithdrawable
FlatAll cash
Open positions or ordersEquity above the larger of initial margin and 10% of position value
Isolated marginOnce moved back to cross

A withdrawal is checked against the account's own balance and margin only; another account's position or loss never holds it back. There is no size cap.

Subliquid docs · Last changed October 28, 2026