Position A (worst-loser-first in a shortfall)

Position B

Account health ratio (equity ÷ maintenance requirement)

Haircut waterfall — what actually gets trimmed

The engine works through positions worst-loss-first. It stops as soon as the shortfall clears — most of the time only one position, and only part of it, is ever touched.

ПозицияНереализованный прибыль и убытокMaint. requirementNotional closed% of position closed

Full liquidation vs. haircut liquidation

On a traditional isolated-margin exchange, breaching maintenance margin on a position closes that entire position (often with a liquidation-fee penalty on top). On an account-wide "haircut" engine — the model BULK's perpetual DEX popularized in 2026 — a shortfall is measured against the whole account's equity vs. maintenance requirement, and the fix is the smallest notional reduction, anywhere in the portfolio, that clears it. A trader who would have lost an entire position on a legacy exchange may keep most of it open here. See Vertex cross-margin buying power for the flip side of the same shared-equity idea, and ADL risk score for the auto-deleveraging queue that some venues use instead of an insurance fund when a liquidation can't be filled.

The math behind a haircut liquidation

Every position contributes posted margin notional/leverage to total collateral C, and unrealized PnL notional × (mark/entry − 1) × (long ? 1 : −1) to total unrealized PnL U. Account equity is simply E = C + U. Each position also has its own maintenance requirement notional × maintenance_rate, and the account's total requirement M is the sum across every open position. The account is healthy whenever H = E / M ≥ 1 (this calculator uses a small buffer above 1.0, the target ratio, so the engine doesn't have to re-trigger on the very next tick).

When H drops below the target, the engine needs to shed just enough maintenance requirement to get back to it: M_target = E / target, так ΔM = M − M_target must be removed. Because closing any amount Δ of a position's notional reduces that position's maintenance requirement by Δ × maintenance_rate, the engine solves Δ = take / maintenance_rate for however much of ΔM it takes from that position, capped at the position's full notional. It works through positions ordered by worst unrealized loss first, moving to the next only once the current one is fully closed and a shortfall still remains.

This is why a haircut can, in a severe enough drawdown, still reach into a profitable position: closing any position reduces M by the same formula regardless of its PnL sign, so once every losing position in the account has been fully liquidated and a shortfall remains, the engine has no choice but to trim a winner too. And if E ≤ 0 before any of this — the losses have already exceeded all posted collateral — no amount of notional-trimming fixes it; that's straightforward insolvency, not a haircut case.

Делиться: 𝕏 Сообщение Реддит
Разместите свою сделку на:BybitBinanceOKXKuCoin|📈 ТрейдингВью🔒 НордВПН📧 Ледяная почта