Ghost In The Machine: Liquidations in Aave

This post looks at liquidations in Aave - one of the most popular decentralized lending protocols. Specifically, I walk through a Dune Dashboard that I built - any feedback welcome!

The first part explains how liquidations work in Aave. The subsequent sections walks through some of the charts from the Dune dashboard. I cover on-chain data on liquidations, the liquidated users and the liquidators. The piece also looks into May 19th 2021, the day Aave saw it’s highest amount of liquidations. Note that the analysis is restricted to Aave V2 on Ethereum.

1. How do liquidations work in Aave?

Aave is a collateralised lending protocol. Specifically, Aave applies the concept of over-collateralisation, which means that users can borrow less than the value of the collateral they provide. This design choice is not surprising given the price volatility of crypto assets and Aave only considers the quality of the collateral when issuing loans. No information about the borrower such as income, past defaults, … is used.

The maximum amount that can be borrowed depends on the quality of the collateral. This is determined by factors such as smart contract risk, counter-party risk and market risk. For more information, Aave has some good documentation. For example, USDC has a loan to value of 86%, meaning that for each $100 worth of USDC that is deposited as collateral a user can borrow up to $86 worth of another asset. SNX is deemed more risky and has a loan to value of 49%. Only $49 worth of assets can be borrowed when pledging $100 worth of SNX. This table gives a full overview of the assets that can be pledged as collateral and how much can be borrowed against it.

The loan to value ratio is of course not constant due price fluctuations. The borrower has to ensure that the value of the collateral sufficiently covers the value of the loan at all times. If not, the loan can become under-collateralised. The liquidation threshold specifies at what loan to value ratio a loan is under-collateralised. This threshold also depends on the type of collateral. For example, USDC has a liquidation threshold of 88%, which means if the loan to value rises to 88%, it becomes available for liquidation. The liquidation threshold for SNX collateral is 65%.

It’s important to note that Aave looks at the aggregate health of each user (address). Users can have multiple loans and deposited different collateral assets and it’s this aggregate picture of loans and collateral that matters when it comes to liquidations. Aave calls this aggregate view the health factor, which is calculated as follows:

The higher the health factor, the better. When the health factor falls below 1, positions can be liquidated. There isn’t a centralised party that is responsible for liquidating loans. Instead, anyone can be a liquidator. This is done by making a liquidation call, pay back a part of the loan and receive the collateral valued at the repaid loan plus a liquidation bonus (or a liquidation penalty from the perspective of the borrower).

The histogram below shows the distribution of the health factor of all users of Aave V2

Health factors of all Aave V2 users
Health factors of all Aave V2 users

Let’s look at a simplified example that explains the above:

  1. Stewart deposits 1 WETH when it has a price of $1,500 and borrows 1,000 USDC worth $1,000 (if he wanted he could borrow up to $1,245 worth of USDC). His loan to value ratio is 66%

  2. Due to a sharp decline in prices, the deposited WETH is suddenly worth only $1,175. Since the loan of 1,000 USDC is still $1,000, the loan to value rise above the liquidation threshold of 85%. Stewart has only one loan outstanding (and only 1 WETH as collateral), so his health factor drops below 1. The position can now be liquidated

  3. Liquidators (bots) are constantly monitoring the health factor of each Aave borrower. Andy’s liquidation bot notices that Stewart’s health factor has fallen below 1. Immediately, Andy’s bot makes a liquidation call and repays 50% of the loan, i.e. 500 USDC. In return he receives 500 USDC worth of WETH + a liquidation bonus of 5%. Note that with Aave V2 up to 50% of a loan can be liquidated (with V3 it is possible to liquidate 100% of a loan)

  4. Stewart is left with a debt of 500 USDC and $650 worth of WETH as collateral ($1,175 - $500 - $25). His health factor has increased to 1.1. Andy has $525 worth of WETH. His profit is $25 minus the gas fees he paid. Note that I have ignored interest payments throughout the example for simplicity

With the basic concepts of liquidations in Aave out of the way, it’s time to dig in the data!

2. Liquidations

