Shortfall & Auctions
When liquidations are insufficient to fully cover a borrower's debt, the residual deficit becomes bad debt (shortfall). Rheofi employs an auction mechanism to socialize and recover this bad debt using the Risk Fund.
Risk Fund
The RiskFund contract accumulates a portion of protocol revenue designated for covering shortfall events. Funds flow into the Risk Fund through the ProtocolShareReserve distribution pipeline and are converted into a base asset (e.g., USDT) via Token Converters.
interface IRiskFund {
function transferReserveForAuction(
address comptroller,
uint256 amount
) external returns (uint256);
}
Shortfall Contract
The Shortfall contract manages the auction lifecycle for bad debt recovery:
interface IShortfall {
function startAuction(address rToken) external;
function placeBid(address rToken, uint256 bidBps) external;
function closeAuction(address rToken) external;
}
Auction Flow
- Detection — Bad debt is identified when a borrower's position has negative equity and no further liquidation is economically viable.
- Start — Anyone can call
startAuction()for an RToken market with outstanding bad debt. - 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 (lower bid = willing to take less compensation).
- Close — After the auction period expires,
closeAuction()settles the winning bid. The winner receives Risk Fund assets, and the corresponding bad debt is written off from the market.
Auction Types
| 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 |
Impact
After auction settlement, the bad debt is removed from the RToken market's books via badDebtRecovered(), restoring the market's accounting integrity.