DeFi Bascis #6 | Lending/Borrowing | Liquidation Mechanisms — Deep dive:
I am writing a series of posts on DeFi basics from the past several months(sorry for my inconsistency). In this post, I will be delving deep into Liquidation mechanisms in Lending and borrowing with examples. Check the previous article on the basics of Lending and borrowing here.
Liquidation: Being liquidated is the biggest risk in lending. If the collateral value declines below the threshold liquidation gets triggered. Liquidation is selling collateral assets of borrower to compensate the valued of lending. Liquidations are not just a safety mechanism but a vital component that maintains the market’s stability and confidence.
In trad-Fi liquidation is complicated process that goes through arbitration(legal procedure) followed by an advertisement of liquidation assets(through auction etc,). Compliances are another part which the lender/borrower has to follow. The whole process usually takes several days(to years sometimes..!!). Liquidation mechanisms are critical for mitigating systemic risk inherent in DeFi lending platforms. They ensure that loans remain sufficiently collateralized, even amidst market volatility. The design of these mechanisms is continually optimized based on empirical market data, risk modeling, and advanced mathematical formulations, striking a balance between efficient liquidation and fair market value recovery of collateral.
Types of Liquidaiton systems:
There are Two primary mechanisms which majority of protocols follow:
- Auction-based liquidation (non-atomic English auction)
- Fixed-spread liquidation (atomic)
Auction-Based Liquidation:
- Loan’s health factor falls below 1.
- Initiation: Liquidator starts the auction process (can last hours).
- Bidding: Interested liquidators submit bids for collateral.
- Resolution: Auction concludes according to contract rules (e.g., highest bid wins).
Fixed-spread liquidation (atomic):
- In Fixed spread liquidation, Loans eligible for liquidation can be instantly sold at a predetermined discount, eliminating the need for lengthy bidding processes involving multiple liquidators.
- Aave, for example, lets liquidators instantly buy defaulted collateral at a discount of up to 15% off the current market price. This fixed discount, known as the liquidation spread, is transparent upfront, allowing liquidators to make quick decisions about participating.
- This eliminates the need for time-consuming auction processes with their associated fees and delays. Additionally, liquidators can leverage atomic flash loans to facilitate collateral purchase without holding assets long-term, mitigating potential risks.
- Example:
- Borrower deposits 3 ETH ($10,500), borrows $8,400.
- ETH price drops, health factor falls below 0.8.
- Liquidator repays $4,200 debt.
- Gets 4.62 ETH at 10% discount (worth $10,332).
- Liquidator Makes $1932 profit.
Different frameworks used across major protocols :
MakerDAO’s Liquidation System: MakerDAO’s Liquidation 2.0 module employs a Dutch auction mechanism. It offers several features enhancing the efficiency and security of the liquidation process:
- Instant Settlement: Dutch auctions allow for instant settlement, mitigating the price volatility risk for auction participants and enabling faster capital recycling. The efficiency of this system is underpinned by the price-versus-time decay function P(t)=P0 e^−λt, where P0 is the initial price, t is time, and λ is the decay rate, ensuring a fair and predictable reduction in price over time.
- Flash Lending of Collateral: This feature allows participants to engage in auctions without upfront capital, effectively utilizing the entire DAI liquidity available across DeFi. It broadens participation and enhances the system’s responsiveness to undercollateralized loans.
- Dynamic Price Curves: The system utilizes dynamic price-versus-time curves to determine the auction’s starting price, incorporating mechanisms to handle unexpected price increases due to resets or governance changes. The selection of the optimal curve is a subject of ongoing research and empirical analysis, ensuring the system’s adaptability to market conditions.
Aave’s Liquidation Process: Aave’s protocol emphasizes the health factor (Liquidation factor as explained above) of loans to determine their stability. Key aspects include:
- Health Factor Monitoring: HF is crucial for indicating when a loan becomes undercollateralized and susceptible to liquidation. It’s defined as HF=Total Borrow Value / Total Collateral Value. When HF drops below 1, the protocol enables liquidators to receive discounted collateral in return.
- Profitability and Gas Cost Analysis: Aave’s system provides methods for calculating the potential profitability of liquidation calls, considering gas costs and the liquidation bonus. This ensures liquidators can make informed decisions, balancing the cost of liquidation against the potential rewards.
Compound’s Liquidation Framework(V3): Compound introduces a unique, more protocol-centric mechanism for liquidation which involves absorption of debt into the protocol through maintaining reserves. When a position is liquidated Compound will settle the position in the base asset. This means if you are liquidated no matter how small or large, your entire position will be in USDC after liquidation***.***
- Absorption of debt : This function allows liquidators to transfer the borrower’s debt and collateral to the protocol, and the protocol repays the debt from its reserves after absorbing the collateral(of bad debt) using the so called Absorb() function. After debt has been paid off from the reserves, the protocol remains in possession of excess collateral. Excess collateral is immediately put on sale at a discount to the oracle price.
- Reserves and Target Reserves: Compound maintains reserves to protect users from bad debt and facilitate the liquidation process. The governance-set target reserve level is a critical parameter determining the ability of liquidators to buy discounted collateral, reflecting a dynamic balance between liquidity and solvency.
It is not possible to 100% eliminate risk in DeFi lending. For example, under a very extreme situation where prices instantaneously crash 90%, then the lenders will lose out. There is always a tradeoff in risk-return. The protocol could enforce a liquidation threshold of 10%, in which case the margin of safety is significant, but nobody would borrow from the protocol.
Lending protocols have two conflicting goals to optimize for: capital efficiency and risk. The more conservative the risk factors, the less competitive the loan offerings are. Although parameters are set by governance, the parameters are usually recommended by consulting agencies that specialize in financial models.
Fluid’s Liquidation Process: Fluid’s liquidation process is geared towards offering borrowers high capital efficiency and lower liquidation penalties. The protocol harnesses the efficiency of the AMM model, resembling Uniswap v3’s liquidity model, to streamline the liquidation process. This system optimizes the gas efficiency and liquidity allocation in real-time, which is beneficial during market downturns where liquidations could otherwise have a significant impact.
With the aim of minimizing liquidation amounts and penalties, the protocol assigns user positions into discrete ‘ticks’ — akin to slots — based on their debt-to-collateral ratio, ensuring liquidations are only as substantial as necessary to maintain the health of the loan. This prevents large-scale sell-offs of collateral, promoting a more stable market environment. Furthermore, the protocol’s integration with other DEX aggregators facilitates better pricing and minimizes the liquidation penalty. It represents a shift from traditional liquidation methods by focusing on the borrower’s ability to maintain their position while safeguarding the protocol’s stability.
It is not possible to 100% eliminate risk in DeFi lending. For example, under a very extreme situation where prices instantaneously crash 90%, then the lenders will lose out. There is always a tradeoff in risk-return. The protocol could enforce a liquidation threshold of 10%, in which case the margin of safety is significant, but nobody would borrow from the protocol.
Lending protocols have two conflicting goals to optimize for: capital efficiency and risk. The more conservative the risk factors, the less competitive the loan offerings are. Although parameters are set by governance, the parameters are usually recommended by consulting agencies that specialize in financial models.
Sources:
https://www.rareskills.io/post/defi-liquidations-collateral