maybeyonasparaswap_dex_vol
Updated 2022-05-09
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
›
⌄
with paraswap as (
select distinct * from (
select
-- tx_id
*
from ethereum.udm_events
where (to_label = 'paraswap' or from_label = 'paraswap') or to_address = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
)
)
select
case when to_label in (
'UNI-AAVE LP','UNI-MATIC LP',
'UNI-amis token LP','UNI-CRV LP',
'UNI-BAL LP'
) then 'uniswap'
else to_label end as dex,
count(distinct tx_id) as swaps,
sum(
case when amount_usd > 10000000 then amount_usd/pow(10,18)
else amount_usd end
) as total_vol
from paraswap
where
amount_usd is not null
and to_label_type = 'dex'
and to_label != 'paraswap'
group by 1
limit 100
Run a query to Download Data