Skip to main content

Shortfall

The Shortfall contract implements an auction-based mechanism for resolving bad debt within the Rheofi Protocol's isolated liquidity pools. When a borrower's position becomes insolvent and cannot be fully liquidated through standard liquidation, the Shortfall contract orchestrates a competitive auction to recover as much value as possible.

Overview

Bad debt arises when a borrower's collateral value falls below their outstanding debt after liquidation. The Shortfall contract provides a structured process for handling this scenario: an auction is started for the bad debt, bidders compete to cover it, and the winning bidder receives compensation from the Risk Fund. This mechanism ensures that protocol losses are socialized efficiently and transparently.

Auctions follow a descending price model where bidders specify the percentage of bad debt they are willing to cover in exchange for a share of the Risk Fund allocation.

Key Functions

startAuction

Initiates a bad debt auction for a specific pool's Comptroller.

function startAuction(address comptroller) external;

placeBid

Places a bid on an active auction. The bidder specifies the percentage of bad debt they will repay.

function placeBid(address comptroller, uint256 bidBps) external;
  • bidBps: The bid in basis points (e.g., 10000 = 100% of bad debt).

closeAuction

Closes a completed auction and executes the settlement, transferring Risk Fund assets to the winning bidder.

function closeAuction(address comptroller) external;

restartAuction

Restarts an auction that did not receive sufficient bids before expiration.

function restartAuction(address comptroller) external;

Auction Parameters

ParameterDescription
minimumPoolBadDebtMinimum bad debt required to start an auction
waitForFirstBidderDuration to wait for the first bid
nextBidderBlockLimitBlock limit between successive bids

See Also