adriaparcerisasSushi and the Merge 4
Updated 2022-10-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
WITH
t1 as (
select
pool_name,
--case when block_timestamp<'2022-09-15' then 'Before merge'
--else 'After merge'end as period,
count(distinct tx_hash) as adds,
count(distinct origin_from_address) as wallets,
sum(amount_usd) as volume
from ethereum.core.ez_token_transfers x
join ethereum.core.dim_dex_liquidity_pools y on x.to_address = y.pool_address
where origin_function_signature in ('0xf305d719','0xe8e33700') and y.platform = 'sushiswap'
and block_timestamp between '2022-09-01' and '2022-09-30'
group by 1
),
t2 as (
select
pool_name,
--case when block_timestamp<'2022-09-15' then 'Before merge'
--else 'After merge'end as period,
count(distinct tx_hash) as adds,
count(distinct origin_from_address) as wallets,
sum(amount_usd) as volume
from ethereum.core.ez_token_transfers x
join ethereum.core.dim_dex_liquidity_pools y on x.from_address = y.pool_address
where origin_function_signature in ('0xbaa2abde','0x02751cec','0x02751cec','0xded9382a','0x5b0d5984') and y.platform = 'sushiswap'
and block_timestamp between '2022-09-01' and '2022-09-30'
group by 1
)
select
t1.pool_name,
t1.volume as total_volume_added_usd,
t2.volume as total_volume_removed_usd,
t2.volume*(-1) as total_volume_removed,
t1.volume-t2.volume as net_volume,
t1.volume+t2.volume as threshold
Run a query to Download Data