Liquidations

A liquidation runs through the stages below in order and stops as soon as the account is back above maintenance margin. Anyone can trigger it once an account qualifies. For the thresholds themselves, see Margin.

flowchart TD
    subgraph W["Liquidation waterfall"]
        MC["Margin call: reduce, close or add USDso"]
        BOOK["Close on the book: positions closed, fee up to 1%"]
        BID["Backstop takeover, skipped on markets without a bidder"]
        ADL["Auto-deleveraging"]
        MC -- "equity below maintenance margin" --> BOOK
        BOOK -- "still below maintenance margin" --> BID
        BID -- "equity still below zero" --> ADL
    end
    IF(("Insurance Fund"))
    IF -. "covers a loss the account can't pay, before ADL" .-> ADL
StageWhenWhat happens
Margin callEquity below initial margin, still above maintenance marginNothing is closed. You can only reduce or close positions, or add USDso
Close on the bookEquity below maintenance marginOpen orders are cancelled, then positions are closed on the order book
Backstop takeoverClosing on the book was not enoughA registered backstop bidder takes the position over
Auto-deleveraging (ADL)The account is still underwater, with equity below zeroProfitable positions on the other side are closed

The Insurance Fund sits beside these stages rather than in them: it covers a loss the account can't pay before ADL runs.

Close on the book

When your account's equity falls below its maintenance margin, your open orders are cancelled first, then positions are closed on the order book one at a time, each one in full, until the account is back above maintenance margin. Each market caps how much can be liquidated on the book in a single block. When a position is larger than that cap, or the book can't absorb all of it, only part of it is closed in that block. If that part brings the account back above maintenance margin, the rest stays open; if not, the rest can be closed over the following blocks.

A liquidation on the book charges a fee of up to 1% of the notional it closes.

When the account still holds a position after the close, including the rest of a position that was only partly closed, there is a second limit: the fee only comes out of equity above a line 40% of the way from maintenance margin up to initial margin, so an account left just above maintenance margin pays little or nothing.

Backstop takeover

If closing on the book does not bring the account back above maintenance margin, the remaining positions are offered to registered backstop bidders. A bidder takes a position over at a price inside a band around the mark price, below it for a long and above it for a short, and each market sets its own band. The bidder also receives up to the position's close-out margin from the account.

Not every market has a backstop bidder. On a market without one, this stage is skipped.

Auto-deleveraging (ADL)

ADL is the last resort. It runs only while the account is still underwater, with equity below zero, after the earlier stages and the Insurance Fund. It closes profitable positions on the opposite side of the same market, in order of their ADL score, highest first:

ADL score       = profit factor × leverage factor
Profit factor   = mark price / entry price    (long)
                = entry price / mark price    (short)
Leverage factor = position size × mark price / account equity

A position further in profit, or held with more leverage against its account's equity, is closed sooner. The positions are closed at the bankruptcy price, the price at which the liquidated account's equity reaches zero, and ADL never takes a counterparty's equity below zero.

The ADL column in your positions table shows where each position stands in that queue as five bars. The more bars are lit, the closer the position is to the front.

Insurance Fund

The Insurance Fund backs the waterfall from the side. Whenever a liquidation leaves the account with a negative balance, a loss it can't pay, the fund covers what it can before ADL runs, at most bringing the account back to zero and never above. Coverage is per market: each market belongs to a coverage tier that is funded separately, and a tier only pays for losses in its own markets, up to its balance. Whatever the fund does not cover is left to ADL.

Every stage is measured against the market's mark price. A market's price counts as stale once its oracle has not updated for more than 5 seconds. While it is stale, accounts holding a position in that market are not liquidated; they are checked again once the price is back.