> For the complete documentation index, see [llms.txt](https://docs.reya.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reya.xyz/developers/devnet/risk/liquidations-and-adl.md).

# 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](/developers/devnet/risk/margin-system.md#what-margin-balance-means) falls below its **liquidation margin requirement (LMR)**. Liquidation is driven purely by margin — see the [Margin System](/developers/devnet/risk/margin-system.md) for what margin balance is and how LMR is computed. Keeping headroom above LMR is the only way to avoid being liquidated.

## 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.

{% hint style="info" %}
The current waterfall **transfers positions** to counterparties (Dutch → Backstop LP → Insurance Fund → ADL). An additional [order-book liquidation flow](/developers/devnet/under-development/whats-next.md#order-book-liquidation-flow) is planned; it is not part of the current mechanism.
{% endhint %}

## 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.

{% hint style="info" %}
This page describes the **mechanism**. The exact thresholds, reward parameters, and percentages are configured by governance and may change.
{% endhint %}
