Shortfall & Auctions.
When liquidations can't fully cover a borrower's debt, the residual deficit becomes bad debt. Rheofi runs an on-chain auction backed by the Risk Fund to socialize and recover it — with no off-chain coordination, no backstop multisig, no manual intervention.
RiskFund
Accumulates protocol revenue earmarked for shortfall events. Funds flow in via ProtocolShareReserve and convert to a base asset (e.g., USDT) through Token Converters.
Shortfall
Manages the auction lifecycle — start, bidding, close — for any RToken market that has accumulated bad debt. Anyone can trigger the auction.
Settlement
Winning bidder pays their share of the bad debt, receives Risk Fund assets, and the affected RToken market clears its books via badDebtRecovered().
interface IRiskFund {
function transferReserveForAuction(
address comptroller,
uint256 amount
) external returns (uint256);
}
interface IShortfall {
function startAuction(address rToken) external;
function placeBid(address rToken, uint256 bidBps) external;
function closeAuction(address rToken) external;
}
Detection
Bad debt is identified when a borrower's position is in negative equity and no further liquidation is economically viable.
Start
Anyone can call startAuction() for an RToken market with outstanding bad debt — no permissions required.
Bidding
Participants bid by offering to cover a percentage of the bad debt in exchange for Risk Fund assets. Bids are expressed in basis points.
Close
After the auction window expires, closeAuction() settles the winning bid: the winner receives Risk Fund assets, bad debt is written off.
Whether the Risk Fund covers the bad debt or not, the auction closes the shortfall. Only the funding mix differs.
| Type | Description |
|---|---|
LARGE_POOL_DEBT | Bad debt exceeds a threshold; bidders compete on how little Risk Fund compensation they need. |
LARGE_RISK_FUND | Risk Fund balance is large relative to debt; bidders compete on how much debt they will cover. |
After auction settlement, the bad debt is removed from the RToken market's books via badDebtRecovered(), restoring accounting integrity. The market resumes normal operation.