EBTC Builder Series: Liquidations and Bad Debt Handling

BadgerDAO 🦡
eBTC Protocol
15 min readJun 6, 2023

--

Decentralized finance (DeFi) aims to revolutionize the financial landscape, empowering individuals with greater control over their assets and opening up a realm of innovative financial opportunities. At the heart of this transformative ecosystem lie collateral debt position (CDP) protocols and decentralized money markets, which enable users to borrow, lend, and generate stablecoins using their crypto holdings. However, with great freedom comes inherent risks, and these protocols employ a vital mechanism to protect participants and maintain stability: liquidations.

In this research piece, we will delve into the mechanics of liquidations within some CDP stablecoin protocols and decentralized money markets, shedding light on their significance and the insights gained from studying their performance. Additionally, we will explore how these findings, in addition to the results from rigorous modeling work performed by RiskDAO, have shaped the design of eBTC; an innovative CDP synthetic bitcoin protocol, and its unique liquidation and bad debt handling mechanism.

Liquidations, in a general sense, refer to the process of converting collateralized assets into liquid funds to address a potential default or under collateralization in a lending or borrowing system. When a borrower fails to meet their obligations or the value of the collateral falls below certain predefined thresholds, liquidation mechanisms are triggered. These mechanisms aim to protect lenders and the overall stability of the system by enabling the sale of the borrower’s collateral at a discount. The proceeds from the liquidation are then used to repay the outstanding debt or cover any losses incurred, ensuring the integrity and solvency of the lending platform or protocol.

CDP protocols and decentralized money markets in DeFi exclusively offer overcollateralized loans as a fundamental risk management strategy. This means that protocols require borrowers to deposit a collateral asset into the system of higher value to that of the borrowed amount. This approach ensures the safety and stability of the lending and borrowing ecosystem while protecting the interests of lenders and the integrity of the system as a whole.

The overcollateralization requirement serves as a key safeguard against potential defaults and volatility in the crypto market. By requiring borrowers to lock up more collateral than the borrowed amount, these protocols mitigate the risk of borrowers defaulting on their loans. This is particularly important in the highly volatile and rapidly evolving cryptocurrency space, where asset prices can experience significant fluctuations within short periods.

Moreover, overcollateralization reduces the need for extensive creditworthiness assessments and KYC (Know Your Customer) procedures typically associated with traditional financial lending. In DeFi, the collateral acts as a form of self-guarantee, eliminating the need for complex credit checks and providing a more inclusive borrowing environment. This streamlined process promotes accessibility and efficiency, enabling individuals to access liquidity without the bureaucratic hurdles often encountered in traditional financial systems.

In DeFi, liquidations typically occur when the collateralization level surpasses a specific threshold which is above 100%. This ensures there is enough collateral to repay the debt partially or in full, while allowing the provision of an incentive for the liquidator. Since liquidations are typically open to anyone, proper incentivisation is crucial to cover operational costs. If the collateralization of a position falls below the liquidation threshold without it being liquidated, the collateral value may become insufficient to repay the debt and incentivize the process, resulting in undercollateralized “bad debt.”

Lending platforms and protocols must account for the possibility of bad debt and implement mechanisms to mitigate its impact, such as collateral requirements, liquidation mechanisms, and risk management strategies. Managing and minimizing bad debt is crucial for maintaining the financial health and sustainability of DeFi lending ecosystems.

In CDP protocols, the existence of bad debt can significantly affect the price of stable assets. It creates the perception that the system is partially insolvent, leading to doubts about whether all the minted stable assets will be fully redeemable upon repayment. This issue was notably observed with DAI and FRAX during the USDC depeg event in March 2023.

Money Markets — Aave

Liquidation Mechanism

When a borrower’s Health Factor falls below 1, a portion of the borrower’s debt, up to 50%, can be repaid by anyone. The equivalent value of the debt, along with a fee, is deducted from the available collateral according to live oracle pricing data. Liquidators are motivated to participate by receiving a bonus on the collateral, which is considered a penalty for the borrowers. The specific bonus value is determined based on the collateral asset being used.

