**What is liquidation****？**Margin ratio is an indicator to estimate the risk of users’ assets. When the margin ratio less than or equal to 0%, forced liquidation will be triggered. It is recommended that you pay close attention to changes in margin ratio to avoid liquidation of its positions.

Huobi USDT-margined swaps implements a partial liquidation mechanism, in which the system will lower the corresponding tier of an adjustment factor to avoid the positions being liquidated at one time.

**Isolated margin mode:**

**Margin Ratio = (Account Equity / Occupied Margin) * 100% – Adjustment Factor**

**Note: Occupied Margin = Position Margin + Frozen Margin**

Huobi USDT-margined Swaps implements partial liquidation. The system will reduce the level that corresponding to an adjustment factor to avoid the position being liquidated all at once.

If the liquidation is trigged when the adjustment factor of a user’s position is 1

1.The system will cancel all open orders of this token;

2.The long and short positions of this token will fill with each other;

3.If the margin ratio is still less than 0, it will all be liquidated.

If the liquidation is trigged when the adjustment factor of a user’s position is greater than 1:

1.The system will cancel all open orders of this token;

2.The long and short positions of this token will fill with each other;

3.If the margin ratio is still less than 0, the system will reduce the positions to an upper limit of a certain level, so as to decrease the adjustment factor and make the margin ratio greater than 0.

4.If the margin ration fails to exceed 0% after the system reduces the positions and makes the adjustment factor to level 1, all positions will be liquidated.

When the liquidation is triggered, the user cannot proceed any operation on the swaps of this token.

**Cross Margin Mode:**

**Margin ratio = Account equity / ∑all swaps under the cross margin account****（****Occupied margin * Adjustment factor****）****– 100%**

**Note: Occupied Margin = Position Margin + Frozen Margin**

In the USDT-Margined swap cross margin mode, all types of swap share one account equity. If the margin ratio ≤ 0% triggers a liquidation, there is a risk of liquidation for all types of swap positions in this mode. If the position under the user's USDT cross account triggers liquidation:

1.The system will cancel all open orders under the cross margin account;

2.The long and short positions of the same swaps under the cross margin account will fill with each other;

3.If the margin ratio is still less than 0, the system will sort the positions of each swaps under the cross margin mode from low to high based on the unrealized PnL in the current period.

4. For the purpose of lowering the tier of adjustment factor, the system will partial liquidate the positions of a swaps with the largest loss-marking until the margin ratio is greater than 0%.

When the liquidation is triggered, users cannot proceed any operation on the swaps under the cross margin mode.

**What’s adjustment factor?**

The adjustment factor is designed to prevent users from extended margin call loss. Huobi USDT-margined Swaps uses a tiered adjustment factor mechanism, which supports up to five levels based on the position quantity. The larger the use’s net position, the higher the level and the greater the risk.

__For details of Adjustment Factor, please click >>>__

Take BTC/USDT swaps as an example. Assume a user’s net open interest is 10000 cont, then the corresponding tier is Tier 2, and the adjustment factor for 5x leverage is 6%, for 10x leverage is 12.5%, for 20x leverage is 25%, for 30x leverage is 35%.

** **

**What is Estimate Liquidation Price?**

The estimated liquidation price refers to the market price when the margin ratio is 0%, which is only a reference for investment. The actual liquidation price is the latest transaction price when the margin ratio is 0% and the liquidation is triggered.

**What’s Mark Price?**

To reduce unnecessary liquidations, the system uses mark price as another reference price for liquidation of USDT-margined swaps. That is, when the system is to trigger a liquidation, it must satisfy that the margin ratios calculated both by using the latest price and by using mark price are less than or equal to 0%. Using mark price for calculation can avoid the risk of liquidation or serial liquidation caused by several abnormal prices as much as possible.

**Mark Price Calculation**

The funding rate basis fair price is a relatively reasonable reference price for the perpetual swaps, which is calculated based on the current spot index price and the current funding rate basis rate.

**Funding Rate Basis Fair Price = Index Price * (1 + Funding Rate Basis Rate)**

- Funding Rate Basis Rate = Current-period Funding Rate * (Time Interval from Current time to Current-period Settlement Time / Settlement Cycle)

