DeFi Liquidation Research: Incentives, Risks, and Instability
Original Title: "An Empirical Study of DeFi Liquidations: Incentives, Risks, and Instabilities"
Original Source: Kaihua Qin, Liyi Zhou, Pablo Gamito, Philipp Jovanovic, Arthur Gervais, Imperial College London
Original Compilation: Rhythm 0x49
Financial speculators are accustomed to increasing their potential returns by seeking greater leverage. Debt is a popular form of leverage. Meanwhile, the DeFi lending market is booming, with a total value locked (TVL) exceeding $39.8 billion. However, the emergence of debt brings new risks, namely liquidation risk. In this process, staked users sell their collateral at a discounted price to liquidators.
Currently, there is little quantitative insight into liquidation mechanisms in the market. This paper will explore the breadth of the Ethereum lending market, focusing on Aave, Compound, MakerDAO, and dYdX, which occupy 85% of the lending market.
This paper systematizes popular liquidation mechanisms and provides an innovative method to measure the objectivity of these mechanisms. The research finds that existing liquidation designs effectively incentivize liquidators but sell too much discounted collateral, with this portion of the cost borne by staked users. This paper will measure the various risks faced by liquidation participants and quantify the instability of existing lending protocols.
Systematization of Lending Mechanisms and Liquidation Processes
A contributor is a user with surplus capital who wishes to earn interest on their capital by lending it to third parties.
Borrowers pledge certain assets to borrow from contributors. At the same time, borrowers must pay a certain interest fee to contributors. Since there is no KYC in DeFi, all lending in DeFi requires over-collateralization.
Liquidators observe whether there are loans on the blockchain network with a safety factor below 1; if so, they will intervene and liquidate. Generally, liquidators are bots, which are automated tools that execute blockchain queries, price observations, and attempt liquidations.
Of course, there is also competition among liquidators, with preemptive liquidations being ubiquitous. It is important to note that liquidations can be categorized into atomic liquidations with fixed price spreads and non-atomic liquidations such as auctions. The distinction between these two types of liquidations will be explained below.
Fixed Price Spread Liquidation
Fixed price spread liquidation allows multiple liquidators to bid within a time frame, and the loans eligible for liquidation can be liquidated at a predetermined discount. For example, Aave allows liquidators to purchase collateral at a market price with a 15% discount, so the discount value or liquidation price can be known in advance. The fixed price spread liquidation model avoids lengthy liquidation auctions, saving time costs and transaction fees. Additionally, liquidators can use flash loans for liquidation, reducing the currency risk of holding the assets required for liquidation, although the use of flash loans will increase the costs for liquidators.
Example:
Assuming the current ETH price is $3,500 and the liquidation ratio is 80%. User A pledges 3 ETH, with the collateral currently valued at $10,500, allowing the user to borrow a maximum of $8,400 ($10,500 * 80%). If the ETH price drops to $3,300, this means the collateral is now worth $9,900, and the maximum borrowable amount for 3 ETH is $7,920 ($9,900 * 80%). The system's safety factor is now below 1, i.e., $7,920/$8,400 ≈ 0.94, thus the collateral enters liquidation.
The liquidator submits a liquidation transaction to repay 50% of the debt, i.e., $4,200. In return, the liquidator can liquidate at a discounted price of $3,000/ETH ($3,300/(1+10% liquidation discount)). In this liquidation, the liquidator earns a net profit of $420 (($4,200/$3,000) * $3,300 - $4,200).
Non-Atomic Liquidations such as Auctions
Auction liquidations follow several methods:
- Loans meet the criteria for liquidation, i.e., the safety factor drops below 1;
- Liquidators begin the auction, which may last for several hours;
- Interested liquidators start bidding, with the highest bidder winning the collateral;
- The auction ends according to the rules specified in the auction contract.
Liquidators in the MakerDAO system look for under-collateralized loans, and once they find a transaction eligible for liquidation, they can call the bite function to trigger the liquidation process. The liquidation process is a two-stage auction process. (For this part, it is recommended that capable users read the code directly, click here to read the MakerDAO DSS code translated by DeFi enthusiasts, which will also be referenced later.)
tend: tend is the first stage of the auction, where the first stage auction is for all collateral. If the auction time ends and the price has not reached the amount needed to repay the loan plus stability fees, the highest bidder wins, with each bid needing to increase by a minimum percentage (specific value determined by system parameters) over the previous bidder. When this bidding stage's bidder's bid exactly repays the loan amount plus stability fees, the second stage auction begins.
dent: Bidders maintain the last bid from the first stage, which can repay the entire loan plus stability fees, reducing the amount of collateral, with each decrease also being a minimum percentage.
The processes of tend and dent can be seen in the diagram below:
After the auction time ends, the deal function is called to complete the auction, and the collateral will be transferred to the winner.
Liquidation Research
By scraping data from the Ethereum chain, the value of collateral sold through liquidation by each protocol was obtained:
From the launch of the protocols to Ethereum block height 12,344,944, there were a total of 28,138 successful liquidations. The liquidation value data in the figure above is calculated based on the USD price of the collateral at the end of the liquidation. The total amount of collateral liquidated across the four platforms Aave, Compound, dYdX, and MakerDAO exceeded $807 million.
In November 2020, the increase in Compound's liquidation volume was mainly caused by price fluctuations in DAI provided by Compound's oracle. The significant rise in February 2021 was primarily due to the drastic fluctuations in cryptocurrency prices.
Liquidator Profit and Loss
The total profit from the 28,138 successful liquidations was $63.59 million. The profits from different months across various protocols are illustrated in the figure below:
The liquidation profit for MakerDAO in March 2020 was $13.13 million, the highest in history. The main reason was the sharp drop in ETH prices on March 12, with liquidation bots failing to respond quickly, and network congestion preventing liquidators' transactions from being included in blocks. The delay allowed capable users to manually liquidate at very low costs and win the auction.
Compound generated liquidation profits of $8.38 million and $9.61 million in November 2020 and February 2021, respectively. The former was due to the oracle pricing mechanism, while the latter seemed unrelated to the oracle or liquidation bots.
If each Ethereum address represents a user, there were a total of 2,011 liquidators. On average, each liquidator earned a profit of $31,600. The most active liquidator conducted 2,482 liquidations, earning a profit of $7.4175 million.
Another interesting finding is that there were 641 liquidations in MakerDAO that resulted in losses, with total losses of approximately $4.6744 million. The losses were primarily due to price changes in collateral during the auction process.
Fixed Price Spread Liquidation
Among the 28,138 successful liquidations, Aave V1, Aave V2, Compound, and dYdX conducted 3,809, 1,039, 6,766, and 9,762 fixed price spread liquidations, respectively.
The figure below shows the gas prices for fixed price spread liquidations and the average gas price. To observe more intuitively, the average price is smoothed using the moving average gas fees calculated over 6,000 blocks (the black line in the figure).
In fact, this data indicates that the liquidation process is highly competitive, with 73.97% of liquidators paying above-average gas fees.
Auction Liquidation
MakerDAO conducted a total of 6,762 auction liquidations, with 3,377 ending in the tend stage and the remaining 3,385 ending in the dent stage. The average number of users participating in liquidations was only 1.99. The number of users participating in each liquidation was 2.63±1.96, with 1.58±0.95 participating in tend liquidations and 1.06±1.62 in dent liquidations.
If we define the duration of MakerDAO liquidation auctions as the difference between the start of the auction and its final completion, we can visualize the liquidation duration:
Interestingly, after March 12, 2020, the duration of MakerDAO liquidations noticeably increased. On average, the liquidation duration was 2.06 ± 6.43 hours (mean ± standard deviation). There were 4,173 liquidations completed within 1 hour. At the same time, very few liquidations exceeded the expected duration, possibly because relevant liquidators did not complete the auction and thus did not obtain the collateral. For example, the longest liquidation lasted 346.67 hours, but its last bid was placed 344.6 hours before termination.
Risks
The liquidation mechanisms of Aave and Compound grant liquidators the right to liquidate up to 50% of the collateral when debt liquidation is possible. This design favors liquidators rather than staked users, as debt issues can often be resolved by selling less than 50% of the collateral.
Choosing an appropriate liquidation ratio is challenging because the transaction throughput of the blockchain is limited, and the liquidation mechanism should minimize the number of liquidation events and overall transactions as much as possible.
The auction mechanism does not specify a liquidation ratio, thus providing a more nuanced method for liquidating collateral. However, auction liquidators may face losses due to price fluctuations of collateral during the auction period. As mentioned above, there were 641 loss-making liquidations in MakerDAO's liquidation history. Users participating in MakerDAO liquidations need to be aware of risks such as network congestion and price fluctuations.
In summary, some auction mechanisms, such as Vickrey auctions and Dutch reverse auctions, may have the potential to mitigate excessive liquidations.
In addition to excessive liquidations, bad debts are also part of the risk. In lending, bad debts can be divided into two types: under-collateralized assets (bad debt I) and transaction fees exceeding the profits from participating in liquidations (bad debt II).
To estimate the current amount of bad debts, assuming that staked users need to bear a certain random cost when repaying, this cost is $100. As of April 30, 2021, the quantities of bad debt I and bad debt II were 351 and 3,525, respectively. It is worth noting that due to the occurrence of bad debts, Aave V2's liquidity decreased by $87,400. Meanwhile, dYdX, having used an external insurance fund, wrote off bad debt I, thus having no such type of bad debt.
Bad debt II is particularly noteworthy, as its accumulation may lead to more bad debt I. When the transaction fee for liquidation is $100, there are 350 unprofitable liquidation opportunities on Compound, with this collateral valued at $125,000.
The unprofitable liquidation opportunities for different liquidation costs on Aave V2, Compound, and dYdX are as follows:
Of course, liquidators can also use flash loans to complete fixed price spread liquidations, with the specific steps as follows:
- Borrow X tokens to repay the debt;
- Use the flash loan to repay the staked user's debt and obtain collateral Y;
- Exchange part of collateral Y for X;
- Repay the flash loan X and interest, with the remaining profit going to the liquidator.
If the flash loan liquidation is unprofitable, then the flash loan will not be successfully executed. On-chain data shows that there have been a total of 623 flash loans used for liquidation, with a cumulative borrowing amount reaching $483 million. Moreover, the amount of funds used for flash loans on dYdX is larger, possibly due to dYdX's lower flash loan interest.
Instability
To measure the response of lending platforms to declines in different tokens, this paper quantifies liquidation sensitivity, i.e., how much collateral liquidation may be triggered by a decline in crypto prices.
The research finds that Aave, Compound, MakerDAO, and dYdX are all sensitive to declines in ETH. For instance, in the case of a 43% drop in ETH on March 12, 2020, MakerDAO could face up to $1.07 billion in liquidations.
Interestingly, although Aave V2 and Compound adopt similar liquidation mechanisms and have comparable TVLs, Aave exhibits a more stable state during declines. Further research reveals that Aave V2 users prefer multi-token collateralization, making it difficult for a significant amount of liquidation to occur due to the price drop of a single token.
At the same time, the strategy of lending one stablecoin by staking another stablecoin also reduces the occurrence of liquidations. By collecting the on-chain price relationships among DAI, USDC, and USDT, it was found that from May 1, 2020, to April 30, 2021, the price differences among the three stablecoins remained within 5% 99.97% of the time. However, at block height 10,578,280, the price difference between USDC and DAI was 11.1%.
The Impact of the Liquidation Process Game on Lending Roles
The liquidation process is essentially a zero-sum game, where the profits of liquidators come at the expense of staked users. Therefore, one can infer from the profits which mechanism is more favorable to liquidators or staked users.
To avoid the impact of price fluctuations of different cryptos, this section only studies the liquidation of ETH staked to borrow DAI, which exists on four platforms, calculating the ratio of monthly liquidation profits to transaction volumes, resulting in the figure below:
The results show that dYdX has the highest value, indicating that dYdX is most favorable to liquidators and least favorable to staked users. This result aligns with the fact that dYdX does not set a liquidation ratio, as it indicates that once the debt safety factor drops below 1, liquidators can intervene for liquidation.
Except for March 2020, MakerDAO's value has consistently been lower than Compound's.
Surprisingly, although Aave employs a liquidation mechanism similar to Compound's, Aave's calculated value is lower than Compound's, especially for Aave V1. This is inferred to be due to the fewer number of DAI/ETH liquidation events on Aave. The limited cases on Aave may not yield representative conclusions.
Therefore, it can be concluded that auction mechanisms are more favorable to staked users than fixed price spread liquidations.