The liquidation engine cancels all open orders first to prevent position growth, then executes market orders either in TWAP or fully liquidating the position, depending on slippage assessement.
Step 1: Cancel Open Orders. The first action the liquidation engine takes is to cancel any open orders the trader has for that same contract. This includes all resting limit or stop orders related to the position. The reason is that those orders, if left open, could later execute (e.g. a limit order might suddenly fill) and increase the position size or use up remaining margin, which would worsen the situation. By canceling them, the system frees up any reserved margin and prevents the position from growing further.
Step 2: Pre-liquidation Slippage Assessment: Before executing any liquidation orders, the engine calculates the expected slippage if the entire position were closed immediately. This assessment examines the current order book depth to determine market impact.
Step 3: Adaptive Liquidation Execution: Based on the slippage assessment, the engine chooses the appropriate execution strategy:
Low Slippage (<2%): If closing the entire position would cause less than 2% slippage, the engine executes a single market order to close the full position immediately.
High Slippage (≥2%): If slippage would exceed 2%, the engine implements a TWAP (Time-Weighted Average Price) strategy, splitting the liquidation into 10 equal buckets executed over time to minimize market impact and reduce slippage.
Execution Target: The liquidation aims to close the position at or better than the Bankruptcy Price. Any execution better than bankruptcy price contributes excess margin to the Insurance Fund; any worse execution results in a shortfall covered by the Insurance Fund.
This approach ensures liquidations are executed efficiently while minimizing market disruption through intelligent slippage management and adaptive execution strategies.For post-liquidation outcomes and handlings, seePost-Trade Risk Management.