Since its launch on Ethereum Mainnet in December 2020, the Aave V2 protocol has seen over 27,000 liquidations, amounting to more than $1.1bn. The chart below shows the liquidations on a daily basis. Unsurprisingly, the amount of liquidations spiked during days of high price volatility. For example, liquidations reached +$170m on May 19th 2021, +$60m (Nov 22nd 2022) and +$50m (June 14th 2022). We will look closer into the events on May 19th at the end of this post. Interestingly, almost all liquidations from Nov 22nd can be traced back to one single user (more on that below)!

Daily liquidations in Aave V2 per collateral asset
Daily liquidations in Aave V2 per collateral asset

So which tokens have been liquidated the most (in $ value)? The piechart shows that the liquidations are very concentrated in just a few tokens. Around $610m or 55% of all liquidations was WETH. Moreover, the top three tokens (WETH, WBTC and LINK) account for almost 80% of all liquidations.

Liquidations per collateral asset
Liquidations per collateral asset

What about the borrowed assets? The next chart shows the total dollar amount that has been liquidated (y-axis) for each type of collateral (x-axis). Per collateral asset you can see which debt asset was repaid. Stablecoins were the most popular borrowed assets that were repaid. For example, from the $620m WETH collateral that has been liquidated, 80% of the repaid loans were USDC ($280m), USDT ($180m) and DAI ($100m).

Liquidation (USD) per collateral and debt asset
Liquidation (USD) per collateral and debt asset

3. Liquidated users

A total of 5,650 addresses have seen their Aave loan(s) liquidated. The piechart shows there is quite some variability of the total dollar amount that is liquidated per user. Seven users account for about 25% of all liquidations!

Liquidations per user
Liquidations per user

Let’s take a closer look at the users that have seen the largest liquidations. The table below ranks all users by total liquidated amount in USD. The address 0x57e04786e231af3343562c062e0d058f25dace9e has the ‘honor’ to lead the list, having been liquidated 385 times for a total of almost $64m. Who is behind the 0x57e account? It turns out it is Avi Eisenberg. Interestingly, all liquidations happened on the same day, namely November 22nd. He is thus responsible for the day that saw the second largest amount of liquidations! For more background, he borrowed CRV tokens to short, but ultimately failed.

Liquidations leaderboard
Liquidations leaderboard

4. Liquidators

Since the launch of Aave V2 300 unique addresses have acted as liquidators, by repaying a part of the loan and receiving some collateral as a bonus. The piechart and table below shows that 0xb7990f251451a89728eb2aa7b0a529f51d127478 has liquidated the most in terms of dollar value ($210m), and more than half of those liquidations took place on May 19th 2021. Looking at the other liquidators, it is worth noting that the top-5 liquidators account for almost 50% of all liquidations.

Liquidations per liquidator
Liquidations per liquidator
Liquidator leaderboard
Liquidator leaderboard

5. May 19th 2021

May 19th 2021: What a day - I was actually listening to a presentation about crypto at that time. I don’t think the presenter and the rest of the audience realized the crypto market was burning down. I remember searching for exchanges or websites that could still give accurate prices!

It was also a memorable day for Aave, seeing a record $172m in liquidations! A total of 670 loans were liquidated by 17 different liquidators.

The chart below shows that WETH was the collateral used most to liquidated loans (60m), followed by WBTC (45m) and LINK (20m). The most popular loans that were liquidated were stablecoins (USDT, USDC and DAI).

Liquidation (USD) per collateral and debt asset on May 19th 2021
Liquidation (USD) per collateral and debt asset on May 19th 2021

Who got liquidated? A total of 414 users saw their loan(s) liquidated. One user lost more than $25m - 0xe47d5cc33517d5b8433ff249efe094b989989acc is third on the leaderboard

Liquidated users on May 19th 2021
Liquidated users on May 19th 2021

6. Future analysis

This is just a very basic analysis, but there is more interesting data to look at. Ideas for future analysis:

  • Liquidations in Aave V3 (just launched on Ethereum Mainnet!)

  • Gas fees paid by liquidators

  • Profitability of liquidators

Thanks for reading! Link to Dune dashboard: https://dune.com/dcooper/aave-liquidations

Subscribe to Douglas Fir
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.