Bad Debt Handling

In case of a shortfall event, where liquidity providers are put in a deficit due to liquidations, oracle or smart contract failures, the Aave protocol enacts the following strategies to the restore the system’s health:

  • Safety Module: Smart Contract that incentivizes users to lock AAVE tokens in order to protect the ecosystem. During a Shortfall Event, a portion of the locked AAVE tokens (up to 30%) is auctioned on the market to be sold, generating funds to mitigate the deficit. The SM includes a built-in backstop mechanism to prevent an excessive flow of AAVE into the market, which could further decrease its value. Participants in the SM accept the possibility of a Shortfall Event in return for securing the protocol and receiving rewards known as Safety Incentives (SI).
  • Recovery Issuance: A process triggered in the Aave ecosystem when the Safety Module (SM) is unable to cover the entire deficit incurred during a Shortfall Event. In this situation, new AAVE tokens are issued to help cover the remaining shortfall.
Figure 1. Aave’s Shortfall event handling process (Source: Aave)

CDP Protocols — MakerDAO

Liquidation Mechanism

In MakerDAO, when a borrower’s collateral ratio falls below the liquidation threshold specific to their vault, the system triggers an automatic liquidation. During liquidation, the system sells the borrower’s collateral for a sufficient amount of DAI to repay the outstanding debt, along with a liquidation fee. The collateral is sold through a Dutch Auction model, where the auction starts at a price higher than the market value and gradually decreases until a bid is accepted. This process is called collateral auction.

Bad Debt Handling

In case that the collateral auction fails to repay the whole debt, due to sudden steep drops in price or lack of bids, and the vault goes undercollateralized, the system uses the following mechanisms:

  • Stability Fees: The system will use any surplus of stability fees to cover the debt.
  • Debt Auction: In case that the stability fees were not enough, the system allows for new MKR to be minted and auctioned for DAI to cover the outstanding debt.

CDP Protocols — Liquity

Liquidation Mechanism

When a Trove’s collateral ratio falls below the minimum threshold of 110% (150% during recovery mode), it is flagged for liquidation. The debt of the Trove is absorbed by the Stability Pool, and the collateral is distributed among Stability Providers. The owner of the Trove retains the borrowed LUSD but incurs a loss of approximately 10% in value. Anyone can initiate a Trove liquidation and is rewarded with gas compensation, which includes a fixed compensation of 200 LUSD in addition to 0.5% of the Trove’s collateral. Stability Providers receive liquidation gains and also earn LQTY tokens as early adopter rewards. The Stability Pool acts as a source of liquidity to repay debt from liquidated Troves, ensuring that the total LUSD supply remains backed.

Bad Debt Handling

  • Bad Debt Redistribution: In case that the available LUSD in the Stability Pool is not enough to cover the debt of an underwater Trove, the liquidation mechanism will automatically redistribute its outstanding debt and collateral to all open Troves in proportion to their collaterals.

The three protocols included in this analysis implemented very different approaches to prevent potential insolvency. These mechanisms have proven to be efficient at protecting their respective systems from bad debt but there are a few situations in which these models faced challenges.

The AAVE CRV Short Squeeze Incident

According to the report by EigenPhi, an economic attack was attempted on Aave, but it backfired on the attacker due to external factors that caused the price of CRV, the token the attacker was shorting, to go up. This resulted in a short squeeze and the attacker’s position being liquidated. The attacker had borrowed 92 million CRV from the platform and was liquidated by 386 liquidation operations executed by 21 different actors. However, due to the drop in the price of CRV, Aave’s liquidation and bad debt handling mechanisms proved insufficient to cover all of the bad debt. This was primarily because of the system’s fixed liquidation incentives. As a result, the system was left with 2.456 million CRV unpaid, which was valued at approximately $1.6 million at that moment.

