Skip to main content
Technical Article

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.

Borrower owes$1,200,000
Recovered via liquidation$1,000,000
Residual bad debt$200,000
Risk Fund balance$300,000
Auction outcomeRisk Fund > bad debt → bidders compete on how little Risk Fund they need to cover the full 200K.Winnerpays200K. Winner pays 200K, takes their winning Y% of the Risk Fund. Market books cleared.
The contracts that make it work

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().

Interfaces
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;
}
Auction lifecycle
01

Detection

Bad debt is identified when a borrower's position is in negative equity and no further liquidation is economically viable.

02

Start

Anyone can call startAuction() for an RToken market with outstanding bad debt — no permissions required.

03

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.

04

Close

After the auction window expires, closeAuction() settles the winning bid: the winner receives Risk Fund assets, bad debt is written off.

Two scenarios, mirrored

Whether the Risk Fund covers the bad debt or not, the auction closes the shortfall. Only the funding mix differs.

Shortfall Auction Scenarios — risk fund insufficient vs sufficientShortfall Auction Scenarios — risk fund insufficient vs sufficient
Auction outcome depends on whether the Risk Fund covers the bad debt — both paths close the shortfall, only the funding mix differs.
Auction types
TypeDescription
LARGE_POOL_DEBTBad debt exceeds a threshold; bidders compete on how little Risk Fund compensation they need.
LARGE_RISK_FUNDRisk Fund balance is large relative to debt; bidders compete on how much debt they will cover.
Settlement impact

After auction settlement, the bad debt is removed from the RToken market's books via badDebtRecovered(), restoring accounting integrity. The market resumes normal operation.