# Liquidation

Mosaiq liquidates at the **account level**, not per isolated position. An
account becomes liquidatable when:

```text
accountValue < maintenanceMarginUsed
```

`accountValue` is cash plus unrealized PnL. `maintenanceMarginUsed` is computed
from settled positions using Mosaiq oracle prices. Open orders reserve initial
margin, but they are not part of maintenance margin.

## How It Runs

Liquidation is evaluated inside the risk tick after funding, confirmed fills,
fill fees, and user requests have been processed. Fills are settled before user
requests, so the engine liquidates from the freshest settled account state
available for that tick.

When an account is liquidatable, Mosaiq:

1. cancels the account's open orders;
2. picks the position leg contributing the most maintenance risk;
3. sends one market reduce through the OMS;
4. settles the confirmed fill back into the ledger;
5. rechecks the account on the next tick.

This is usually **partial liquidation**. Mosaiq reduces enough risk to restore
the account above maintenance, capped per tick, instead of flattening the entire
account immediately.

## Pricing and Venue

Liquidation uses Mosaiq oracle prices for health checks. Execution is sent to
the venue leg that created the position, using the same durable OMS pipeline as
normal orders.

Hyperliquid reduces are sent as marketable IOC limits. Lighter reduces use the
venue's native market order path.

## Costs

A liquidation reduce is a taker execution. It pays:

* Mosaiq's venue-specific exchange fee tier;
* Mosaiq's taker fee from [Fees](/concepts/fees);
* a liquidation penalty based on the maintenance risk reduced.

The penalty is part of the liquidation sizing model and is booked when the
liquidation fill settles.

## Beta Limits

If a reduce is already in flight, Mosaiq does not stack another one for the
same account. If repeated reduce attempts fail without progress, the account is
marked for manual intervention instead of retrying forever.

Losses are not socialized across healthy users.

Venue-level collateral movement is handled separately by
[Rebalancing](/concepts/rebalancing).
