# Liquidation. Margex Anti-Liquidation Protection

In margin trading, **liquidation** is an automatic procedure that can occur if a trade is incurring loses and the trader's margin is no longer sufficient to cover further losses from the trade. If a position reaches its liquidation point, the trade will be immediately closed at [market](https://help.margex.com/help-center/orders-positions/order-types#market-order), i.e. liquidated.

Liquidation may occur at different margin thresholds, depending on the margin type used in a trade - [Isolated](https://help.margex.com/help-center/orders-positions/cross-vs-isolated-margin#isolated-margin) or [Cross](https://help.margex.com/help-center/orders-positions/cross-vs-isolated-margin#cross-margin)

Below are detailed explanations for each type of Margin system.

## Isolated Margin Liquidation

For [Isolated Margin](https://help.margex.com/help-center/orders-positions/cross-vs-isolated-margin#isolated-margin) positions, an Estimated Liquidation Price is automatically provided. This reflects the estimated price level at which a position will be liquidated, due to a trader’s margin no longer being sufficient to cover further losses if the market moves against the trade:

<figure><img src="https://163304092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0u2JKWHQTXEH82Px1eQ%2Fuploads%2FA9sG13dx9UiNrVtCoxGD%2FELP.png?alt=media&#x26;token=4ffc422c-957c-4caa-98da-a12a2686c0fd" alt=""><figcaption></figcaption></figure>

It is important to keep in mind that the EST. liq. price is an **estimated** value based on the available margin remaining in a trade. This means that the estimated liquidation price of an isolated-margin position can change. This can occur when:

* [Funding ](https://help.margex.com/help-center/margex/trading-conditions/margex-fees#funding)is charged for carrying a position into a new funding rollover
* [Adding/removing margin](https://help.margex.com/help-center/orders-positions/manage-positions#how-to-add-remove-margin-to-a-position) in a trade

<details>

<summary>Isolated Margin: Examples and General Formulas</summary>

### **General formulas for calculating the Estimated liquidation price:**

**Liq Price (Long)** = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice

**Liq Price (Short)** = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice

where, OpenOrderCommission is:

Maker Fee **0.1%** for LIMIT orders Taker Fee **0.2%** for MARKET orders

and CloseOrderCommission is: TakerFee 0.2%

In such calculations, trade fee fractions are rounded up for ease of understanding.

### **EXAMPLE of calculations of liquidation price (for limit orders):**

OpenOrderCommission = SizeBTC \* MakerFee = 0.01 \* 0.001 = 0.00001 BTC CloseOrderCommission = SizeBTC \* TakerFee = 0.01 \* 0.002 = 0.00002 BTC

For LONG positions:

* Liq Price (Long) = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice
* Liq Price (Long) = 10000 - (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01 \* 0) / (100 \* 0.0001) \* 10000 = 10000 - (0.0001 - 0,01 \* 0,001 - 0,01 \* 0,001 - 0.01 \* 0) / 0.01 \* 10000
* Liq Price (Long) = 9930.0

For SHORT positions:

* Liq Price (Short) = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice
* Liq Price (Short) = 10000 + (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01 \* 0) / (100 \* 0.0001) \* 10000 = 10000 + (0.0001 - 0.01 \* 0.001 - 0.01 \* 0.002 - 0.01 \* 0) / 0.01 \* 10000
* Liq Price (Short) = 10070.00

### **EXAMPLE of calculation of liquidation price (for Market order):**

OpenOrderCommission = SizeBTC \* TakerFee = 0.01 \* 0.002 = 0.00002 BTC CloseOrderCommission = SizeBTC \* TakerFee = 0.01 \* 0.002 = 0.00002 BTC

For LONG positions:

* Liq Price (Long) = OpenPrice - (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice
* Liq Price (Long) = 10000 - (0.0001 — OpenOrderCommission — CloseOrderCommission — 0.01 \* 0)/(100 \* 0.0001) \* 10000 = 10000 — (0.0001 - 0.00002001 - 0.00002001- 0.01 \* 0) / 0.01 \* 10000
* Liq Price (Long) = 9940.00

For SHORT positions:

* Liq Price (Short) = OpenPrice + (Margin - OpenOrderCommission - CloseOrderCommission - Funding) / SizeInBTC \* OpenPrice ,
* Liq Price (Short) = 10000 + (0.0001 - OpenOrderCommission - CloseOrderCommission - 0.01 \* 0) / (100 \* 0.0001) \* 10000 = 10000 + (0.0001- 0.00002001 - 0.00002001- 0.01 \* 0) / 0.01 \* 10000
* Liq Price (Short) = 10059.98

</details>

If an isolated margin position reaches its liquidation point, the trade will be immediately closed [market](https://help.margex.com/help-center/orders-positions/order-types#market-order).

## Cross Margin Liquidation

For [Cross Margin](https://help.margex.com/help-center/orders-positions/cross-vs-isolated-margin#cross-margin) positions, liquidation occurs if Cross Margin Level drops to or below **10%**:

<figure><img src="https://163304092-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0u2JKWHQTXEH82Px1eQ%2Fuploads%2FzWoa6QIBKt0sFjBH6E0B%2Fcross%20margin%20liquidation.png?alt=media&#x26;token=7e5e4cfe-4672-44f7-be88-564ec99ec091" alt=""><figcaption></figcaption></figure>

The Cross Margin Level indicators provide traders with an easy way to keep track of cross margin trades, without having to manually perform all of the related calculations. The gauges will fill up as more margin is pulled into a cross-margin trade. A green indicator reflects a sufficient level of available margin remaining, while a red indicator means that available margin is at a critical level and the position may be at risk of liquidation. Liquidation may occur if Cross Margin Level drops to 10% or below.

Essentially the Cross Margin Level indicators provide the following information in an easy to understand graphical format:

* As more margin is pulled into a trade, the gauge will fill up accordingly
* Liquidation occurs if cross margin level drops to or below 10%
* If cross margin level is below 100%, it will not be possible to open new positions using the corresponding margin currency

## **Margex MP Shield Technology**

The Margex **MP Shield Technology** protects traders from possible unnatural price movements/spikes as a result of isolated instances of price manipulation on a single exchange (liquidity provider). It monitors the accuracy of the price feed submitted by the liquidity providers and negates any suspicious trading activities such as spoofing, bluffing and wash-trading.

One of the key mechanisms which makes it possible to provide additional protection for traders through the Margex MP Shield technology is **Liquidity Aggregation**.

At Margex, we aggregate liquidity from a pool of liquidity providers, (12 currently) and arbitrage between them to offer the best prices across the providers (exchanges/platforms) from which liquidity is aggregated.

Additionally, besides the Margex MP Shield, liquidity aggregation also allows us to provide:

* One of the best order book depths on the market
* Tight spreads
* Minimal or complete absence of slippage
* Near-instant order execution
* One of the lowest trade fees on the market.
