← All lessons

Learn · lending

Liquidations: eligibility, execution and loss

A liquidator pays down someone else’s debt and receives collateral in return. The bonus creates an incentive to act. Selling that collateral is a separate trade, with a separate outcome.

Build on lending basics and lending yield. All values below are fictional; this is not an exact reproduction of any Aave version. No transactions are submitted.

First: is the loan eligible?

For one collateral asset, health factor (HF) is collateral quantity × oracle price × liquidation threshold ÷ debt. Below 1, a loan is eligible in this model. At 1 or above it is not. Zero debt has no liquidation health factor. A price fall or growing interest debt can move an existing loan below the boundary.

The close factor caps the fraction of debt repaid in one liquidation. Our fixed 50% is fictional. Actual rules vary by version, market and position. Eligibility allows an operation; it does not guarantee someone will submit a profitable transaction.

Fictional · computed in your browser

Follow the liquidator’s money

Borrower: 2 collateral tokens, 1,800 debt tokens. Fictional threshold 80%, close factor 50%, bonus 5%. The liquidator starts with 2,000 debt tokens; lending pool cash starts at 1,000. Debt token assumed $1. Sale uses a separate constant-product pool, initially priced at the oracle, with 0.3% input fee. No flash loan or protocol bonus fee. Costs are paid on execution; a failed attempt’s gas is omitted.

1. Liquidator → lending pool: debt2. Borrower → liquidator: collateral3. Liquidator → swap pool: sale

1 / 3 · Check eligibility

HF 0.889: eligible for liquidation.

Repayment allowed by caps
$900.00
Borrower debt remaining
$1,800.00
Borrower collateral remaining
2.0000 tokens
Lending pool cash
$1,000.00
Liquidator cash
$2,000.00
Liquidator collateral held
0.0000 tokens
Swap pool collateral / cash
100.0000 / $100,000.00
Cost recipient received
$0.00

Repayment is capped by the request, 50% of debt, available collateral including the bonus, and the liquidator’s starting cash. Repayment and collateral transfer are one operation here.

Start with the healthy loan: stepping forward moves nothing. Then compare the deep market with the costly sale. Both stressed positions are eligible, but their realised outcomes differ. Try requesting more repayment than the close factor allows.

The borrower pays for the bonus

With a $900 repayment and a 5% bonus, the liquidator receives collateral valued at $945 at the oracle price. Borrower debt falls by $900 while collateral falls by $945. Lending-pool cash rises by $900 and its loan receivable falls by $900. No new value appears in that accounting transfer.

At a $1,000 oracle price, that is 0.945 collateral tokens. If insufficient collateral remains, repayment must be capped to what it can support including the bonus. Even seizing all collateral may leave unpaid debt. Partial liquidation also need not restore a health factor above 1.

A liquidator repays 900 debt tokens and takes collateral worth 945 at the oracle price. What happens to the borrower?

An oracle value is not a sale guarantee

The separate swap pool has finite inventory. Selling collateral changes its reserve ratio, so the average execution price is lower than the starting price. The swap fee and execution cost further reduce proceeds. The lab’s price impact comes from the actual constant-product calculation, rather than a fixed haircut.

Real liquidators also compete with other transactions. Prices can change before inclusion, liquidity can disappear and a reverted attempt can still cost gas. Oracle errors, congestion or an unprofitable recovery can allow bad debt to persist. Those outcomes can affect suppliers as well as borrowers.

HF is below 1 and the bonus is 5%. Does execution guarantee profit?

Scope and sources

The lab omits multiple assets, dynamic close factors, liquidation protocol fees, token rounding, oracle delay, flash-loan fees and transaction ordering. It assumes sale-pool starting price equals the oracle price. Read Aave’s health factor and liquidation guide for the protocol context. Parameters here explain relationships and should not be used to size a live trade.