Skip to main content

Liquidation Module

  • Module Name: Liquidation 2.0 Module
  • Type/Category: DSS → Dog.sol, Clip.sol, Abaci.sol
  • Contract Sources:

1. Introduction

A liquidation is the automatic transfer of collateral from an insufficiently collateralized Vault to the protocol. The Dog contract triggers liquidations and the Clipper runs Dutch auctions to sell collateral for KUSD.

2. Key Features

Instant Settlement (Dutch Auctions)

Unlike English auctions where capital is locked until outbid, Dutch auctions settle instantly at a price calculated from initial price and elapsed time.

Flash Lending of Collateral

Participants can purchase collateral with zero capital by directing the sale into other protocols in exchange for KUSD within a single transaction.

Price Decrease Functions

FunctionDescription
LinearDecreasePrice reaches zero after tau seconds
StairstepExponentialDecreaseDrops by cut percent every step seconds
ExponentialDecreaseContinuous exponential decay

3. Core Functions

Dog.bark() — Trigger Liquidation

function bark(bytes32 ilk, address urn, address kpr) 
external returns (uint256 id);
  • Checks if Vault is undercollateralized
  • Transfers collateral to the Clipper
  • Initiates auction via Clipper.kick()

Clipper.take() — Purchase Collateral

function take(
uint256 id, // Auction ID
uint256 amt, // Max collateral to buy [wad]
uint256 max, // Max price per unit [ray]
address who, // Recipient of collateral
bytes calldata data // Callback data
) external;

Clipper.redo() — Reset Expired Auction

function redo(uint256 id, address kpr) external;

Resets auctions that:

  • Have exceeded tail seconds
  • Have fallen below cusp percent of initial price

4. Parameters

Dog Parameters

ParameterDescription
HoleMax KUSD for all active auctions
ilk.holeMax KUSD per collateral type
ilk.chopLiquidation penalty (e.g., 1.13 = 13%)

Clipper Parameters

ParameterDescription
bufStarting price multiplier (e.g., 1.2 = 20% above OSM)
tailSeconds before auction must reset
cuspPrice drop percentage before reset
chipPercent of debt as keeper incentive
tipFlat KUSD incentive for keepers

5. Circuit Breaker

Four-stage safety mechanism:

LevelEffect
0All functions enabled
1No new liquidations (kick)
2No liquidations or resets (redo)
3All auction functions disabled

6. Gotchas

Price Changes

Auction parameters can change during running auctions. Use the max parameter in take() to set maximum acceptable price.

  • Front-Running Risk — Use authorized proxy contracts and provide some capital
  • OSM Risk — Initial price uses 1-hour delayed oracle price