Liquidation paths
When a trove falls under MCR, it's liquidatable — MCR is the only liquidation threshold, in every mode. Once a liquidation transaction is submitted, the protocol tries two paths in order to clear or reassign the undercollateralized debt. Redemption Shield is redemption protection, not liquidation protection: troves with and without it are liquidated under the exact same rules, and liquidateTroves walks both books together. This page covers the on-chain mechanics. User view is Liquidations & Recovery Mode.
The branch contracts involved: Liquidations, StabilityPool, Rewards, DefaultPool, ActivePool / ActiveShieldedPool, CollSurplusPool, GasPool, SortedTroves.
Entry points
Liquidations.liquidate(address _borrower)
Liquidations.liquidateTroves(uint _n)
Liquidations.liquidateTrovesLiquidator(uint _n, address _liquidator)
Liquidations.batchLiquidate(address[] _borrowers)
Liquidations.scanAndBatchLiquidateTroves(uint _n)
Liquidations.scanAndBatchLiquidateTrovesCohort(uint _n, bool _shielded)
liquidate is a one-off. liquidateTroves walks the bottom of both sorted lists — base and Redemption Shield — in ascending ICR and clears up to _n troves whose ICR is below MCR; liquidateTrovesLiquidator does the same but sends the gas compensation to _liquidator. batchLiquidate clears a caller-supplied list. The two scanAndBatchLiquidate... functions scan the sorted lists (both, or one cohort) for troves below MCR and pass them to batchLiquidate; they are a fallback for when the bottom of a list is out of order. The gas-compensation receiver can't be one of the branch's own collateral pools.
A depositor's StabilityPool.provideToSP also first tries liquidateTrovesOffsetOnly(10, depositor): it liquidates up to 10 troves using only the pool's existing RD and reverts (silently, inside a try) if any redistribution would be needed. This stops a new deposit from capturing liquidation gains that the existing depositors were already able to cover.
All of them require the branch oracle to be healthy (!priceFeed.isShutdown() and !priceFeed.previewWillShutdown(false)). If the branch oracle is failing, the branch must be shut down (the price feed calls BorrowerOperations.shutdownFromOracleFailure()) instead.
The two paths
1. Offset against the Stability Pool
If the branch's StabilityPool has enough RD to cover the trove's debt, the protocol offsets in full. The pool always keeps 1 RD back (MIN_RD_IN_SP), so what it can offset is StabilityPool.getMaxAmountToOffset():
SP burns: trove.debt RD from depositor balances (pro-rata), including the 200 RD gas reserve portion
SP gains: the trove's collateral (after the 0.5% caller kicker), capped at
trove.debt × par × LIQUIDATION_PENALTY / oracle_price
where LIQUIDATION_PENALTY = 1.05 (= up to 5% spread to depositors)
(per-branch parameter, 105% on every branch)
LIQUIDATION_PENALTY is the multiplier that determines how much collateral the SP receives. At 1.05, depositors get collateral worth up to 105% of the burned debt's par value, capped by the trove's actual collateral. The 5% spread is the gross depositor incentive at the oracle price; realized value can differ as market prices move.
The remainder of the trove's collateral, if any, is the "surplus"; the borrower can claim it via BorrowerOperations.claimCollateral().
2. Redistribution
If the SP is empty or under-funded, the residual debt and collateral are redistributed to other troves on the branch:
DefaultPool receives:
debt: trove.remaining_debt
coll: min(trove.remaining_coll,
remaining_debt × par × LIQUIDATION_PENALTY_REDIST / oracle_price)
where LIQUIDATION_PENALTY_REDIST = the branch's MCR
(110% on WETH, up to 130% on WBTC, weETH and PAXG)
The deployment requires 1 ≤ LIQUIDATION_PENALTY ≤ LIQUIDATION_PENALTY_REDIST ≤ MCR; on mainnet every branch sets the redistribution penalty equal to its MCR.
Like the offset path, this is a cap on seized value, not a multiplier on the trove's collateral:
absorbing troves receive at most LIQUIDATION_PENALTY_REDIST times the redistributed debt's par value
(110% on WETH), and any collateral beyond the cap goes back to the borrower as surplus.
Every other active trove on the branch inherits a pro-rata slice of the DefaultPool balance. The redistribution accumulators (L_Coll for collateral; L_baseNormRDDebt / L_shieldNormRDDebt for debt) are updated.
On any future state-touching call (open, adjust, close, liquidate) of an active trove, Rewards.applyPendingRewards(...) settles the trove's slice: adding the inherited collateral and debt to its position.
Mixed liquidations
If the SP has some RD but not enough, the protocol splits:
SP_RD = stabilityPool.balance
SP_offset = trove.debt that SP can absorb
redistribute = trove.debt - SP_offset
offset: SP burns SP_offset RD, gets coll × SP_offset / trove.debt, capped at (SP_offset × par × 1.05 / price)
redist: DefaultPool gets remaining coll, capped at (redistribute × par × LIQUIDATION_PENALTY_REDIST / price)
The mixed path is gas-heavier. The trove closes; part of its debt is burned against the Stability Pool and the rest is reassigned, with collateral allocated between Stability Pool depositors and surviving troves.
What a liquidation costs the borrower
Both penalties are caps on seized value, measured at par: debt × par × penalty / price
(_maxPenaltyColl). Everything above the cap is credited back to the borrower through the
CollSurplusPool. The bars below split an example 10,000 RD trove between the caller, the
recipients, and the borrower on each path — drag the ICR to see the surplus shrink to zero exactly
at the penalty cap:
Three things fall out of the caps. Liquidation is bounded, not confiscatory — at any ICR above the cap the borrower gets collateral back. A funded Stability Pool lowers the borrower's penalty (5% vs 10% on WETH, 5% vs 30% on the 130% MCR branches), which is one more reason the protocol wants deposits in it. And below the cap the loss inverts: the recipients absorb the shortfall, which is why liquidating early (just under MCR) is better for everyone than liquidating late.
Liquidator compensation
Every active trove holds RD_GAS_COMPENSATION = 200 RD in the protocol's GasPool. On liquidation, the protocol pays the liquidator (the EOA or contract that triggered the call, or the receiver it named) in two parts:
- 200 RD from
GasPool: a fixed RD-denominated reserve. - A small collateral kicker:
_getCollGasCompensation()returnsentireColl / 200— 0.5% of the trove's collateral, paid in the branch's collateral token.
entireColl / 200) straight from the trove, plus the trove's 200 RD gas compensation held in the GasPool since the trove opened. The debt and remaining collateral flow to the Stability Pool / other troves exactly as in the paths above.The collateral kicker scales part of the incentive with the size of the position; the fixed 200 RD reserve provides the base compensation.
Recovery mode rules
If branch TCR < CCR, the branch is in recovery mode. Liquidation does not change — the
threshold is ICR < MCR, always. What changes is what borrowers may do
(BorrowerOperations._requireValidAdjustment):
A recovery-mode configuration: the liquidation line stays at MCR. The hatched band marks the borrowing restrictions — while TCR is below CCR, no adjustment may reduce a trove's ICR, and new debt (or a new trove) must end at ICR ≥ CCR.
- Top-ups and repayments are always allowed (they improve ICR).
- Collateral withdrawals are allowed only if the resulting ICR ≥ MCR and the ICR does not decrease.
- Debt increases are allowed only alongside enough collateral that the ICR improves and ends ≥ CCR. New troves must open at ICR ≥ CCR.
- In normal mode the constraints are: resulting ICR ≥ MCR and the adjustment must not pull TCR below CCR.
(Collateral seizure in any liquidation, in any mode, is penalty-capped via
_maxPenaltyColl(debt, par, penalty, price); collateral beyond the cap returns to the borrower as
surplus.)
Recovery mode ends as soon as TCR is back above CCR. There's no manual intervention.
Dwarf & mini-dwarf cleanup
A trove's debt can fall below the borrowing minimum in two ways: redemptions (a partial redemption only has to leave debt above the 200 RD gas reserve), and negative interest, which happens when a branch's Redemption Shield share is high enough that the shield discount drives the effective rate for troves without Redemption Shield below zero, so their actual debt erodes over time. There are two bands:
Dwarf — actual debt between the 200 RD gas reserve and the 2,000 RD minimum (RD_GAS_COMPENSATION < actualDebt < RD_GAS_COMPENSATION + MIN_NET_DEBT). There is no dedicated close path: a dwarf stays an ordinary trove that can be liquidated below MCR and redeemed against. While it is under the minimum, its owner can add collateral, toggle Redemption Shield, or close it, but cannot withdraw collateral, and any debt increase must bring actual debt back to at least 2,000 RD.
Mini-dwarf — actual debt at or below the 200 RD gas reserve (actualDebt ≤ RD_GAS_COMPENSATION); there's no redeemable debt left. Anyone can close it with TroveManager.sweepCloseTrove(address) (one-off) or TroveManager.sweepMiniDwarves(maxCount) (scans both lists from the low-ICR end): the remaining actual debt is burned from the GasPool, the caller receives the rest of the 200 RD reserve (200 − actualDebt) as a bounty, and all of the trove's collateral is returned to the borrower via CollSurplusPool, nothing is seized. Sweeps are disabled while the branch is flagged under-collateralized. Mini-dwarfs are skipped by redemption walks, so sweeping them keeps the sorted-list tail clean.
The full picture
The tree below is the actual branching in Liquidations.sol — hover any box for the
contract-level detail:
Why this design
- SP is the preferred path. Burning RD against the pool removes the debt outright. Redistribution just spreads it, which eventually has to be cleared too.
- The redistribution penalty is higher. Pulling collateral via redistribution is more expensive for the borrower (the branch MCR, e.g. 10% on WETH, vs 5%) because it imposes work on the rest of the branch.
- Liquidation seizure is capped. Recipients take at most 105% (offset) or the branch MCR (redistribution) of the debt's par value, and collateral above that cap returns to the borrower. If the trove holds less than the cap, recipients absorb the shortfall.
- Gas compensation has two parts. The liquidator receives a fixed 200 RD reserve plus a 0.5% slice of the trove's collateral.
Deep dive
- Liquidations (user view): same content, less detail.
- Risks: when liquidation incentives can break down.