1. About auto-margin addition feature
The auto-margin addition feature enables users to add margin automatically upon reaching the liquidation price to avoid the risk of liquidation. Once the auto-margin addition feature is enabled, your balance will added to be margin automatically every time your position is close to the liquidation price.
The added margin amount will be the amount that recovers your position to the initial margin rate. If the available balance is insufficient, the system will first cancel the user's open order to release some margin. Then, the balance will be transferred to be the margin for the position near the liquidation price.
2. The formula for auto-margin addition
(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
User A opens 5,000 contr. for BTC_USDT perpetual contract at the price of 18,000 USDT with 10x leverage, and the estimated liquidation price is 16,288.98 USDT and the available balance in his contract account is 1,000 USDT.
If the fair price drops to 16,288.98 USDT, i.e. reaching the liquidation price, the auto-margin addition feature will be enabled to avoid liquidation. Based on the auto-margin addition formula above, the added margin amount shall be: 764.56 USDT. After the margin addition, the liquidation price will be lowered to 14,758.93 USDT. This avoids the liquidation of the user's position.
If the fair price continues to fall to 14,758.93 USDT, the auto-margin addition feature will be re-enabled. By that time, the available balance of the user is only 235.44 USDT. If the margin addition amount is less than the calculated amount, it will be added normally. If not, all the remaining balance of 235.44 USDT will be added as margin and the liquidation price will be calculated accordingly.
- Auto-margin addition feature is only valid for isolated-margin mode. It is not supported under cross-margin mode.