Ali3NAverage Daily Stablecoin Swap Activity on Uniswap During FTX & Alameda Collapse
Updated 2022-11-13
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with maintable as (
select block_timestamp::date as date,
case when date >= '2022-11-08' then 'During and After FTX & Alameda Collapse'
else 'Before Collapse' end as timespan,
case when (token0_symbol in ('DAI','FRAX','LUSD','MAI','TUSD','USD+','USDC','USDT','USX','agEUR','alUSD','hUSDC','jEUR','sUSD','USDD','USDF') or token0_symbol ilike '%usd%') then 'Swap From Stablecoins'
when (token1_symbol in ('DAI','FRAX','LUSD','MAI','TUSD','USD+','USDC','USDT','USX','agEUR','alUSD','hUSDC','jEUR','sUSD','USDD','USDF') or token1_symbol ilike '%usd%') then 'Swap To Stablecoins'
else 'Non Stablecoin Swaps' end as swap_type,
count (distinct tx_hash) as Swaps_Count,
count (distinct recipient) as Swappers_Count,
abs (sum (amount0_usd)) as Total_Volume,
abs (avg (amount0_usd)) as Average_Volume
from ethereum.uniswapv3.ez_swaps
where block_timestamp >= CURRENT_DATE - 30
group by 1,2,3)
select timespan,
swap_type,
avg (swaps_count) as Average_Swaps_Count,
avg (Swappers_Count) as Average_Swapper_Count,
avg (total_volume) as Average_Volume
from maintable
group by 1,2
Run a query to Download Data