# Liquidations

Nunchi markets use the **Hyperliquid core liquidation engine**.

A position is liquidated if its margin falls below the maintenance requirement based on the **mark price**.

### The liquidation process

When maintenance margin is breached, the system sends market orders to reduce or close the position until the account’s equity is back above maintenance.

If liquidation succeeds:

* remaining collateral stays in the user’s account.

### Partial liquidations

To reduce market impact:

* for positions **> $100,000 notional**, the engine first liquidates **20%**,
* then enforces a **30‑second cooldown** for that account,
* if still under‑margined during the cooldown, subsequent liquidation targets the remaining size.

### No liquidator vault

Unlike some validator‑deployed perps, Nunchi HIP‑3 markets do not use a liquidator vault backstop mechanism.

### Estimating liquidation price

The UI typically shows:

1. **Pre‑trade estimate** (guide, may differ at fill)
2. **Post‑fill estimate** (changes with funding, cross‑margin equity)

#### Margin modes

* **Isolated margin:** leverage directly affects liquidation price.
* **Cross margin:** liquidation depends on total account equity and all positions.

> Nunchi HIP‑3 markets use **isolated margin by default**.

### Formula (reference)

A commonly used form is:

`liq_price = price - side * (margin_available / position_size) / (1 - l * side)`

Where:

* `side = +1` for long, `-1` for short
* `l = 1 / maintenance_leverage`
* `margin_available = isolated_margin - maintenance_margin_required`

Always validate current maintenance/leverage parameters in the UI.
