scottincryptoMaticX Swap Volume
Updated 2022-10-05
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
›
⌄
select
date_trunc(day, block_timestamp) as block_day
, '0xb0e69f24982791dd49e316313fd3a791020b8bf7' as pool_token
, 'Quickswap Matic/MaticX' as description
, sum(event_inputs:amount1In::int) / 1e18 + sum(event_inputs:amount1Out::int) / 1e18 as maticx_swap_amt
from polygon.core.fact_event_logs
where 1=1
and contract_address = '0xb0e69f24982791dd49e316313fd3a791020b8bf7' -- 'Quickswap Matic/MaticX'
and event_name = 'Swap'
and block_day >= '2022-10-01'
-- and block_day < '{end_date}'
group by block_day
union all
select
date_trunc(day, block_timestamp) as block_day
, 'DystopiaSwap WMatic/MaticX' as description
, sum(event_inputs:amount1In::int) / 1e18 + sum(event_inputs:amount1Out::int) / 1e18 as maticx_swap_amt
from polygon.core.fact_event_logs
where 1=1
and contract_address = '0xadb2395fec4d096b5086d3daf8b33f9f7568ba25' -- 'DystopiaSwap WMatic/MaticX'
and event_name = 'Swap'
and block_day >= '2022-10-01'
-- and block_day < '{end_date}'
group by block_day
union all
-- ABIs not decoded in Flipside, skip Meshswap for now
-- select
-- date_trunc(day, block_timestamp) as block_day
-- , 'Meshswap Matic/MaticX' as pool
-- -- , sum(event_inputs:amount1In::int) / 1e18 + sum(event_inputs:amount1Out::int) / 1e18 as maticx_swap_amt
-- , *
-- from polygon.core.fact_event_logs
Run a query to Download Data