Lending liquidation
Lending liquidation repays or assumes unsafe debt and transfers or sells collateral under protocol rules to restore solvency or limit further loss.
Category: LendingSplit balance category cue
System record
Start with the economic purpose, participants, resources, and entitlements before studying implementation detail.
Why it exists
Liquidation gives overcollateralized lending systems a time-sensitive mechanism to turn pledged collateral into debt repayment before the position becomes insolvent.
Traditional-finance analogy
Margin call and collateral foreclosure is the closest comparison recorded for this concept.
Where the analogy stops
- DeFi liquidation is often permissionless and transaction-driven, with no discretionary cure period unless the contract explicitly provides one.
- Oracles, DEX liquidity, close factors, bonuses, ordering, and gas determine whether the programmed protection works during stressed markets.
Main actors
- ActorBorrower
- ActorLender or lending pool
- ActorLiquidator
- ActorOracle
- ActorDecentralized exchange or auction
- ActorGovernance, reserve, or backstop provider
Assets and claims
Assets — controlled or transformed resources
Assets are resources the mechanism moves, holds, values, or transforms.
- AssetRepaid debt asset
- AssetSeized or sold collateral asset
- AssetLiquidation bonus and protocol fee
Claims — entitlements and corresponding dependencies
Claims are rights to value, repayment, redemption, control, or another party's performance; each depends on an obligation or system that must honor it.
- ClaimBorrower debt reduced by repayment
- ClaimBorrower's residual collateral claim
Lending liquidation repays unsafe debt and transfers or sells collateral under protocol rules to restore coverage or limit further loss.
Why it exists
Section titled “Why it exists”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.
Traditional-finance analogy
Section titled “Traditional-finance analogy”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.
Actors, assets, and claims
Section titled “Actors, assets, and claims”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.
Step-by-step mechanism
Section titled “Step-by-step mechanism”- Accrue debt and value eligible collateral from the selected oracle state.
- Evaluate the protocol’s health-factor or liquidation rule.
- Bound repayment by debt, close rules, dust rules, and caller input.
- Calculate collateral seizure, bonus, fees, decimals, and rounding.
- Transfer repayment and collateral atomically or execute the documented auction path.
- Update debt, collateral, reserves, and the borrower’s residual position.
- Re-evaluate safety; recognize bad debt if recovery is exhausted.
For a simple direct-seizure model:
seizedCollateralAmount= repaidDebtValueUsd × (1 + liquidationBonus) / collateralPriceUsdliquidationBonus is a fraction. The formula omits protocol fees, close limits,
slippage, rounding, and model-specific discounts unless added explicitly.
State transition
Section titled “State transition”| Item | Before | Liquidation change | After |
|---|---|---|---|
| Borrower debt | D | -R repayment | D - R, never below zero |
| Borrower collateral | C | -S seized | C - S, never below zero |
| Liquidator debt asset | Held | -R | Paid to pool or lender |
| Liquidator collateral | None | +S | Receives collateral or proceeds |
Return source and payer
Section titled “Return source and payer”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.
Assumptions and failure modes
Section titled “Assumptions and failure modes”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.
Engineer or auditor lens
Section titled “Engineer or auditor lens”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.
Common misunderstandings
Section titled “Common misunderstandings”- “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.
Equation 1 Plain-text equation:
seizedCollateralAmount = repaidDebtValue * (1 + liquidationBonus) / collateralPriceVariables and units for equation 1 Symbol Meaning Unit seizedCollateralAmountSeized Collateral Amount collateral-token units repaidDebtValueRepaid Debt Value selected valuation unit (for example, USD) liquidationBonusLiquidation Bonus dimensionless fraction (1 = 100%) collateralPriceCollateral Price valuation units per collateral-token unit
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.
Only eligible positions can be liquidated from the same prices and thresholds settlement uses
Liquidation repays no more debt than exists and seizes no more collateral than exists or the rule permits
Debt repayment, collateral transfer, bonus, fees, and residual balances reconcile atomically
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.