Skip to main content

Liquidation & cleanup

The callable surface for clearing under-MCR troves and cleaning up undersized ones. Concept: Liquidations & Recovery Mode. Mechanics: Liquidation paths.

Liquidate​

Per branch, on Liquidations. The threshold is always ICR < MCR, in every mode; troves with and without Redemption Shield are liquidated by the same rules.

Liquidations.liquidate(address _borrower)         // one-off
Liquidations.liquidateTroves(uint _n) // walk both books, clear up to _n lowest-ICR under-MCR troves
Liquidations.batchLiquidate(address[] _borrowers) // caller-supplied list (may include troves with Redemption Shield enabled)

All three require the branch oracle to be healthy (!priceFeed.previewWillShutdown(false)); if it is failing, the branch must be shut down via BorrowerOperations.shutdownFromOracleFailure() instead.

Liquidator compensation: 200 RD from the branch GasPool plus a collateral kicker of entireColl / 200 (0.5% of the trove's collateral).

Cleanup: dwarf force-close​

Negative base interest can erode a trove's debt below the 2,000 RD minimum. A trove with 200 RD < actualDebt < 2,000 RD that is still healthy (ICR ≥ MCR, so not liquidatable) can be force-closed by anyone:

BorrowerOperations.forceCloseTrove(address _borrower)

The caller repays the trove's net debt (actualDebt − 200) from their own RD and receives a collateral bounty worth netDebt + min(netDebt, 200) (priced at par, capped at the trove's collateral). Any collateral above the bounty goes to the borrower's CollSurplusPool. Callable while live or after shutdown.

Cleanup: mini-dwarf sweep​

A trove whose actualDebt ≤ 200 RD (at or below the gas reserve) has essentially no borrowable debt left:

TroveManager.sweepCloseTrove(address _borrower)      // one-off
TroveManager.sweepLeadingMiniDwarves(uint maxCount) // keeper batch, from the redeemable tail

The residual debt is burned from the GasPool and all of the trove's collateral is returned to the borrower via CollSurplusPool — nothing is seized, and the caller gets no bounty. Mini-dwarfs are skipped by redemption walks, so sweeping keeps the sorted-list tail clean.