> For the complete documentation index, see [llms.txt](https://fx100.gitbook.io/fx100-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fx100.gitbook.io/fx100-docs/how-the-system-works/liquidation.md).

# Liquidation

What happens after the protection window, and how the liquidation price is derived.

{% hint style="success" %}
Nothing on this page applies during the first 15 minutes of a position's life. See [liquidation protection](/fx100-docs/start-here/liquidation-protection.md).
{% endhint %}

## When a position becomes liquidatable

Each market has a **maintenance collateral factor**, `minCollateralFactorForLiquidation` (`minCF_liq`). It is lower than the collateral ratio required to open a position — the difference is your buffer.

```
remainingCollateral = collateral + PnL(oracle) + closingImpact − closingFee − pendingFunding

if remainingCollateral ≤ sizeInUsd · minCF_liq:
        position is eligible for liquidation
```

The test is done on what would be left **if the position closed right now**. Closing fees and closing impact are already deducted, because a liquidation is a forced close and those costs are real.

Both factors are configured per market. See [supported markets](/fx100-docs/markets/supported-markets.md).

## Liquidation price

```
LONG   liqPrice = entryPrice · (1 + minCF_liq + closeFeeRatio) − netCollateral / sizeInTokens
SHORT  liqPrice = entryPrice · (1 − minCF_liq − closeFeeRatio) + netCollateral / sizeInTokens

where  netCollateral = collateral + closingImpact − pendingFunding
```

| Term                         | Definition                                                                       |
| ---------------------------- | -------------------------------------------------------------------------------- |
| `minCF_liq`                  | Maintenance collateral factor, configured per market                             |
| `closeFeeRatio`              | Closing position fee rate — see [fees](/fx100-docs/how-the-system-works/fees.md) |
| `netCollateral`              | Collateral plus closing impact, minus pending funding                            |
| `entryPrice`, `sizeInTokens` | See [PnL and closing](/fx100-docs/trading/pnl-and-closing.md)                    |

Three properties worth understanding:

* **The closing fee is included.** A liquidation is still a close, so the fee still applies.
* **Closing impact is included.** The formula asks "what is left if this closes now", so unwinding cost is priced in.
* **Future funding is excluded.** It cannot be estimated, so it is treated as zero. Accrued funding will move your liquidation price over time.

## How a liquidation executes

Liquidation is triggered and executed by a keeper at the current oracle price. **The keeper is operated by the protocol**, and the liquidation fee accrues to the system rather than to whoever calls the transaction.

The position is force-closed against the liquidity vault. Because the unwind goes into the vault rather than a thin order book, it is insulated from the liquidity conditions that often accompany a liquidation cascade elsewhere.

```
Residual value = margin + PnL − funding − liquidationFee − closeFee − executionImpact
```

The liquidation fee is deducted from remaining collateral — it is not charged on top of your loss. Any residual collateral is returned to you, and a liquidation cannot produce a negative balance.

## Liquidations cannot be hunted

Two things make liquidations a target on venues with an order book and external liquidators. A third party is paid a bounty for closing your position, which creates a direct incentive to trigger one. And the price that triggers it is that venue's own book, which a large enough participant can push.

FX100 has neither. There is **no external liquidator bonus** — the keeper is protocol-operated and the fee accrues to the system. And the trigger price is the [Chainlink oracle](/fx100-docs/how-the-system-works/oracle.md), not a local book, so there is no venue-specific wick to manufacture.

{% hint style="info" %}
This does not make price manipulation impossible. The oracle tracks the broader market, and a participant capable of moving that market moves the oracle with it. What it removes is the cheap version — wicking one venue's book to trigger liquidations that pay a bounty. The 15-minute protection window covers the remainder.
{% endhint %}

## Managing a position near the line

If your position is approaching its liquidation price, you have direct control over it:

* **Add margin.** Moves the liquidation price away from current price at no fee.
* **Reduce leverage.** Same effect, charged a position fee on the reduction.
* **Set a stop loss.** Closes at market before liquidation, paying only the close fee rather than the liquidation fee.
* **Watch accrued funding on small positions held long.** It erodes net collateral and pulls the liquidation price toward you.
