Site icon Tech Dreams

At The Time Of FTX Collapse, AAVE Was Affected!

Source : Twitter

With this dashboard, we aim to outline how the FTX Collapse has affected the Ethereum blockchain’s major liquidation system, AAVE.

AAVE

The Aave app is a decentralized finance (DeFi) application built on the Ethereum blockchain in which lenders and borrowers are the two key participants in the ecosystem. Lenders provide liquidity to the market (Lending Pools) to earn a passive income, while Borrowers are able to access the Lending Pools for the sole purpose of borrowing money by depositing over collateralized assets or through Flash Loans. According to defipulse.com, Aave is the world’s most successful defi application . To become the world’s top defi service is not an overnight accomplishment.  

How Did The FTX Collapse?

In July 2021, FTX Exchange was the world’s third largest centralized cryptocurrency exchange. The company was founded in 2018 by MIT graduate Sam Bankman-Fried, a former Jane Street Capital global exchange-traded funds (ETFs) trader. As well as spot markets in over 300 cryptocurrency pairs, including BTC/USDT, ETH/USDT, XRP/USDT, and its native token FTT/USDT, it also included its native token, FTT/USDT. Three months ago, the exchange and the companies it surrounded began a steep decline. As a result of FTX’s sudden bankruptcy filing on November 11, 2022, Bankman-Fried resigned. Cryptocurrencies are likely to be affected for quite some time after FTX’s rapid decline and collapse, and broader markets may also suffer. Cryptocurrency’s volatility is exemplified again by FTX’s recent turn from potential savior to outright bailout candidate in a week.

This week’s FTX news is summarized below.

Source : FTX

To get more detailed note about this please follow the link Read more….

Approach

This dashboard illustrates the impact of the FTX Collapse on Ethereum’s major liquidation system, AAVE. Specifically, we are looking at the liquidations data from Nov 2, 2022 onwards, according to collateral tokens. Based on different metrics on AAVE, we followed these steps:

Insights and Visualization

Observations

Reference Query

1. 
with liqudations as (
  SELECT 
  	TX_HASH,
    block_timestamp,
  	liquidated_amount,
  	liquidated_amount_usd,
  	debt_to_cover_amount,
  	debt_to_cover_amount_usd,
  	liquidator,
  	borrower,
  	aave_version,
  	collateral_token_symbol,
	debt_token_symbol,
    LIQUIDATED_AMOUNT_USD - DEBT_TO_COVER_AMOUNT_USD as liqudation_fees_usd
  FROM ethereum.aave.ez_liquidations
  WHERE true --AAVE_VERSION = 'Aave V2'
  and LIQUIDATED_AMOUNT_USD IS NOT NULL
  and debt_token_price is not null
  AND block_timestamp >= '2022-11-01'
)
SELECT 
	date_trunc(day, block_timestamp) as date,
	collateral_token_symbol,
  	sum(liquidated_amount_usd) as liq_amt_usd,
	sum(debt_to_cover_amount_usd) as debt_to_cover_usd,
	sum(liqudation_fees_usd) as liq_fees_usd,
	count(distinct borrower) as borrowers,
	count(distinct liquidator) as liquidators,
  	count(distinct tx_hash) as txns
FROM liqudations
GROUP BY date, collateral_token_symbol	
---------------------
2.
with liqudations as (
  SELECT 
  	TX_HASH,
    block_timestamp,
  	liquidated_amount,
  	liquidated_amount_usd,
  	debt_to_cover_amount,
  	debt_to_cover_amount_usd,
  	liquidator,
  	borrower,
  	aave_version,
  	collateral_token_symbol,
	debt_token_symbol,
    LIQUIDATED_AMOUNT_USD - DEBT_TO_COVER_AMOUNT_USD as liqudation_fees_usd
  FROM ethereum.aave.ez_liquidations
  WHERE true --AAVE_VERSION = 'Aave V2'
  and LIQUIDATED_AMOUNT_USD IS NOT NULL
  and debt_token_price is not null
  AND block_timestamp >= '2022-11-01'
)
SELECT 
	liquidator,
  	sum(liqudation_fees_usd) as fees_earned_usd,
  	count(distinct borrower) as borrowers,
  	sum(liquidated_amount_usd) as liq_amount_usd,
  	LISTAGG(distinct collateral_token_symbol, ',') as col_tokens,
  	count(tx_hash) as liq_events,
  	LISTAGG(distinct block_timestamp::date, ', ') as dates
FROM liqudations
GROUP BY liquidator
QUALIFY row_number() over( order by fees_earned_usd desc )<= 10	
----------------
3. 
with liqudations as (
  SELECT 
  	TX_HASH,
    block_timestamp,
  	liquidated_amount,
  	liquidated_amount_usd,
  	debt_to_cover_amount,
  	debt_to_cover_amount_usd,
  	liquidator,
  	borrower,
  	aave_version,
  	collateral_token_symbol,
	debt_token_symbol,
    LIQUIDATED_AMOUNT_USD - DEBT_TO_COVER_AMOUNT_USD as liqudation_fees_usd
  FROM ethereum.aave.ez_liquidations
  WHERE true --AAVE_VERSION = 'Aave V2'
  and LIQUIDATED_AMOUNT_USD IS NOT NULL
  and debt_token_price is not null
  AND block_timestamp >= '2022-11-01'
)
SELECT 
	borrower,
  	sum(liquidated_amount_usd) as liq_amount_usd,
  	LISTAGG(distinct collateral_token_symbol, ',') as col_tokens,
  	count(tx_hash) as liq_events,
  	LISTAGG(distinct block_timestamp::date, ', ') as dates
FROM liqudations
GROUP BY borrower
QUALIFY row_number() over( order by liq_amount_usd desc )<= 10	

Exit mobile version