Crypto Black Thursday: The Good, the Bad, and the Ugly

Emilio Frangella
Aave Blog
Published in
10 min readMar 19, 2020

--

What happened last Thursday? Let’s dive into the details of one of the worst price drops in the history of crypto, what happened in DeFi and Aave, and what we can learn from it

The week that just passed has undoubtedly been one of the most stressful weeks ever for the whole DeFi space. The global instability due to the pandemic COVID-19, the uncertain economic conditions, and the strict quarantine policies imposed by almost all of the largest countries in the world stimulated a powerful drop in the financial markets, and crypto markets were not spared. Between March 12th and March 13th, crypto assets registered a price drop across the board between 50 and 60%. ETH, in particular, dropped from 193$ all the way down to 95$ in less than 24 hours.

ETH Price drop between March 12th and 13th. Source Coinmarketcap

Such a sudden price drop triggered a cascade of events that quickly clogged up the Ethereum network. Gas price suddenly spiked from normal everyday levels to 200+ gwei, while many investors were trying to exit their exposure to the safe haven of stablecoins. In DeFi in particular, this brought an unprecedented amount of volume towards decentralized protocols. Uniswap and Kyber registered their all time highs, while lending protocols were struggling to keep up with liquidations and oracle operators were desperately trying to push updated asset prices through a clogged-up network.

Gas prices as high as 400gwei on march 13th. Source: glassnode

This whole scenario was unprecedented in DeFi and really put DeFi composability under an unexpected stress test. This was a very important test-bench, especially for Aave. Since Aave has been live for only two months, with explosive growth in this short timeframe, this event put our emergency procedures under heavy pressure. So how did the stress test go? What can we learn from it? Let’s talk about what we as Aave as well as the whole ecosystem can learn from this event to become more resilient.

The Good

For DeFi

The sole fact that DeFi managed to survive is a huge achievement. Across the board we have seen protocols reacting quickly to the cascade of events that happened, adapting to extreme conditions of the settlement layer that were created by the raw demand for blockspace. The fact that users were willing to pay up to 400+ gwei to submit these transactions is also a positive outcome. It means that even with extremely high fees, these transactions were still profitable. All of this means one thing: DeFi is a much needed ecosystem, and it’s here to stay.

For Aave

Aave in particular has managed to flourish during this crisis. Thanks to the timely integration with DefiSaver, which allows Maker Vault owners to self liquidate or automatically deleverage their position, Flash Loans literally exploded. The ETH Flash Loan volume spiked from around 270 ETH to 12500 ETH in a matter of hours, with users using the DefiSaver features to deleverage their CDPs.

The Flash Loan needle.

Such an increase in volume for Flash Loans has another positive outcome: it generated 8.5 ETH of yield for the depositors in less than 24 hours. This means that for that day, depositors earned an equivalent of 12% APR on their ETH in Aave. Although this extreme Flash Loan volume was dictated by market conditions and is hard to sustain, it still allows Aave to have the highest yield for ETH depositors across the whole DeFi space.

Thanks to Flash Loans, Aave currently has the highest depositors yield (0.2%) of the market for ETH

Another positive outcome of the crisis is that Aave retained most of the Total Value Locked in the platform. Compared to other protocols, Aave’s exposure to multiple assets (especially stablecoins) makes the protocol less vulnerable to the issues that are affecting DAI (more on this later). Many other lending protocols experienced a consistent drop of their TVL, mainly because of the high demand for DAI generated by users closing their Maker Vaults. Uniswap has experienced an important drainage of liquidity as well, as a consequence of liquidity providers getting out of their crypto exposure. This allowed Aave to reach the 4th spot on DeFi Pulse.

DeFi Pulse leaderboard.

Another positive outcome is that the protocol collected the highest amount of fees to date, reaching 114 ETH, or roughly 14.500$ of fees in just 24 hours. This is partially thanks to Flash Loans and partially because of users repaying their positions to avoid liquidations. Despite the rush of users to repay their loans, the total borrowed in the protocol keeps rising.

Borrow and repayments volume on Aave as of today

The Bad

For DeFi

The first, most glaring aspect of this crisis that requires attention is that DeFi is becoming too big for the current settlement layer. We need Ethereum to scale, and we need it now. It’s becoming increasingly hard to keep DeFi protocols working properly when the underlying layer is clogged up, and it will become more and more complicated as DeFi grows. As an example, let’s analyse the oracle problem. As we all know, it’s extremely important for DeFi (especially lending protocols) to have proper up-to-date prices. This allows them to trigger liquidations in a timely manner in order to avoid loss of funds. As a result of the sudden spike in gas prices, oracles struggled to maintain up-to-date prophecies. In particular, the MakerDAO oracle reported an invalid ETH/USD price for many hours, while oracle operators were trying to unravel the tangle of stuck transactions created by the increased demand on the network. This caused a lot of confusion for multiple actors of the system (users, keepers, refinance apps) that ultimately contributed in Maker losing 4M+ USD of collateral to 0 bid auctions (more on this later).

Lots of stress for the DeFi Saver guys.

Another negative outcome of the crisis is that many users were unable to properly manage their position due to congestion. We all know that managing CDPs is hard, but even the most cautious users were caught off-guard by such a sudden price drop. As a result, even users that were theoretically able to save their positions were liquidated in the end, and this should never happen. We need to design our tools better, we need to account for network congestion, and we need to allow users to safely do more with their collaterals.

For Aave

Aave experienced a substantial amount of liquidations during the drop.

550,000$ of liquidations during the black swan of thursday march 13th

