1. About auto-margin addition:
The auto-margin addition feature provides a mechanism for traders to prevent liquidation. When the auto-margin addition feature is enabled, margin will be automatically added from your balance currency to a position that is on the verge of liquidation. The position is then recovered to the initial margin rate.
If the available balance is insufficient, the system will proceed to cancel the user's open orders to release some margin before proceeding with the addition of margin from the available balance.
2. Auto-margin addition formula:
(1) USDT-margined contract:
(position margin + added margin each time + floated PnL) / (fair price * amount * face value) = 1/initial leverage's auto-margin-addition amount each time = (fair price * amount * face value) / leverage - floated PnL - position margin.
(2) Coin-margined contract:
(position margin + added margin each time + floated PnL) * fair price / (amount * face value) = 1/initial leverage's auto-margin-addition amount each time = (mount * face value) / (leverage * fair price) - floated PnL - position margin
Initial margin rate = 1/ initial leverage
Trader A opens 5,000 contract for a BTC_USDT perpetual contract at the price of 18,000 USDT with 10x leverage. The estimated liquidation price is 16,288.98 USDT and the available balance in their contract account is 1,000 USDT.
If the fair price reaches the liquidation price (16,288.98 USDT), auto-margin addition will kick in to protect the position. Based on the formula above, the added margin amount shall be 764.56 USDT. Once the additional funds have been injected, the liquidation price will be recalculated and in this case, lowered to 14,758.93 USDT.
If the fair price reaches the liquidation price again, the auto-margin addition feature will be triggered once again. If the trader’s balance is insufficient for the auto-margin addition, the user’s open options will be cancelled before the funds are injected. If the trader has sufficient balance, margin will be added and the liquidation price will be calculated accordingly.
Do note that the auto-margin addition feature is only valid in isolated-margin mode, and not cross-margin mode.