Although the outstanding amount of bad debt represented <0.1% of active borrowings from the protocol at the time, it had to be cleared out to ensure the protocol’s solvency. Therefore, a couple of months after the incident, the DAO’s governance voted to purchase CRV off the market with around 3.1m aUSDC from the Collectors Contract, to repay this debt.

Despite the significant scale of the liquidated position and the volatile circumstances surrounding this incident, Aave’s liquidation mechanisms functioned as intended and successfully shielded the protocol from a severe insolvency event. Ultimately, the protocol managed to regain its solvency; however, this required manual economic intervention from the DAO.

Black Thursday: MakerDAO’s Perfect Storm

Black Thursday, which took place on March 12, 2020, was a significant event in the cryptocurrency market. During this time, a combination of factors, including the rapid decline in crypto prices and high network congestion, created a challenging environment for many platforms, including MakerDAO.

The abrupt price decline resulted in a significant portion of users’ collateral dropping below the necessary threshold, leading to liquidations. However, network congestion and delayed transactions hindered users’ ability to promptly respond and efficiently manage their positions. Moreover, inaccurate pricing data from oracles, along with high gas fees and a short auction durations, resulted in limited participation from keeper bidders in the debt auctions. Consequently, over $8.32 million worth of ETH was liquidated for zero DAI, leaving the system with at least $4.5 million worth of unbacked DAI and multiple CDP owners with nothing.

Despite these weaknesses, MakerDAO and its community took immediate action to stabilize the platform. Emergency measures, such as increasing stability fees, introducing new collateral types and extending the auctions’ duration, were implemented. Furthermore, the Maker Foundation initiated debt auctions, printing and selling MKR to replenish the system’s collateral. Through these efforts, MakerDAO managed to recover and implemented various improvements to enhance its resilience and risk management practices.

Figure 2. Distribution of CDP liquidations through 12–13 March (source: Whiterabbit)

Liquity’s Stability Pool performance

Until now, Liquity’s Stability Pool (SP) and its ability to facilitate instant liquidations have played a crucial role in enabling efficient capital borrowing while safeguarding the system from insolvency. In a decentralized fashion, undercollateralized Troves have consistently been liquidated promptly. Moreover, the liquidity provided by the SP has consistently proven sufficient to cover all liquidations, eliminating the need for debt and collateral redistribution to this date.

While Liquity’s liquidation mechanisms have operated according to their intended design, they have faced challenges in the past. On June 14th, 2022, a significant crash in the cryptocurrency market occurred, leading to a series of substantial liquidations in the ETH-backed CDP protocol over the subsequent days. Throughout this period, the liquidity within the Stability Pool (SP) decreased from approximately 200 million LUSD to around 90 million LUSD.

Although this amount still represented roughly 50% of the total LUSD supply, maintaining the SP’s capacity to handle future liquidations, it was discovered in a subsequent report by RiskDAO that 60% of this liquidity was controlled by the top 10 stakers of the pool. Such a high level of concentration poses an increased risk for the SP’s ability to cover future liquidations, particularly as LQTY incentives decrease over time.

Figure 3. SP Staked liquidity concentration (Source: RiskDAO’s report)

In Summary…

These events have highlighted the tradeoffs and risks associated with various liquidation mechanisms employed by prominent CDP and Money Market protocols. While Aave and MakerDAO have demonstrated robust auction mechanisms to prevent insolvency in most situations, both protocols required manual intervention to restore system health when faced with significant levels of bad debt. On the other hand, Liquity has developed a decentralized system that incorporates efficient liquidations and ensures solvency, but it heavily relies on the Stability Pool’s ability to incentivize and maintain liquidity. In the event that this objective is not achieved, and the protocol resorts to redistributing an undercollateralized Trove, it can have a substantial impact on all active borrowers.

To gain insight into the real-time amount of bad debt held by different DeFi protocols, you can refer to the dashboard compiled by RiskDAO.

