When Mark Price reaches liquidation price, the liquidation process will take the following steps to handle the liquidation:
1) If the trader uses an isolated margin mode, the liquidation engine will take over the position directly.
2) After the liquidation engine takes over the position:
2i) For traders using the lowest risk limit, all active orders will be canceled and the position will be taken over by the liquidation engine, which will directly liquidate and settled at its bankruptcy price.
2ii) For traders using higher risk limits:
The liquidation engine will attempt to reduce the position's maintenance margin requirements by dynamically reducing the trader's current risk limit through the following:
a)Reducing the current risk limit to attempt to maintain the current open position and active orders.
b) Cancel all Active orders, followed by reducing the current risk limit to attempt to maintain the current open position.
c) The system will next submit a FillOrKill (Immediate fulfillment of order or cancellation) order, with an order value equals to the difference between the current position's order value and the risk limit value required to meet the margin requirements to prevent liquidation.
d) If the position is still unable to avoid liquidation, the entire position will be taken over by the liquidation engine to be liquidated and settled at its bankrupt price.
3) If the system is able to close the position at a price better than the bankruptcy price, the remaining margin from the position would be contributed to the insurance fund. Conversely, if the system is unable to close the price above bankruptcy price, the system would use funds from the insurance fund to cover the losses gap. Should the balance in the insurance fund be insufficient to cover the loss, Auto-Deleveraging will take over the process.
If Trader A holds a 350 BTC position value + 200 BTC Active Order value, it will correspond to the fourth tier of the risk limit table at 600 BTC. When Mark Price reaches the liquidation price, the liquidation engine will take over the position.
4i) Cancel all Active orders, followed by reducing the current risk limit to the third tier at 450 BTC. In the process, this reduces the maintenance margin requirement and thus avoids liquidation by having a new liquidation price.
4ii) If Mark Price reaches the new liquidation price for the second time
a) The liquidation engine will attempt to partial close the 50 BTC portion of the existing 350 BTC position value in order to further reduce to the second tier of 300 BTC to avoid liquidation for the second time.
b) If the system forecast that executing step (a) stated above is still unable to prevent liquidation, the liquidation engine will now attempt to partially close 200 BTC from the position, further reducing the current risk limit to the lowest level at 150 BTC. Again, in the process, a new liquidation price and margin requirements to hold the position will be calculated and updated to reflect the lowest maintenance margin requirements.
4iii) Lastly, at the lowest risk limit, the entire position will directly be taken over by the liquidation engine to be liquidated and settled at its bankrupt price if Mark Price reaches the liquidation price again.