Capital-Free Liquidations
Overview
How It Works
The locked_borrow() Flow
1. Call vault.liquidate(manager)
2. Vault calls liquidator.onLockedBorrow() callback
3. Inside callback:
a. Receive manager's collateral assets
b. Swap assets to vault's base asset
c. Return enough to cover debt
4. Vault verifies repayment
5. Liquidator keeps the profitCode Example
Detailed Implementation
Step 1: Monitor for Liquidatable Positions
Step 2: Calculate Expected Profit
Step 3: Execute Liquidation
Step 4: Handle Callback
DEX Integration
Swap Assets Efficiently
Multi-Hop Swaps
Gas Optimization
Profit Calculation
Error Handling
Related Documentation
Last updated