Liquidations
Overview
A liquidation is an automated process initiated by the exchange to close a trader's position when their account can no longer support it. This is a critical safety mechanism designed to protect both the trader from further losses and the market from systemic risk.
The trigger for liquidation on Bulk Exchange is straightforward:
Equity < Total Maintenance Margin
When this condition is met, the LiquidationEngine
begins the process of closing the user's positions. All calculations and triggers are based on the Mark Price, not the last traded price. This ensures that liquidations are based on the fair, underlying value of the contract and are resistant to short-term volatility or price manipulation.
For a detailed breakdown of how Equity
is calculated for both Cross and Isolated margin modes, please refer to the Margining page.
The Liquidation Process
Bulk Exchange employs a dedicated, asynchronous background process called the LiquidationEngine
to manage liquidations safely and efficiently.
When an account is flagged for liquidation, the engine follows a precise, multi-step process:
Cancel All Open Orders: This is the immediate and most critical first step. The engine sends a
CancelAllOrders
command to every matching engine where the user has resting limit orders. This action is crucial to prevent the user from increasing their position size or risk exposure during the liquidation event.Evaluate Positions: The engine iterates through the user's open positions to determine the necessary action.
Submit Liquidation Orders: To close the position, the engine submits
reduce-only
market orders to the appropriate order book. These orders are specifically designed to only decrease the position's size, ensuring they cannot accidentally open a new position in the opposite direction.
Partial Liquidation Strategy
To minimize the market impact of large liquidations, Bulk Exchange utilizes a sophisticated, two-tiered liquidation strategy:
Partial Liquidation (Positions > $100,000 notional value): If a liquidatable position has a notional value exceeding $100,000, the engine will only liquidate a fraction of it—specifically 20% of the position. After this partial liquidation, a 30-second cooldown period is enforced for that position to allow the market time to absorb the order before any further liquidation action is taken.
Full Liquidation (Positions < $100,000 notional value): For positions below this threshold, the entire position is closed via a single
reduce-only
market order.
This tiered approach is designed to create a more stable and fair market environment by preventing large, single liquidation orders from causing excessive price slippage.
Last updated