> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fairground.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Liquidation

> How liquidation works, when it triggers, and what happens to your margin

export const MaintenanceMarginDefinition = "The minimum margin that must be maintained to keep a position open; falling below this level triggers liquidation. Equals ½ of the initial margin required at max leverage at the current oracle price (Notional ÷ (2 × Max Leverage)).";

export const MaintenanceMarginTerm = "Maintenance Margin";

export const PnLDefinition = "Profit and Loss from a trade. For longs: PnL = (Exit Price \u2212 Entry Price) \u00d7 Position Size. For shorts: PnL = (Entry Price \u2212 Exit Price) \u00d7 Position Size. For unrealized PnL, use current spot/oracle price instead of Exit Price.";

export const PnLTerm = "PnL";

export const PositionMarginDefinition = "Collateral locked to support a position. Position Margin = Net Contributions + System PnL.";

export const PositionMarginTerm = "Position Margin";

Liquidation is the process the protocol uses to **forcibly close positions that are at risk of not being able to cover losses**.

Every open position has a **<Tooltip headline={PositionMarginTerm} tip={PositionMarginDefinition}>{PositionMarginTerm}</Tooltip>** (your collateral allocated to that position, plus or minus <Tooltip headline={PnLTerm} tip={PnLDefinition}>{PnLTerm}</Tooltip>). As the oracle price moves, your position margin changes in real time and so does your position's health status.

The **<Tooltip headline={MaintenanceMarginTerm} tip={MaintenanceMarginDefinition}>{MaintenanceMarginTerm}</Tooltip>** for a position equals ½ of the initial margin that would be required to open the same position at *max leverage* at the *current price*. In other words:

> Maintenance Margin = Notional Position Value ÷ (2 × Max Leverage)

For example, a 1 BTC long at \$50,000 with max leverage 20x:

> Maintenance Margin = $50,000 ÷ (2 × 20) = $1,250

If your position margin falls below maintenance margin, your position can be liquidated.

## Position health statuses

As price moves, your position can move through these statuses:

| **Status**       | **When it applies**                                          |                                                                                     **What it means for you** |
| :--------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------: |
| **Healthy**      | position margin > maintenance margin                         |                                                                                          No liquidation risk. |
| **Liquidatable** | ⅔ maintenance margin ≤ position margin \< maintenance margin |                                                                                 Liquidation can be triggered. |
| **Seized**       | position margin \< ⅔ maintenance margin                      |                                        Remaining margin is treated as forfeit to the Insurance Fund on close. |
| **Underwater**   | position margin \< 0                                         | Your losses exceed your margin; the [Insurance Fund](/trading/advanced/insurance-fund) backstops the deficit. |

## How liquidation is triggered

Liquidation is triggered by a liquidation transaction, which anyone can submit for a specific position.

When liquidation is triggered for a position that has moved from **Healthy → Liquidatable**:

* The protocol **opens an order to close the position**.
* That close order has **no execution price threshold** (it is intended to get filled, not “wait for a better price”).
* The position owner **can no longer update the position** after liquidation is triggered.

That close order is then processed by the normal matching flow the next time matching runs.

<Note>
  If your position becomes **Liquidatable**, liquidation is triggered, and the protocol opens a close order. That close order stays open even if price later moves back and your position becomes technically healthy again before matching happens.

  In other words, once liquidation is triggered, the position is expected to be closed by the protocol during matching.
</Note>

## What happens when the close order fills

What you receive (or what happens to the remaining margin) depends on the position’s status **at the time the close order fills**:

* **If the position is Liquidatable at fill**: you receive your remaining margin back, **minus the standard trading fee** (see [Fees](/trading/fees-rebates)).
* **If the position is Seized at fill**: the remaining margin is sent to the **Insurance Fund**.
* **If the position is Underwater at fill**: the **Insurance Fund pays the deficit** (the negative margin) so the system remains solvent.

You can learn more about the backstop mechanism on the [Insurance Fund](/trading/advanced/insurance-fund) page.

## Liquidation price

Your **liquidation price** is the price at which your position margin would fall to exactly the maintenance margin level. Beyond this price, your position becomes liquidatable.

For a **long** position, the liquidation price is *below* your entry price. For a **short** position, it is *above* your entry price. Higher leverage means your liquidation price is closer to your entry price.