For instance, if the current index price of BTC USDT-margined swaps is 10,000 USDT, current-period funding rate is 0.01%, the current time is 12:00, and the current-period settlement time is 16:00, meaning there are 4 hours to the settlement, and the settlement cycle is 8 hours (settled every 8 hours), then the current funding rate basis fair price = 10000 * (1+ (0.01% * 4 / 8) ) = 10000.5 USDT.

- Depth weighted fair price

The depth weighted fair price is a relatively reasonable reference price related to current order book depth, which is calculated based on the current spot index price and EMA depth weighted middle price basis.

**Depth Weighted Fair Price = Index Price+ EMA (Depth Weighted Middle Price Basis)**

- EMA (Depth Weighted Middle Price Basis) = (Current EMA Calculated – last EMA Calculated) * Factor + Last EMA Calculated;
- Depth Weighted Middle Price Basis = (Depth Weighted Bid Price + Depth Weighted Ask Price) /2 – Index Price;
- The depth weighted bid price refers to the average bid price when the cumulative amount of open orders from bid_one reaches N USDT based on the open orders on current order book. The depth weighted bid price = N USDT / sum (the amount in each tier (coin));
- The depth weighted ask price refers to the average ask price when the cumulative amount of open orders from ask_one reaches N USDT based on the open orders on current order book. The depth-weighted ask price = N USDT / sum (the amount in each tier (coin));

Note: For the value range of N, please refer to the below chart.

- Latest EMA

Latest EMA refers to the exponential moving average value of the latest transaction price of current USDT-margined swaps.

**Current Latest EMA = (Latest Price – Last EMA Calculated) * Factor + Last EMA Calculated**

- The factor = 1 / 3；

To calculate current EMA, Pn represents the latest price of No. n

Assume P1 = 10000；P2 = 10006；P3 = 10011；then，

(1) EMA1 = P1 = 10000；

(2) EMA2 = ( P2 – EMA1 ) * Factor + EMA1 = ( 10006 – 10000 ) * 1 / 3 + 10000 = 10002；

(3) EMA3 = ( P3 – EMA2 ) * Factor + EMA2 = ( 10011 – 10002 ) * 1 / 3 + 10002 = 10005；

……

The above EMA will be calculated every 5 seconds, and the system will take the median value of funding rate basis fair price, depth weighted fair price and latest EMA as the mark price. The formula is as follows:

**Mark Price = Median (Funding Rate Basis Fair Price****，****Depth Weighted Fair Price****，****Latest EMA)**

To avoid unnecessary liquidations caused by abnormal mark price, when mark price sharply deviates from the contract price, the system will adjust the mark price accordingly; When mark price exceeds the upper and lower limits of deviation from the latest contract price, only the boundary value will be taken.

**Mark Price = Clamp (Mark Price, Latest Price * (1 + Upper Limit of Deviation Factor), Latest Price * (1 – Lower Limit of Deviation Factor))**

Currently, only some of the swaps calculate the mark price by using the median, while the others adopt“Mark Price = Latest EMA”to calculate. Details are as follows:

[ The above data and indicator contents may be adjusted in real time according to market conditions, and the adjustments will be made without further notice. ]

**What is Takeover Price****？**

Liquidation will be triggered when the latest transaction price reaches the liquidation price. The system will take over users’ positions at this time with the takeover price (a price when the user’s account equity is 0). Since the whole process won’t go through the matching system, the takeover price will not be shown on the K-line and it does not equal to the actual liquidation price.

**Example on liquidation under the isolated margin mode**

Assume Tom has 11000 USDT in BTC/USDT swaps isolated margin account. He opens a long position of 10000 conts BTC/USDT swaps contracts at the price of 8000 USDT. The leverage is 10x, the adjustment factor is 12.5% and the corresponding level is 2nd. Without considering the transaction fees, what will happen to Tom’s position when the latest price of BTC/USDT swaps reaches 6987.3 USDT?

Calculate through the following steps:

1.Unrealized PnL.

- Since Tom opened a long position, according to the formula: Unrealized P/L for long position= (Latest price – Position price) * Position quantity * Contract face value
- Therefore, the unrealized PnL of Tom = (6987.3 – 8000) * 10000 * 0.001 = –10,127 USDT
- When the latest price of BTC/USDT reaches 6987.3 USDT, Tom’s unrealized PnL is –10,127USDT.

