alitaslimiDOMI Swaps Daily
Updated 2023-12-18
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
-------------------- Swaps --------------------
swaps as (
select
block_timestamp,
tx_hash,
origin_from_address as swapper,
case platform
when 'balancer' then 'Balancer'
when 'curve' then 'Curve'
when 'trader-joe-v1' then 'Trader Joe'
when 'trader-joe-v2' then 'Trader Joe'
when 'uniswap-v3' then 'Uniswap'
when 'woofi' then 'WOOFi'
else platform
end as dex,
pool_name,
token_in as from_token,
token_out as to_token,
symbol_in as from_symbol,
symbol_out as to_symbol,
case
when amount_in_usd - amount_out_usd > 100 then amount_out_usd
when amount_in_usd - amount_out_usd < -100 then amount_in_usd
else (amount_in_usd + amount_out_usd) / 2
end as amount_usd,
iff(amount_in_usd - amount_out_usd between -10 and 10, (amount_out_usd - amount_in_usd) / amount_out_usd * 100, 0) as slippage
from
avalanche.defi.ez_dex_swaps
),
-------------------- Tokens --------------------
tokens as (
select
block_timestamp,
tx_hash,
from_symbol as symbol,
Run a query to Download Data