#### The Liquidation Process at the Liquidation Price

Liquidation price is the price at which a position is forced liquidated. Essentially, it’s the price that once reached makes position equity equal to maintenance margin. Once the market price moves just below the liquidation price for long positions (or just above for short positions), the equity is no longer sufficient to maintain the position.

When forced liquidation happens, the liquidation engine will take over the position. Force liquidated positions are marked at the bankruptcy price.

## Liquidation Price Calculation

**Terms and Definition**

**Liquidation Price ( LP )**: Liquidation price means the price where your position will be liquidated.

**Initial Required Margin (IRM):** The minimum margin required to open a position. This initial required margin is calculated by the following formula:

`Open Price * Position Size * (1 / Leverage)`

*Note : for Infinity, IRM is 1% for the first 50 BTC (100x leverage) and increase in step of 0.5% for every additional 50 BTC added to the combined position.**Refer **here** for more information***Allocated Margin (AM):** Margin which has been allocated to the open position. When an isolated position is open, initial required margin is the allocated margin. Allocated margin value can be changed as long as the position is open, and its value will always be greater than, or equal to the Initial Required Margin (AM >= IRM)

**Margin Maintenance (MM):** Maintenance margin is the margin required to maintain the position.

`MM = Order Value * p Where p is the default percentage`

Default maintenance margin for Margin trading percentages : **p = 2%**

*Note : for Infinity, IRM is 0.5% for the first 50 BTC (100x leverage) and increase in step of 0.5% for every additional 50 BTC added to the combined position.Refer **here** for more information*

I**solated Margin (IM):** Margin assigned to a position is restricted to a certain amount defined by the user (From what they have available in their funding account).

**Short position**

`Liquidation Price = Open Price - (Maintenance Margin - Allocated Margin)/Position_Size`

**Long Position**

`Liquidation Price = Open Price + (Maintenance Margin - Allocated Margin) / Position_Size`

**Short position**

Liquidation Price = Open Price - (Maintenance Margin - Allocated Margin)/Position_Size

Example :

Trader opens a short position size of 2 BTC at the open price of $8000. The maintenance margin is 0.5% of the open price which is $80, and the allocated margin is 1% of the open price which is $160.

Open Price : $8000, Position Size : 2 BTC, MM : 0.5% ( $80 ), Allocated Margin : 1% ( $160 )

`Liquidation Price = 8000 - ( 80 - 160 ) / 2 = 8040`

This short position will be liquidated at liquidation price of $8040.

**Long Position**

Liquidation Price = Open Price + (Maintenance Margin - Allocated Margin) / Position Size

Trader opens a long position size of 2 BTC at the open price of $8000. The maintenance margin is 0.5% of the open price which is $80 and the allocated margin is 1% of the open price which is $160.

Open Price : $8000, Position Size : 2 BTC, MM : 0.5% ( $80 ), Allocated Margin : 1% ( $160 )

`Liquidation Price = 8000 + ( 80 - 160 ) / 2 = 7960`

This long position will be liquidated at liquidation price of $7960.

#### Bankruptcy price

Force liquidated positions are marked at bankruptcy price. Bankruptcy price is the price that just below which (for long positions) or just above which (for shorts) makes the position equity negative. In general, bankruptcy price can be calculated as follows:

**Short position**

Bankruptcy Price = Open Price + Allocated Margin/Position Size

Trader opens a short position size of 2 BTC at the open price of $8000. The allocated margin is 1% of the open price is $160.

Open Price : $8000, Position Size : 2 BTC, Allocated Margin : 1% ( $160 )

`Bankruptcy price = 8000 + 160 / 2 = 8080`

This short position has a bankruptcy price of $8080

**Long Position**

Bankruptcy Price = Open Price - Allocated Margin/Position Size

Trader opens a long position size of 2 BTC at the open price of $8000. The allocated margin is 1% of the open price is $160.

Open Price : $8000, Position Size : 2 BTC, Allocated Margin : 1% ( $160 )

`Bankruptcy price = 8000 - 160 / 2 = 7920`

This long position has a bankruptcy price of $7920