adalhisETH2 Uniswap v3 sETH2 / ETH pool Net Daily Flows
Updated 2022-10-15Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with sETH2_bought as (
select
date_trunc('day', block_timestamp) as date,
sum(amount_out_usd) as seth2_bought_usd
from ethereum.core.ez_dex_swaps
where token_out = lower('0xFe2e637202056d30016725477c5da089Ab0A043A')
and contract_address = lower('0x7379e81228514a1D2a6Cf7559203998E20598346')
and date >= '{{Analysis_Start_Date}}' and date <= '{{Analysis_End_Date}}'
group by date),
sETH2_sold as (
select
date_trunc('day', block_timestamp) as date,
sum(amount_in_usd) as seth2_sold_usd
from ethereum.core.ez_dex_swaps
where token_in = lower('0xFe2e637202056d30016725477c5da089Ab0A043A')
and contract_address = lower('0x7379e81228514a1D2a6Cf7559203998E20598346')
and date >= '{{Analysis_Start_Date}}' and date <= '{{Analysis_End_Date}}'
group by date)
select sETH2_bought.date, (seth2_bought_usd - seth2_sold_usd) as net_daily_flow_usd
from sETH2_bought join sETH2_sold on sETH2_bought.date = sETH2_sold.date
Run a query to Download Data