Skip to main content
If health is below 1, keepers repay USDG and receive stock at a rising discount. Call Stockline.liquidate. The core gates regime and pause, then LiquidationModule sizes the seize.
Discount starts at zero and rises to the book cap over the auction window, then stays at the cap.Discount starts at zero and rises to the book cap over the auction window, then stays at the cap.
Many crypto lending markets use a fixed bonus and a permissionless race. Stock tokens have thin onchain exit. Stockline ramps a Dutch auction, seizes the minimum, and stores an allowlist flag. The module does not enforce that flag today.
Stockline.liquidate accrues the account, requires LIVE or DARK, requires not paused, and reverts NotLiquidatable if healthy. The first unhealthy block stores liquidatableSince. discountOf is a linear ramp from 0 to maxLiqDiscount(book) over auctionWindow (2 hours). ARCHITECTURE.md says from near zero. The code starts at exactly zero until one second has elapsed. Tier caps: A 5%, B 6%, C 8%.
A partial close sells only enough stock to put health back on the target line, unless dust remains.A partial close sells only enough stock to put health back on the target line, unless dust remains.
Default path seizes the minimum USDG repay that restores targetHealth (1e18). If leftover debt is under dustDebt (10 USDG), the module closes the book in full. protocolLiqFeeShare (10%) of the discount bonus is seized to FeeCollector. RiskRegistry.liquidatorAllowlist is true at launch. LiquidationModule.liquidate does not read that flag. NatSpec: liquidations are permissionless.
Shortfall hits remaining collateral proceeds, then the reserve, then a future backstop, then suppliers pro rata.Shortfall hits remaining collateral proceeds, then the reserve, then a future backstop, then suppliers pro rata.
Order in ARCHITECTURE.md: liquidation proceeds, Reserve, Backstop, suppliers. Backstop is not deployed. Today the reserve covers what it can, then the pool socializes the rest. Related: If your stock falls, Run a liquidator, Parameters.