Aave — Health Factors

Calculate stats around health factor per collateral type and/or loan. -How many users are allowed to borrow of each and what makes for good collateral? -Look into ongoing and past governance votes to see how it affect the above value -Can you help determine if a coin should really not be used for a loan or vice versa.

Dipruv
3 min readDec 1, 2021

Health Factor

calculated as the weighted average of the liquidation thresholds of the collateral assets and the total borrows value. The higher the value, the lower the borrower risk. When the factor is less than 1, the position may be liquidated to maintain solvency.

For all the borrowers, the maximum LTV and liquidation threshold range between 0% to 80%, with most of them concentrated in the range between 70%-80% LTV. All the borrowers have a health factor close to or below 1. The concentration seems to be below 0.2, which indicates quite a healthy borrower environment.

Liquidity Amount in USD across Months

Liquidity amount by Liquidators

The chart below shows the top 5 loans in order of borrowed amount along with their current health factor. Due to the large difference between the borrowed amounts of the five largest loans and the rest, we were unable to fit the rest of the 122 loans. Don’t worry, they are shown in a separate chart.

Top 10 Liquidators

The liquidators calculate the profitability of an under collateralized loan before liquidating it if its health factor drops below 1. As Ethereum’s network usage has spiked recently, the profitability of a liquidity bot is directly impacted by the gas price. According to AAVE documentation, here is a simple formula for calculating the profitability of liquidating an undercollateralized loan:

  1. Store and retrieve each collateral’s relevant details such as address, decimals used, and liquidation bonus as listed here.
  2. Get the user’s collateral balance (aTokenBalance).
  3. Get the asset’s price according to the Aave’s oracle contract (getAssetPrice()).
  4. The maximum collateral bonus you can receive will be the collateral balance (2) multiplied by the liquidation bonus (1) multiplied by the collateral asset’s price in ETH (3). Note that for assets such as USDC, the number of decimals are different from other assets.
  5. The maximum cost of your transaction will be your gas price multiplied by the amount of gas used. You should be able to get a good estimation of the gas amount used by calling estimateGas via your web3 provider.
  6. Your approximate profit will be the value of the collateral bonus (4) minus the cost of your transaction (5).

After running through these calculations, if an under-collateralized loan is deemed profitable then the liquidation bot will automatically liquidate it. Liquidators will not liquidate collateralized loans if they cannot see profitability in liquidating them!

Conclusion

Crypto loans are also not always liquidated the same way that collateralized loans are not always liquidated in the real world. The leading defi application in the crypto market, Ave, has about half a million dollars of defaulted loans that are yet to be repaid. The liquidation bots do not want to liquidate loans if they do not see any profit in doing so. Their profits tend to be diluted most of the time because of high gas prices and other times because of sudden drops in asset prices. These failed liquidations have resulted in assets being worth less, particularly if the asset value is in free fall due to corrections in the market or the asset losing its value for a variety of reasons, such as investor not believing in the future value of the asset.

--

--