> For the complete documentation index, see [llms.txt](https://docs.flash.trade/flash-trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flash.trade/flash-trade/flash-trade-protocol/perpetuals-specifications/liquidation.md).

# Liquidation

### Calculating Liquidation Price

The liquidation price is the threshold at which a position is automatically closed to prevent further losses. Three inputs determine it:

* **Maintenance margin** — the minimum collateral a position must keep, equal to `position size × (1 / max maintenance leverage)`. When collateral falls below this line, liquidation can trigger.
* **Unsettled obligations** — fees the position owes the pool (the close fee plus accrued margin fees). These reduce your effective collateral continuously, moving the liquidation price even without price action.
* **Your collateral and entry** — more collateral (lower leverage) puts the liquidation price further away.

Maintenance leverage is a per-pool protocol parameter (as of 2026-07-03; tunable):

| Pool                            | Max maintenance leverage |
| ------------------------------- | ------------------------ |
| Crypto Pool markets             | 1000x                    |
| Gold Pool — forex               | 2000x                    |
| Gold Pool — metals              | 200x                     |
| Gold Pool — oil, gas            | 50–100x                  |
| Defi Pool markets               | 100x                     |
| Meme, FART, Ore, Equity markets | 50x                      |

{% hint style="info" %}
**Watch the panel, not the math.** Your live liquidation price shows in the order panel before you confirm and on every open position afterward. Higher leverage puts it closer to the current price.
{% endhint %}

#### The Liquidators

Keeper bots continuously monitor every position and liquidate promptly once a position exceeds its maintenance threshold, executing on Flash's low-latency execution layer.

Flash's margining engine does not require an insurance fund: the pool that backs each position is always the counterparty, so there is always liquidity to close against. Liquidation proceeds are another source of yield for liquidity providers — any remaining maintenance margin is not returned to the trader.


---

# 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.flash.trade/flash-trade/flash-trade-protocol/perpetuals-specifications/liquidation.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.
