> For the complete documentation index, see [llms.txt](https://docs.fluvion.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fluvion.io/perpetual-futures-mechanics/liquidations.md).

# Liquidations & Risk Engine

Liquidation is an automated safety process designed to protect the exchange, market participants, and overall protocol solvency when a trader's account margin is insufficient to support their open positions.

***

## When Does Liquidation Occur?

An account or isolated position enters liquidation when its **Account Margin Ratio (AMR)** drops below its required **Maintenance Margin Ratio (MMR)**:

```
Liquidation Condition: Account Margin Ratio < Maintenance Margin Ratio
Account Margin Ratio = Total Collateral Value / Total Notional Position Value
```

> \[!IMPORTANT] **Mark Price Protection**: All margin ratios and liquidation thresholds are evaluated strictly against the **Mark Price**, not the Last Traded Price. This completely eliminates the danger of predatory wick-hunting, where artificial price swings on a single venue might otherwise trigger premature liquidations.

***

## The Non-Cascading Liquidation Advantage

On traditional centralized exchanges, liquidations are executed by force-dumping market orders directly into the orderbook. During high-volatility crashes, this triggers a devastating **cascading feedback loop**:

```
[Forced Market Dump] -> [Price Crashes Further] -> [Triggers More Liquidations] -> [Vicious Spiral]
```

### Fluvion's Decentralized Position Transfer:

Fluvion does **not** dump liquidating positions onto the open orderbook. Instead, liquidating positions are transferred directly to whitelisted **Liquidators** at a predefined discount.

* **Zero Slippage on Orderbook Depth**: Normal trading books remain calm and stable.
* **Structured Resolution**: Positions are absorbed without causing market panic or liquidity drain.

***

## The Liquidation Execution Flow

```mermaid
flowchart TD
    Step1[1. Detection\nAMR falls below required MMR] --> Step2[2. Cancel & Freeze\nAll open resting orders are cancelled\nAccount actions frozen]
    Step2 --> Step3[3. Minimum Reduction Sizing\nCalculate minimum size to restore AMR >= IMR\n(Partial liquidation priority)]
    Step3 --> Step4[4. Liquidator Transfer & Settlement\nLiquidators claim positions at discount\nFees split with Insurance Fund]
    Step4 --> Step5{Account Solvency Check}
    Step5 -->|Positive Equity Remains| Step6[Account unfreezes\nTrader keeps remaining balance]
    Step5 -->|Equity < 0 (Bankrupt)| Step7[5. Insurance Fund absorbs deficit\nLiquidators paid from Insurance Fund]
    Step7 -->|If Insurance Fund Exhausted| Step8[6. Auto-Deleveraging (ADL)\nProfitable counterparties deleveraged]
```

### Step 1: Detection

The off-chain risk engine continuously monitors account equity and detects that the Account Margin Ratio has breached the required MMR threshold.

### Step 2: Cancel Open Orders & Freeze Account

1. All resting limit orders, stop triggers, and conditional orders are immediately cancelled to free up reserved margin.
2. The account's collateral withdrawals and transfers are temporarily locked.

### Step 3: Partial Liquidation Calculation

Rather than automatically wiping out the trader's entire portfolio, the risk engine calculates the **minimum position size** that needs to be transferred to bring the account's AMR back above the safe **Initial Margin Ratio (IMR)**.

### Step 4: Position Transfer & Liquidation Fee

Liquidators take over the designated position slice. A liquidation fee is deducted and split between the **Liquidator** and the **Insurance Fund**:

| Market Tier      | Markets          | Liquidation Fee | Liquidator Share | Insurance Fund Share |
| ---------------- | ---------------- | :-------------: | :--------------: | :------------------: |
| **Major Tier**   | SOL, BTC, ETH    |    **0.60%**    |       0.30%      |         0.30%        |
| **Altcoin Tier** | Altcoins & Memes |    **1.20%**    |       0.60%      |         0.60%        |

***

## Insurance Fund & Auto-Deleveraging (ADL)

### 1. The Insurance Fund

The **Insurance Fund** serves as the primary capital backstop for platform solvency. It is funded by the protocol's share of liquidation fees.

* If an account experiences extreme slippage and becomes **bankrupt** (total account equity drops below zero before liquidators can absorb the position), the Insurance Fund steps in to absorb the deficit.
* The trader is never pursued for negative debt, and counterparties are paid in full.

### 2. Auto-Deleveraging (ADL)

In the extraordinarily rare event that extreme market turmoil depletes the Insurance Fund entirely, the platform activates **Auto-Deleveraging (ADL)** as the ultimate backstop.

* ADL automatically closes out bankrupt positions against the most profitable and highest-leveraged counterparty traders.
* Traders can monitor their **ADL Priority Indicator** (a 5-bar meter displayed on their active position card in the Web UI). Higher profit and higher leverage place a position higher in the ADL ranking.

***

## How to Avoid Liquidation

1. **Maintain Adequate Margin**: Monitor your **Account Margin Ratio (AMR)** in the dashboard and deposit additional USDC collateral well before approaching MMR.
2. **Use Lower Leverage**: Lower leverage (e.g., 5x–10x instead of 50x–100x) creates a much wider safety buffer between your entry price and liquidation price.
3. **Always Set Stop-Loss (SL) Orders**: Attach a Stop-Loss trigger to every position. An SL order will automatically close your trade at a controlled loss before liquidation thresholds are ever reached.
4. **Utilize Isolated Margin**: For high-risk speculative trades, switch to **Isolated Margin** mode so that any potential loss is strictly confined to the allocated trade collateral without endangering the rest of your account.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fluvion.io/perpetual-futures-mechanics/liquidations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
