For the complete documentation index, see llms.txt. This page is also available as Markdown.

Liquidation

When a trader's margin ratio reaches 100%, the system initiates liquidation to prevent further losses. AFX employs a multi-layered liquidation system designed to minimize the impact on traders while maintaining platform solvency.

Liquidation Trigger

Liquidation is triggered when:

Margin Ratio = Maintenance Margin (MM) / Position Equity = 100%

The trigger condition is the same for both Cross and Isolated margin modes, but the Equity calculation differs:

Isolated Margin:

Position Equity = Position Margin + Isolated Unrealized PNL
              = Initial Margin + Close Fee + Added Margin + Isolated Unrealized PNL

Cross Margin:

Position Equity = Wallet Balance + Cross Unrealized PNL - Isolated Balance (IB)

Where IB = total margin locked in isolated positions.

Margin Ratio Alerts

For users registered with email, the system sends warning notifications at the following thresholds:

Margin Ratio
Alert

50%

First warning — add margin recommended

67%

Second warning — add margin urgently recommended

100%

Liquidation triggered

Liquidation Process

See Liquidation Process for the detailed multi-phase liquidation flow.

Auto-Deleveraging (ADL)

In extreme market conditions where normal liquidation cannot fully close a position, the Auto-Deleveraging system is activated. See ADL for details.

Estimated Liquidation Price

The estimated liquidation price is displayed on the trading interface for reference. The formulas are:

Long position:

Short position:

Where:

  • L = Effective leverage = Position Value / Equity

  • MMR = Maintenance Margin Rate (see Risk Limits)

  • feeRate = Taker fee rate

The estimated liquidation price is rounded to the tick size (up for longs, down for shorts) and is for reference only — actual liquidation depends on the real-time margin ratio reaching 100%.

Last updated