The Chainlink oracle infrastructure held up relatively well during the crisis. Specifically, prices of the Chainlink reference data contracts were stuck at the beginning of the event due to operators not being able to push their transactions through. Operators had to unwind the transactions previously submitted using normal gas prices and push emergency transactions to keep the fees updated, with extremely high fees. Nodes remained stuck for approximately two hours, while prices were slowly being submitted.

Gas used by Chainlink nodes during the black swan event

We can’t really blame Chainlink for what happened at the beginning, as it’s a consequence of the inner mechanics of the Ethereum network and it is a very complicated problem to solve. The Chainlink team was super professional as always, keeping us up to date during the whole night as the situation was progressively normalizing. All in all, the oracle infrastructure offered one of the best performances across the different oracle networks used by DeFi protocols. But it’s still not enough. We need to work towards a network of oracles that is as reliable as possible even in critical conditions. We are not there yet, but Chainlink is surely on track to provide the best oracle experience on the market.

The Ugly

For DeFi

There are, unfortunately, many “ugly” outcomes of this crisis. The first and most relevant one, is Maker experiencing a loss of 4M+ of collateral, due to a design flaw in their auctioning system. Specifically, a mix of factors (not enough keepers to maintain the system, network congestion, shortage of liquidity) together with the possibility for keepers to start bidding from 0 on collateral auctions, allowed some keepers to bid 0 to liquidate certain Vaults with the end result of getting the collateral for free, causing a loss in the system.

0-bid auctions on MakerDAO

This triggered a chain of reactions that involved MakerDAO, the first being an auction of minted MKR to cover the insolvency of the protocol. As an emergency measure, the Maker system contemplates minting MKR to sell on the open market to compensate for bad debt. The event also caused many Vault owners to rush the market in an attempt to obtain DAI to close their positions. This caused a spike in the price of DAI, which was close to 1.1 USD at some point. As a response to this, Maker immediately dropped the DSR to 0% (down from 4%) and the stability fee to 0.5% (down from 4%), in an attempt to stimulate the minting of DAI. Unfortunately, this has proven to not be enough. Given the uncertainty surrounding Maker, there was not enough incentive for the users to open new Vaults and mint new DAI. As a result, Maker was forced to rush the support to USDC (a centralized, permissioned stablecoin) as a collateral. This move is intended to be an emergency procedure to help Maker stabilize the DAI peg, but has raised multiple concerns in the DeFi community due to the increased centralization risk.

Another ugly is the crazy amount of liquidations triggered across multiple DeFi protocols.

More than 10M in total were liquidated in Compound and DyDx on March 13th

Although this isn’t really a fault of DeFi, as builders we need to do more to help users avoid these unpleasant situations (Building the post-liquidation era is an interesting read by Marc Zeller).

It should also be noted that Maker isn’t the only platform that experienced losses. DDEX and Nuo both experienced minimal losses due to the sudden price drops. Losses were covered by the respective insurance funds.

Although it’s not a DeFi platform by any means, it’s interesting to note that the centralized exchange BitMex has incurred in losses as well.

For Aave

So what happened in Aave? Unfortunately, the protocol has incurred in some (small) losses as well. Specifically, there are currently 3 uncollateralized debt positions, for a total of 7001 USD. The detail of the losses is the following:

  • 0x47c25e17ad64ddc7900013cd4a6d94a90eecc94e: Loss of 4071 USDC.
  • 0x82962092794a317531fea79e70951dc04a81ae80: Loss of 2423 TUSD.
  • 0xa6cf7545af8caaea4ad27ed90e3017b3f6ac93ce: Loss of 500 USDC.

So how did these losses happen exactly? The reason is related to the lack of liquidity that our liquidators experienced during the second, sudden price drop that happened during the night between the 12th and 13th of March. When the price of ETH reached 95$, we simply didn’t have enough liquidators active on the platform to liquidate all the positions that were popping up. As a result, these 3 positions were left behind and their Health Factor (a value that represents how “healthy” a loan is in Aave) dropped below the undercollateralization threshold, which means that at some point there was not enough collateral to cover the borrowed amount AND the liquidation bonus, so liquidators didn’t have any incentive to liquidate them. We proceeded to liquidate these manually, and due to the way our liquidation system works, the uncovered liquidation bonus was left as a debt of the platform. Since we were the ones liquidating the undercollateralized loans, we were able to use the liquidated collateral and the remaining liquidated bonus to cover the bad debt, so no factual loss occurred. Nevertheless, it’s important to note that the liquidation system by itself worked exactly as designed. What caused the nominal loss is the lack of liquidators, or more specifically, our ecosystem of keepers was not yet developed enough to completely overcome the crisis.

How will we prevent this from happening again?

This event has been a great lesson for us. On average we are quite satisfied with how the protocol held up, but there is definitely a margin of improvement to mitigate the exposure to such extreme events. In the upcoming weeks, we are going to focus on improving our liquidators ecosystem by doing the following:

  • Release a liquidation UI. Although in normal conditions users will not be able to liquidate through a UI (as most of the time bots are faster) in situations where there is extreme congestion of the network, a UI can be quite handy to expand our network of liquidators to non tech-savvy users. Additionally, a UI has already been released by Andre Cronje that allows liquidations on Aave using Flash Loans.
  • Release tutorials on how to integrate Aave liquidations. Our documentation will be enriched and made as simple as possible.
  • Release an open-source liquidation bot to allow as many people as possible to run liquidations.

Lesson learned?

As always, what doesn’t kill you makes you stronger. We learned a lot from what happened and we are already working to strengthen our emergency procedures and our ecosystem.

If you want to stay up to date on our next steps, don’t forget to join our Discord channel and follow us on Twitter.

--

--