Liquidations and Bad Debt Handling

The insights gained from analyzing the performance and dynamics of the discussed mechanisms played a pivotal role in shaping the design of eBTC. Drawing inspiration from protocols like MakerDAO and Aave, eBTC embraces a liquidation process that allows broader participation, leveraging the liquidity of the open market. This differs from Liquity’s approach, which can be more restrictive due to its reliance on the Stability Pool, which also limits the utility a large portion of the debt asset’s liquidity.

However, considering eBTC’s objective of becoming the most decentralized and censorship-resistant synthetic BTC in DeFi, its liquidation incentives and bad debt handling mechanics were designed in a similar way to Liquity’s approach. This decision was made to avoid potential issues that auction mechanics have previously faced, requiring manual intervention. By incorporating Liquity’s principles, eBTC aims to enhance its resilience and ensure a more robust and autonomous system.

Over the past few months, RiskDAO performed extensive economic modeling work to aid in the definition of eBTC’s liquidation and bad debt handling mechanisms, among others. For this, they explored and contrasted the behavior of different potential alternatives around:

  • Risk parameters for the system
  • Liquidation incentive models
  • Mechanisms for absorbing bad debt

Below is a deep dive into how their findings helped define critical aspects of the system and how they influenced the final design decisions. For full details on the results refer to RiskDAO’s eBTC Pre-launch system analysis report.

Risk Parameters

The eBTC system has two crucial risk parameters: the Minimum Collateral Ratio (MCR) and the Critical Collateral Ratio (CCR). The MCR represents the minimum ratio between the value of collateral and the value of the debt it secures required for a CDP to avoid getting liquidated. On the other hand, the CCR is the collateral ratio that must be maintained by the system overall to prevent it from entering Recovery Mode. This mode alters certain conditions to encourage swift re-collateralization and avoid insolvency.

To determine the optimal combination of risk parameters for the system, RiskDAO conducted economic modeling with supporting simulations. They exposed the system design to various economic conditions and events, exploring a wide range of combinations of these two parameters. The system’s ability to withstand the most challenging conditions, even under unprecedented circumstances, was observed at the following low values:

  • MCR: 110%
  • CCR: 125%

The achievement of these low values was largely attributed to the relatively low volatility of ETH in terms of BTC. In fact, the volatility of ETH-BTC was found to be only half as high as that between ETH and USD.

Figure 4. 30 day relative volatility of ETH/USD v.s. ETH/BTC (Source: Badger Analytics)

Liquidation Incentives Model

As previously mentioned, eBTC incorporates permissionless and open liquidations. This means that when the collateral ratio of a CDP falls below the MCR (or the Total Collateral Ratio during Recovery Mode, which is the ratio between the total debt and total collateral in the system), anyone can repay the CDP’s total or partial debt and receive incentives in the form of collateral. Several popular incentive models were explored, including a fixed rate model (10% and 5%) and a model based on the CDP Individual Collateral Ratio (ICR) (min(ICR, 110%) — 100%).

Among these models, the fixed incentive model of 10% of the collateral performed the best, followed by the variable incentive model based on the ICR. However, the fixed incentive model would require a higher MCR to avoid bad debt resulting from liquidations at ICRs below 110%. Additionally, the difference in performance between the two models was only 6%. Unfortunately, the variable model had a drawback: if the ICR dropped below 100%, liquidations would not be incentivized.

This drawback, and the insights presented by the 0vix researchers in their paper “Toxic Liquidation Spirals”, led to the development of eBTC’s innovative liquidation incentive model, which combines elements from both models mentioned above outperforming them in simulations. The model can be defined as follows:

