A liquidation happens fully automated through our relayer and will soon implement the IVC for maximum independency.
Liquidation Mechanics
When Liquidation Triggers
A position becomes liquidatable when: Example:- Collateral: 100 tokens × 20,000
- Debt: $17,500
- Liquidation Threshold: 85%
- Health Factor: (17,500 = 0.97 ✅ Liquidatable
Close Factor
The close factor limits how much debt can be repaid per liquidation (typically 25-50%). This:- Prevents single liquidators from seizing everything
- Gives borrowers chance to respond between partial liquidations
- Distributes liquidation opportunities
Liquidation Modes
Instant Liquidation
Default mode for smaller markets. Liquidated collateral transfers immediately to the configured liquidation contract. Flow:- Liquidator (backend relayer) calls
liquidate(loanId, signedPrice) - Market calculates collateral to seize (debt + penalty)
- Collateral transfers to Liquidation Router
- Router receives via
receiveLiquidatedCollateral() - Collateral routes to trading venue for sale
- USDC proceeds return via
receiveLiquidationProceeds()
Dutch Auction
Recommended for larger markets. Price decreases over time, creating competitive bidding. Configuration:| Setting | Description |
|---|---|
| Duration | Auction length (e.g., 1-24 hours) |
| Start Premium | Initial price above oracle (e.g., 130%) |
| Min Premium | Floor price (e.g., 95%) |
- Liquidator triggers auction creation
- Auction starts at premium price
- Price decreases linearly toward minimum
- Bidders purchase collateral at current price
- USDC goes directly to lending pool
- Auction ends when all collateral sold or duration expires
- Better price discovery
- Multiple participants can bid
- No need for external liquidation contract
- Transparent, on-chain process
Liquidation Panel
The Liquidations tab in market details shows:| Section | Information |
|---|---|
| Liquidatable Loans | Positions with health factor < 1.0 |
| Pending Liquidations | Instant liquidations awaiting settlement |
| Active Auctions | Dutch auctions in progress |
| Liquidation Stats | Historical metrics |
Manually Triggering Liquidations
Click on the position you want to liquidate, click Liquidate on any eligible position. The system:- Fetches current price from oracle
- Signs price update if needed
- Executes liquidation transaction
- Creates pending liquidation or auction
Bidding on Auctions
For Dutch auctions, click Bid and enter:- Collateral amount to purchase
- System shows current price and USDC required
Settling Expired Auctions
If auctions expire with unsold collateral:- Click Settle Expired
- Remaining collateral routes to liquidation contract
- Proceeds as instant liquidation
Liquidation Hooks
Coming Soon: Liquidation hooks allow you to execute custom functions before and after a liquidation initialized.Hook Example
The most common example is the combination of two hooks:- Risk Check – beforeLiquidation(): Check the risk values of the liquidated asset based on your setup parameters. Outputs a boolean.
- Execute – afterLiquidation(): Buy an asset at a discounted price if the beforeLiquidation() returns true.
External Liquidation Contract Integration
For institutions requiring custom liquidation handling (OTC desks, internal market makers, etc.), implement the liquidation receiver interface.Interface Requirements
Your liquidation contract must implement:Settlement Requirements
After selling collateral, return proceeds to the lending market:- Approve USDC spending to the lending market
- Call
receiveLiquidationProceeds()with liquidation ID and USDC amount - Handle the proceeds within reasonable timeframe (default timeout: 7 days)
Integration Steps
Deploy Liquidation Contract
Deploy your contract implementing
ILiquidationReceiver. Ensure it can:- Receive ERC-20 tokens
- Track liquidation IDs
- Return USDC to specified addresses
Configure Market
In market Settings, click Configure under Trading Venue and select Custom Address. Enter your contract address.
Authorize Token Transfers
Your liquidation contract needs authorization on the stock token to receive collateral. The Issuers App shows pending authorizations.
Settlement Timeouts
Liquidations have a 7-day timeout. If your contract doesn’t settle within this period:- Admin can call
handleLiquidationTimeout() - Debt becomes bad debt
- Insurance fund covers the loss (if funded)
Liquidation Router
The shared Liquidation Router handles collateral routing across multiple markets: Capabilities:- Receives collateral from any authorized market
- Routes to market-specific trading venues
- Handles USDC settlement back to originating markets
- Rate limiting per token (prevent manipulation)
Insurance Fund
When liquidation proceeds don’t fully cover debt: The insurance fund:- Receives portion of protocol fees
- Covers bad debt automatically
- Protects liquidity providers from losses
Monitoring Best Practices
Daily
- Check for liquidatable positions
- Verify oracle price freshness
- Monitor pending liquidation settlements
Weekly
- Review liquidation statistics
- Check insurance fund balance
- Audit settlement timeouts
Smart Contracts
Contract architecture and roles
Management
Day-to-day operations
