Liquidations
Liquidations protect the Nexus Exchange from insolvency by ensuring traders maintain sufficient margin to support their open positions.
When an account's equity falls below its required maintenance margin, the exchange's liquidation engine automatically closes positions at the current mark price, preventing negative balances and preserving system-wide solvency.
Mark price and equity
The exchange uses a mark price derived from the oracle (see Price Oracles). Account equity is:
equity = collateral + unrealized_pnl(mark_price)Margin requirements
Margin follows the same rules as Margining — notional valued at the mark price, scaled by each market's configured rates:
initial_margin = position_size × mark_price × initial_margin_rate
maintenance_margin = position_size × mark_price × maintenance_margin_rateLiquidation trigger
A position becomes eligible for liquidation when account equity falls below the total maintenance margin across all positions:
liquidatable when: equity < Σ maintenance_marginLiquidation process
Trigger — equity falls below maintenance margin.
Execution — a dedicated on-chain liquidator sub-account closes the position at or near the mark price.
Bankruptcy protection — a price cap prevents negative balances.
Insurance fund — covers any remaining shortfall if a position cannot be closed in time.
Last updated

