For the complete documentation index, see llms.txt. This page is also available as Markdown.

Liquidations & ADL

When an account falls below its margin requirement, Reya brings it back to health through a waterfall of mechanisms. The protocol attempts the cheapest, most market-driven step first and escalates only if that step doesn't fully clear the account. This page describes the mechanism so you understand what to expect; as an integrator there is no special exemption from it.

When an account is liquidatable

An account becomes liquidatable when its margin balance falls below its liquidation margin requirement (LMR). Liquidation is driven purely by margin — see the Margin System for what margin balance is and how LMR is computed. Keeping headroom above LMR is the only way to avoid being liquidated.

Monitoring your distance to liquidation

Two read endpoints report how close an account is, each with a WebSocket channel of the same name in the WebSocket Info API:

  • Per account: GET /v2/wallet/{address}/accountSummaries returns marginBalance and liquidationMarginRequirement. Their ratio is liquidationMarginRatio: the account is liquidatable once it exceeds 1. The ratio is null when marginBalance is zero or negative. See Reading margin from the API.

  • Per position: GET /v2/wallet/{address}/positionRisk returns each open position's markPrice, notional, unrealizedPnl, liquidationMarginRequirement and an estimated liquidationPrice.

liquidationPrice is a cross-margin estimate. It is the mark at which the account's margin balance would equal its LMR if only this market's mark moved, with every other mark, collateral price and funding value fixed. It is rounded onto the market's price tick, toward the current mark. Read it with these caveats:

  • hasCorrelatedCollateral: true means the account holds non-stable collateral that tracks this market. The estimate holds that collateral's price fixed, so it is less reliable. For a long, the collateral falls with the mark, and liquidation comes sooner than the estimate.

  • A null liquidationPrice means no positive price is a liquidation boundary. It does not mean the account is safe: other markets and collateral prices still move its margin.

  • The figures are estimates from settled, indexed state. They are not guaranteed execution or liquidation prices.

Both endpoints value settled positions only, and return HTTP 503 rather than partial figures when a price is unavailable. A 503 means the figures are temporarily unavailable, not that the account is safe.

The liquidation waterfall

1. Dutch liquidation — permissionless, auction-style

The first and primary step, and the one that does the bulk of the work. Dutch liquidation is fully permissionless: any account in the same collateral pool can directly call executeDutchLiquidation on the Core contract to take pieces of an unhealthy account's position, choosing which markets to hit and at what size.

  • It is a direct on-chain call, not an order-book action. You do not place a liquidation order on the book; liquidators call the contract directly.

  • The reward ramps with unhealthiness. The protocol computes the liquidator's reward from the account's on-chain health at the moment of the call — the further below LMR the account has fallen, the larger the reward. This produces an auction-style incentive: keepers race to catch a position as soon as it becomes liquidatable, and anyone arriving later still earns a strictly larger reward as the account deteriorates. The liquidator does not choose the reward; the protocol sets it from health at call time.

  • No queue, no priority. The first valid transaction to land wins.

2. Backstop liquidation

If Dutch liquidation hasn't cleared the account by the time it deteriorates past a deeper threshold, a designated backstop LP absorbs a portion of every remaining position in the affected collateral bubble, taking them at mark-or-better. This is a protocol-level safety step that warehouses positions the open Dutch process didn't catch in time.

3. Insurance Fund

If the account is still insolvent after the backstop step, the Insurance Fund transfers funds to cover the remaining deficit, up to its available balance.

4. Auto-deleveraging (ADL)

The last resort. If the Insurance Fund is exhausted, the remaining loss is socialised across counterparties on the opposite side of each affected position — each position reduced in proportion to its size — with positions settled at the bankruptcy price so the system returns to zero net deficit. ADL is rare and only fires when every prior step has been insufficient.

The current waterfall transfers positions to counterparties (Dutch → Backstop LP → Insurance Fund → ADL). An additional order-book liquidation flow is planned; it is not part of the current mechanism.

What this means for integrators

  • No exemption from ADL. Any position you hold can be auto-deleveraged like any other counterparty if the waterfall reaches that stage, settled at the bankruptcy price. Account for this in your risk model.

  • You can participate in Dutch liquidations. Because Dutch is a permissionless direct contract call, you may run a keeper and earn liquidator rewards if you choose — but you are not required to.

  • Keep margin headroom. Liquidation triggers purely on margin, and keepers act quickly once an account crosses LMR. The cheapest outcome is never being liquidated in the first place.

This page describes the mechanism. The exact thresholds, reward parameters, and percentages are configured by governance and may change.

Last updated