Skip to content
Reading depth

Each view includes the earlier layers; the complete engineer or auditor page is shown by default.

Lending liquidation repays or assumes unsafe debt and transfers or sells collateral under protocol rules to restore solvency or limit further loss.

Split balance category cue

Lending liquidation repays unsafe debt and transfers or sells collateral under protocol rules to restore coverage or limit further loss.

Collateral protects suppliers only if the system can convert it into debt repayment before its recoverable value falls too far. Liquidation creates an economic incentive and settlement path for an external actor or protocol module to perform that conversion.

A margin call followed by collateral foreclosure is a useful analogy. DeFi liquidation is often permissionless and immediate once contract conditions hold, with no discretionary cure period. Oracles, close limits, bonuses, market depth, gas, transaction ordering, and contract code replace parts of the broker and legal process.

The borrower owes debt and retains a residual claim on collateral. The pool or lender needs repayment. A liquidator supplies the debt asset and receives collateral or sale proceeds plus an incentive. An oracle determines eligibility. A DEX or auction may convert collateral. Reserves or backstops address only the shortfall their rules cover.

  1. Accrue debt and value eligible collateral from the selected oracle state.
  2. Evaluate the protocol’s health-factor or liquidation rule.
  3. Bound repayment by debt, close rules, dust rules, and caller input.
  4. Calculate collateral seizure, bonus, fees, decimals, and rounding.
  5. Transfer repayment and collateral atomically or execute the documented auction path.
  6. Update debt, collateral, reserves, and the borrower’s residual position.
  7. Re-evaluate safety; recognize bad debt if recovery is exhausted.

For a simple direct-seizure model:

seizedCollateralAmount
= repaidDebtValueUsd × (1 + liquidationBonus)
/ collateralPriceUsd

liquidationBonus is a fraction. The formula omits protocol fees, close limits, slippage, rounding, and model-specific discounts unless added explicitly.

Capital flow is repayment, collateral, bonus, and fees. Information flow is prices, thresholds, balances, and eligibility. Claim flow reduces borrower debt, extinguishes part of the creditor’s receivable, and transfers the corresponding collateral entitlement. Return flow gives the liquidator an incentive funded from borrower collateral. Risk flow reaches the borrower through seizure and the pool or suppliers through any residual shortfall.

The liquidation incentive is not newly created yield: the borrower pays it through additional seized collateral so that a liquidator has reason to supply the debt asset promptly. Any protocol fee has its separately named recipient and charging rule.

The simplified state transition assumes a valid debt balance, an eligible and fresh oracle price, transferable collateral, sufficient execution liquidity, and protocol-specific close, bonus, fee, decimal, and rounding rules. A stale or manipulated price, fast market gap, unprofitable transaction, exhausted collateral, failed transfer, or inconsistent accounting can block recovery or leave bad debt. Borrowers lose seized collateral first; pool suppliers or the documented backstop bear any shortfall that remains.

Test exact eligibility boundaries, stale and zero prices, mixed decimals, interest accrual, partial and full close, dust, minimum sizes, bonus and fee rounding, collateral exhaustion, repeated calls, callback and reentrancy, front-running, price gaps, paused markets, and each failed transfer. Liquidation must never repay more debt or seize more collateral than exists.

Aave’s liquidation documentation describes one V3 health-factor, close, and bonus model. Compound v2’s cToken documentation shows another close-factor and seized-claim implementation. Protocol versions and parameters change; these examples do not define a universal liquidation rule. Both references were reviewed 2026-08-10.

  • “Liquidation repays the whole loan.” Close limits, incentives, dust, and available collateral can leave a residual position.
  • “The oracle price is the sale price.” Actual recovery can include market impact, fees, latency, and failed execution.
  • “A bonus is free protocol yield.” It is paid from borrower collateral to motivate time-sensitive repayment.

Next follow an unrecovered residual in bad debt.

Machine-readable model

Key equations

Canonical expressions come from the structured concept record. KaTeX renders the notation, while the plain-text expression and variable table keep its meaning and units inspectable without JavaScript. Read the narrative above for the model's domain, assumptions, and rounding rules.

  1. Equation 1

    Plain-text equation: seizedCollateralAmount = repaidDebtValue * (1 + liquidationBonus) / collateralPrice

Assurance contract

Security properties

These structured statements define desired behavior. Their stable IDs can bind tests, invariants, specifications, audit findings, or proof results without turning descriptive review advice into an assurance claim.

Desired · not evaluated: No test, audit, or proof result is implied until scoped evidence is linked to this property.

  1. Only eligible positions can be liquidated from the same prices and thresholds settlement uses

  2. Liquidation repays no more debt than exists and seizes no more collateral than exists or the rule permits

  3. Debt repayment, collateral transfer, bonus, fees, and residual balances reconcile atomically

  4. Partial, full, repeated, and failed liquidations cannot settle the same debt or collateral twice

Knowledge check

Quiz

Answer in your own words, then open the model answer.

What problem does Lending liquidation exist to address?

Model answer

Liquidation gives overcollateralized lending systems a time-sensitive mechanism to turn pledged collateral into debt repayment before the position becomes insolvent.