Margin and liquidation
Margin modes, requirements, liquidation, and the order in which losses are absorbed.
Margin modes
| Mode | Behavior |
|---|---|
| Cross | Equity and maintenance pooled across every cross position |
| Isolated | Own 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
| Mode | Behavior |
|---|---|
| One-way | One net position per market |
| Hedge | A 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
- Position notional at the mark
- Leverage set by the account
- Max leverage of the tier the notional reaches
- 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
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.
- Position notional
- 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 state | Withdrawable |
|---|---|
| Flat | All cash |
| Open positions or orders | Equity above the larger of initial margin and 10% of position value |
| Isolated margin | Once 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.