Ali3NaxlUSDC vs Other Stablecoins & ATOM Swap Activity
Updated 2022-11-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 pricet as (
select recorded_at::date as day,
avg (price) as USDPrice
from osmosis.core.dim_prices
where symbol = 'ATOM'
group by 1)
select case when from_currency = 'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858' then 'Swap From axlUSDC'
when from_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' then 'Swap From ATOM'
when from_currency = 'ibc/9F9B07EF9AD291167CF5700628145DE1DEB777C2CFC7907553B24446515F6D0E' then 'Swap From grvUSDC'
when from_currency = 'ibc/8242AD24008032E457D2E12D46588FD39FB54FB29680C6C7663D296B383C37C4' then 'Swap From axlUSDT'
when from_currency = 'ibc/71B441E27F1BBB44DD0891BCD370C2794D404D60A4FFE5AECCD9B1E28BC89805' then 'Swap From grvUSDT'
when from_currency = 'ibc/C78F65E1648A3DFE0BAEB6C4CDA69CC2A75437F1793C0E6386DFDA26393790AE' then 'Swap From USDX'
when from_currency = 'ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC' then 'Swap From USTC'
when from_currency = 'ibc/0E43EDE2E2A3AFA36D0CD38BDDC0B49FECA64FA426A82E102F304E430ECF46EE' then 'Swap From axlFRAX'
when from_currency = 'ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7' then 'Swap From axlDAI'
when from_currency = 'ibc/F292A17CF920E3462C816CBE6B042E779F676CAB59096904C4C1C966413E3DF5' then 'Swap From grvDAI'
when to_currency = 'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858' then 'Swap To axlUSDC'
when to_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' then 'Swap To ATOM'
when to_currency = 'ibc/9F9B07EF9AD291167CF5700628145DE1DEB777C2CFC7907553B24446515F6D0E' then 'Swap To grvUSDC'
when to_currency = 'ibc/8242AD24008032E457D2E12D46588FD39FB54FB29680C6C7663D296B383C37C4' then 'Swap To axlUSDT'
when to_currency = 'ibc/71B441E27F1BBB44DD0891BCD370C2794D404D60A4FFE5AECCD9B1E28BC89805' then 'Swap To grvUSDT'
when to_currency = 'ibc/C78F65E1648A3DFE0BAEB6C4CDA69CC2A75437F1793C0E6386DFDA26393790AE' then 'Swap To USDX'
when to_currency = 'ibc/BE1BB42D4BE3C30D50B68D7C41DB4DFCE9678E8EF8C539F6E6A9345048894FCC' then 'Swap To USTC'
when to_currency = 'ibc/0E43EDE2E2A3AFA36D0CD38BDDC0B49FECA64FA426A82E102F304E430ECF46EE' then 'Swap To axlFRAX'
when to_currency = 'ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7' then 'Swap To axlDAI'
when to_currency = 'ibc/F292A17CF920E3462C816CBE6B042E779F676CAB59096904C4C1C966413E3DF5' then 'Swap To grvDAI'
else null end as type,
count (distinct tx_id) as TX_Count,
count (distinct trader) as Traders_Count,
sum (case when from_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' or to_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' then from_amount*usdprice/pow(10,from_decimal)
else from_amount/pow(10,from_decimal) end) as Total_Volume
from osmosis.core.fact_swaps t1 join pricet t2 on t1.block_timestamp::date = t2.day
where tx_status = 'SUCCEEDED' and type is not null
group by 1
Run a query to Download Data