Liquidations
When a position is liquidated, and what happens when it is.
When
A position is liquidated when its margin plus unrealised profit and loss, pending funding included, falls below the market's maintenance margin, valued at the mark price.
- Isolated: the test applies to the position and its own margin bucket.
- Cross: the test applies to all your cross positions together, against your shared balance.
Maintenance margin per market is listed in Contract specifications.
What happens
The position is closed on the book
A reduce-only order is sent into the book at the position's bankruptcy price, or at the mark price if the position is already insolvent. A position larger than 100,000 USDCx is first reduced by 20%. If it is still below maintenance margin within the next 30 seconds, the rest is closed in one go.
The insurance fund takes the rest
If the book cannot absorb the whole position, the insurance fund takes over the remainder and covers any loss beyond the position's margin.
Auto-deleveraging, as a last resort
Only if the insurance fund cannot cover it are opposite positions auto-deleveraged.
If the external prices behind the mark price go stale, liquidations pause until they return.
What gets recorded
Every liquidation is committed as an event leaf in the history of the account liquidated.