In simpler terms, the liquidator’s incentive is determined based on the percentage above 103% and below 110% at which point a CDP’s ICR is liquidated, with a fixed 3% incentive for liquidations occurring at any ICR below 103%. This incentive model ensures that undercollateralized CDPs are always incentivized, even if their ICR is below 100%, while allowing for an MCR of 110%. The same incentive mechanism applies to partial liquidations. Here are a few examples:

  • A liquidation at 110% ICR will be incentivized with 10% of the collateral value.
  • A liquidation at 105% ICR will be incentivized with 5% of the collateral value.
  • A liquidation at 98% ICR will be incentivized with 3% of the collateral value.

Additionally, all full liquidations will receive an extra incentive of 0.2 staked ETH known as the “Gas Stipend.” As the name suggests, this amount is intended to cover the gas costs associated with the liquidations in most scenarios. This additional amount will be taken from the borrower’s collateral deposit upon their CDP’s creation and it will be kept separate, allowing them to recover it when closing their position. The Gas Stipend is not touched by the protocol’s yield share (it accrues its full yield), has no impact on the position’s ICR, and is only given to liquidators if the position is liquidated.

Figure 5. eBTC’s liquidation incentive simulation under high volatility (Source: RiskDAO)

Bad Debt Handling Mechanisms

As you may have observed from this incentive model, liquidations that occur at an ICR below 103% will inevitably result in a portion of the debt being uncollateralized in order to provide the fixed 3% incentive. This is because liquidators are only required to repay a debt amount that is 3% less than the worth of the available collateral, while receiving the full collateral amount along with the Gas Stipend. The amount of outstanding bad debt can be estimated using the following function:

As you can see, due to this incentive mechanism, the outstanding bad debt will be relatively small when the ICR is below 103% and will increase linearly as the liquidation occurs at lower ICR values. However, given the constant incentives, it is unlikely that liquidations will trigger significantly below this threshold.

In the rare scenario that such a situation occurs and an underwater CDP is fully liquidated, its outstanding bad debt will be automatically distributed among all open CDPs in proportion to their collateral value. This decentralized approach ensures the system’s solvency while minimizing the impact on other borrowers.

Figure 6. Percentage of leftover bad debt for different liquidation ICR values

Conclusion

This research article has provided a comprehensive analysis of liquidations and bad debt handling mechanisms in CDP stablecoin protocols and decentralized money markets in the DeFi space. The study highlighted the importance of liquidations as a vital mechanism for protecting participants and maintaining stability in these ecosystems. By examining the experiences of protocols such as Aave, MakerDAO, and Liquity, valuable insights were gained regarding the strengths and weaknesses of different approaches to handle bad debt.

These insights have played a significant role in shaping the design of eBTC. Drawing inspiration from successful protocols while prioritizing decentralization and autonomy, eBTC incorporates a liquidation process that allows broader participation and leverages the liquidity of the open market. Additionally, the bad debt handling mechanics of eBTC have been designed to ensure resilience and minimize the need for manual intervention, taking lessons from Liquity’s approach.

Through rigorous modeling work performed by RiskDAO, key aspects of eBTC’s risk parameters, liquidation incentives, and mechanisms for absorbing bad debt were defined. The research and modeling outcomes have contributed to creating a more robust and autonomous system for eBTC, aiming to become the most decentralized and censorship-resistant synthetic BTC in DeFi. Overall, this research serves as a valuable resource for understanding and improving liquidation and bad debt handling practices in DeFi, with eBTC representing an innovative solution in this evolving landscape.

The research above has highlighted the challenges of designing effective liquidation and bad debt handling mechanisms that preserve censorship resistance and decentralization. While the insights found here have been applied to eBTC’s current design, there’s still more work to be done.

Are you passionate about building stable and decentralized synthetic assets? Join the discussion and share your ideas on peg stability with Badger! Together, let’s push the boundaries of innovation and build the most stable and decentralized synthetic BTC possible.

Join the Discord and hop into #rff-ebtc to join the conversation.

--

--

BadgerDAO 🦡
eBTC Protocol

Supporting Community Driven Growth for Bitcoin across DeFi.