1. Liquidation Rules
A liquidation event occurs when unfavorable market movement causes a trader’s account equity to fall below the required maintenance margin.
The maintenance margin is equal to half of the initial margin at maximum leverage, which ranges from 3x to 40x depending on the asset. In other words, the maintenance margin ranges from 1.25% for assets with 40x maximum leverage to 16.7% for assets with 3x maximum leverage.
When account equity falls below the maintenance margin requirement, the system first attempts to close the position by placing market orders on the order book. These orders are intended to close the trader’s full position and may result in either full or partial liquidation. If, after a full or partial liquidation, the remaining position again satisfies the maintenance margin requirement, the trader keeps the remaining collateral.
If account equity falls below two-thirds of the maintenance margin requirement and liquidation cannot be completed successfully through the order book, a backup liquidation process is carried out through the Liquidator Vault. See the Liquidator Vault section below for more details.
When a cross-margin position is liquidated, the trader’s cross-margin positions and isolated margin are transferred to the liquidator. In particular, if the trader has no isolated positions, the account equity will be reduced to zero.
When an isolated-margin position is liquidated, that isolated position and its margin are transferred to the liquidator. The user’s cross margin and cross positions remain unchanged.
During liquidation, the maintenance margin is not retained by the user. This is because the liquidation vault requires a certain buffer to help ensure that liquidations can be executed sustainably on average. To avoid losing maintenance margin, traders may use stop-loss orders or close positions before the market reaches the liquidation price.
Liquidation is based on the mark price, which combines external centralized exchange (CEX) prices with the state of the MyDex order book. This makes liquidation more robust than relying on a single instantaneous order book price. During periods of high volatility or for highly leveraged positions, the mark price may differ significantly from the order book price. Traders are advised to use the exact formulas for precise liquidation monitoring.
2. Liquidation Price Calculation
When placing a trade, the system displays an estimated liquidation price. Because liquidity on the order book may change, this estimate may differ from the liquidation price shown after the position is opened.
After a position is opened, the system displays a liquidation price. This displayed price may be based on the opening conditions, but due to funding payments or changes in unrealized PnL from other positions in cross margin, it may differ from the actual liquidation price.
The actual liquidation price is not affected by the leverage setting of a cross-margin position. A lower-leverage cross-margin position simply uses more collateral.
For isolated-margin positions, the liquidation price does depend on the leverage setting, because the amount of isolated margin allocated is determined by the initial margin setting.
If the available margin is insufficient to place the trade, the liquidation price estimate assumes the account has been funded up to meet the initial margin requirement.
The exact formula for the liquidation price of a position is:
liq_price = price - side * margin_available / position_size / (1 - l * side)l = 1 / MAINTENANCE_LEVERAGE
For assets with margin tiers, the maintenance leverage depends on the unique margin tier corresponding to the position value at the liquidation price.
side = 1 for long and -1 for shortmargin_available (cross) = account_value - maintenance_margin_requiredmargin_available (isolated) = isolated_margin - maintenance_margin_required
Risk Disclaimer
The cryptocurrency market involves substantial risk. Please make sure you understand the risks and only invest in products you are familiar with. Before investing, carefully consider your investment experience, financial situation, investment objectives, and risk tolerance, and consult an independent professional advisor if necessary. The information displayed on this page is for reference only and should not be regarded as investment advice. Past performance is not indicative of future results. Be aware that the market value of investment products and potential returns can fluctuate significantly, and there is a risk of losing your invested capital. You are solely responsible for your own investment decisions, and MyDex shall not be liable for any investment losses that may occur.
MyDex Official Channels