2.Account Equity in isolated margin account

- According to the formula: Account Equity = Account Balance + Current-period Realized PnL + Current-period Unrealized PnL
- When the latest price of BTC/USDT swaps reaches 6987.3 USDT, the account equity of Tom’s isolated margin account is 11000 + 0 + (–10,127) = 873 USDT.

3.Position Margin.

- According to the formula: Position margin= (Face value –Position quantity) * Latest price/ Leverage = = (0.001 * 10000) * 6987.3 / 10 = 6987.3 USDT
- When the latest price of BTC/USDT reaches 6987.3 USDT, Tom’s position margin is 6987.3 USDT.

4.Is liquidation triggered?

- According to the formula: Margin Ratio = (Account equity/ Occupied Margin) * 100% – Adjustment Factor
- Therefore, Tom’s Margin Ratio =( 873 / 6987.3 ) * 100% – 12.5% = – 0.005%, at this time, the margin ratio is less than 0%.
- Assume the EMA adjustment price the system calculated is 6980;
- The EMA margin ratio = – 1.03%
- We’ve mentioned above that if the margin ratio calculated by using the latest price and by using EMA are both less than or equal to 0%, the positions will be liquidated by the system
- When the latest price of BTC/USDT reaches 6987.3 USDT, liquidated is triggered.

5. What will happen after liquidation?

- After the liquidation is triggered, the system detects that Tom's net position is 10000 conts and the corresponding level of adjustment factor is the 2nd. Then the system will try to recalculate Tom’s margin ratio by using the maximum quantity of the 1st level, which is 8999 conts, as the remaining position quantity and by using the adjustment factor of 1st level, which is 7.5%;
- Position Margin = (0.001 * 8999) * 6987.3 / 10 = 6287.8 USDT
- Realized profits / losses of positions that be takeover：( 6900 – 8000 ) * （ 10000 – 8999 ）* 0.001 = – 1101.1USDT；
- Unrealized profits / losses of positions that not be takeover：( 6987.3 – 8000 ) * 8999 * 0.001 = – 9113.2 USDT；
- Account equity of isolated margin account=11000 +（ – 1101.1 ）+ ( – 9113.2 ) = 785.7 USDT
- Therefore, if Tom only holds 8999 contracts, the margin rate of his position = ( 785.7 / 6287.90 ) * 100% – 7.5% = 4.99 % ＞ 0%；；
- At this time, the system will take over 10000 – 8999 = 1001 contract that exceeding the quantity of level 1 at the takeover price. In this way, Tom’s position is partially liquidated.

6. What is the takeover price?

- Takeover price is the price when the account equity is 0. Assume the takeover price is x, (x – 8000) * 10000 * 0.001 = –11000 USDT, x=6900.
- Therefore, the price that makes the account equity equals to 0 is 6900. This is also the price used by the system to take over the position of 1001 cont contract, which will not be displayed on the K-line.
- After the partial liquidation is completed, the remaining position of Tom is 8999 conts and all trading accesses are resumed.

**Example on liquidation under the cross margin mode**

Assume Tom has 52380USDT balance in his cross margin account of USDT-margined swaps, and he holds long positions of BTC/USDT, ETH/USDT, and LTC/USDT swaps. When the latest prices of these swaps fall to 16000 USDT, 509 USDT and 75USDT, what will happen to Tom’s cross margin account?

Let’s calculate according to the margin ratio formulas of cross margin mode:

1. Account equity

- Based on the formula: account equity = account balance + realized PnL of this term + unrealized PnL of this term, we can get that Tom’s account equity in cross margin account = 52380 + 0 + ( -20000 – 22750 – 5100) = 4530 USDT;

2. Position margin

- Based on the formula: position margin = (face value * position quantity) * latest price / leverage
- BTC/USDT position margin =0.001 * 10000 * 16000 / 5 = 32000 USDT
- ETH/USDT position margin = 0.01 * 25000 * 509 / 10 = 12725 USDT
- LTC/USDT position margin = 0.01 * 30000 * 75 / 20 = 1125 USDT

3. Is liquidation of cross margin account triggered?

