Liquidations

Liquidations protect the Nexus DEX from insolvency by ensuring that traders maintain sufficient margin to support their leveraged positions.

When a trader’s account equity falls below the required maintenance margin, NexusCore’s liquidation engine automatically intervenes and closes the position at the current mark price, preventing negative balances and preserving system-wide solvency.

How Liquidation Works

Mark Price & Equity

Nexus uses a mark price derived from the Nexus Oracle System. A trader’s equity is computed from:

equity=collateral+unrealizedpnl(markprice)equity = collateral + unrealized_-pnl(mark_-price)

In the DEX Alpha, collateral updates occur only on position change or liquidation.

Margin Requirements

  • Initial Margin

initialmargin=(positionsize×entryprice)/leverageinitial_-margin = (position_-size × entry_-price) / leverage
  • Maintenance Margin

maintenancemargin=1/(maxleverage×2)maintenance_-margin = 1 / (max_-leverage × 2)

Liquidation Trigger

A position is liquidated when equity falls below maintenance margin.

Liquidation Process

  1. Trigger: Equity falls below maintenance margin.

  2. Execution: A dedicated on-chain liquidator sub-account closes the position at or near mark price.

  3. Bankruptcy Protection: A price cap prevents negative balances.

  4. Insurance Fund: Covers any remaining shortfall if the position cannot be closed in time.

Last updated