Bad Debt Socialization
Overview
Bad Debt Socialization is a critical risk management mechanism in the Curvance Protocol that handles scenarios where a borrower's collateral value falls below their outstanding debt. Rather than leaving the protocol with uncovered losses, this mechanism distributes the shortfall equitably among all lenders in the affected market, preserving system solvency while minimizing individual impact.
Key Components
System Actors
Liquidators: External agents who repay a portion of defaulted debt in exchange for collateral.
Borrowers: Users with debt positions that may become undercollateralized.
Lenders: eToken holders who collectively absorb any shortfall from liquidations.
Market Manager: Orchestrates the liquidation and bad debt socialization process.
Process Flow
1. Bad Debt Detection
The system identifies positions where collateral value is insufficient to cover debt:
2. Asset-Specific Liquidation
When bad debt is detected:
Each collateral asset is evaluated individually for liquidation.
Liquidations occur on a per-asset basis rather than requiring full account liquidation.
Multiple liquidations can be processed efficiently in a single transaction.
3. Socialization Execution
When a liquidator executes the bad debt liquidation:
The system calculates total debt to be closed for the specific asset.
Determines how much can be repaid via the liquidator's token transfer.
Calculates the remainder as bad debt to be socialized.
The shortfall is distributed proportionally across all lenders of that asset.
For example, if a borrower has $900 in debt with $850 in collateral during a liquidation with 5% liquidation incentive, lenders collectively absorb $95 (900 * 1.05 - 850 = 945 - 850 = 95) of the debt as a loss. If the borrower is liquidated across two liquidations, 25% initially then the remaining 75%, borrowers would recognize $23.75 and then $71.25 as bad debt across the liquidations.
4. State Transitions
The process follows these state transitions:
Normal Operation → Bad Debt Detection: When collateral falls below debt.
Bad Debt Detection → Asset Liquidation: Individual asset liquidation is triggered.
Asset Liquidation → Socialization: Execution of liquidation with partial repayment.
Socialization → Normal Operation: System returns to normal state with debt cleared.
Technical Implementation
The socialization mechanism operates through a coordinated interaction between:
Debt Calculation: For each liquidation, the system:
Calculates the total debt to be closed.
Determines how much can be repaid through liquidation transfers.
Subtracts this from total debt to find the bad debt amount.
Efficient Processing:
Multiple liquidations can be batched in a single transaction.
Gas optimization by consolidating repayments and bad debt calculations.
eToken Integration:
The eToken contract recognizes unpaid debt by adjusting
totalBorrows
.This maintains the exchange rate mechanism while distributing losses.
Atlas Integration:
Atlas prioritizes liquidations to minimize bad debt through efficient market mechanisms.
Buffer system ensures Atlas gets priority for executing liquidations.
Dynamic penalty system incentivizes liquidators appropriately based on market conditions.
Security Considerations
Gas Efficiency: Optimized implementation handles thousands of liquidations efficiently, even during market stress.
Edge Cases: System handles rounding issues with conservative approaches that favor protocol solvency.
Transparent Tracking: Bad debt events are fully transparent with on-chain events.
This streamlined mechanism ensures the protocol remains solvent even in extreme market conditions while distributing any unavoidable losses fairly among participants, with minimal gas costs and maximum transparency.
Last updated