- Based on the formula:
**Margin ratio = Account equity / ∑all swaps under the cross margin account****（****Occupied margin * Adjustment factor****）****– 100%** - Tom’s current margin ratio = 4530 / (32000 * 6% + 12725 * 17.5% + 1125 * 35%) - 100% = – 0.23%. Currently, the margin ratio of Tom’s cross margin account is < 0%.
- Assume the margin ratio calculated by using EMA is also <0%, the position will be forcibly liquidated by the system.

4. What will happen after liquidation?

- After the liquidation is triggered, the system will sort all positions of swaps under Tom’s cross margin account based on their unrealized PnL of the current period from low to high.
- After sorting we can find that the position of ETH/USDT swaps has the largest loss-marking and the corresponding tier of its adjustment factor is Tier 2. Then the system will use the maximum net open interest of Tier 1 as its remaining position quantity and use 15%, the corresponding adjustment factor of Tier 1, to re-calculate the margin ratio of Tom’s cross margin account.
- If after the position reduction to Tier 1 for ETH/USDT swaps, the margin ratio is still lower than 0%, the system will liquidate all positions of ETH/USDT swaps. By that analogy, the system will continue to liquidate the next position with the largest loss until the margin ratio of Tom’s cross margin account is greater than 0%.

(The above content is for example purposes only, the specific settings or related changes shall subject to the latest announcement)

**Insurance fund**

Insurance fund is set up to cover the losses from forced liquidation.

- Swaps that only support isolated margin mode.

For swaps that only support isolated margin mode, there is a corresponding insurance fund for each swaps and they are independent. Assume EOS/SUDT and TRX/USDT swaps only support isolated margin mode, then the insurance funds (USDT) for EOS-USDT swaps and TRX-USDT swaps are independent.

- Swaps that support cross margin mode.

All swaps that support both cross and isolated margin mode share the same insurance fund. For example, if BTC/USDT, ETH/USDT, BCH/USDT swaps support both cross and isolated margin mode, the insurance fund (USDT) are shared by these swaps that support cross margin mode.

When the system liquidates a user's position, it takes over the user's position and closes the position in the market. The profit generated by closing positions will be injected into the insurance fund of the corresponding contract. The system will transfer assets to the risky accounts during initial transactions or under special circumstances for increasing insurance fund.

Use of insurance fund: In each period of settlement, if a forced liquidation order fails to be closed and causes losses, the system will use insurance fund to compensate users first, and the part that the insurance fund not able to compensate will enter into the clawback mechanism.

**Clawback**

When the market fluctuates severely, the user is subjected to liquidation. When the order cannot be filled with the takeover price, a loss that greater than the range that the insurance fund can undertake generates. The platform adopts the “clawback” system. Each profitable account compensates the loss of bankrupt according to its profit ratio.

- Swaps that only support isolated margin mode

Consolidate the loss generated by all forced liquidation orders of all swaps that support both cross and isolated margin mode, and proceed clawback by using the earnings from profitable cross and isolated margin accounts of all swaps that support cross margin mode as the clawback base.

The system calculates the loss generated by all forced liquidation orders of an asset and proceeds clawback by using the earnings from all profitable users of this asset as the base of the clawback.

**Clawback coefficient = Loss from forced liquidation/ Earnings from profitable cross and isolated margin accounts of all swaps that support cross margin mode**

Assume during the settlement at 16:00, the total loss of the liquidation orders of EOS/USDT swaps is 12000USDT.

First, the loss will be compensated by the insurance fund. If there are 2000 USDT of loss after the compensation, the remaining 2000 USDT will be compensated by the profitable accounts.

Assume the earnings of profitable accounts is 4,000,000 USDT, then the clawback coefficient is 2000 / 4000000 = 1 / 2000.

Assume a user has earned 2000 USDT from BTC-USDT swaps, then he needs to clawback 2000 * (1 / 2000) = 1USDT

- Swaps that support cross margin mode

**Clawback coefficient = Loss from forced liquidation/ Earnings from all profitable users**

For example, BTC/USDT, ETH/USDT and BCH/USDT swaps support both cross and isolated margin modes. Then the cross and isolated margin modes of these three swaps share a same insurance fund. Assume BTC/USDT swaps triggered clawback mechanism, all profitable users of BTC/USDT, ETH/SUDT and BCH/USDT swaps in the current term shall join the clawback.

## Comments

0 comments

Article is closed for comments.