saeedmznaxlUSDC vs ATOM swaps total
Updated 2022-11-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
------------------CopyRight by Ali3n------------------ https://app.flipsidecrypto.com/dashboard/axl-usdc-soon-to-be-forgotten-tNernJ
with atom_price as (
select recorded_at::date daily,
avg (price) price
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 to_currency = 'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858' then 'Swap To axlUSDC'
when to_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' then 'Swap To ATOM'
end type,
count (distinct tx_id) num_swaps,
count (distinct trader) num_swappers,
sum (case when from_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' or to_currency = 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2' then from_amount*price/pow(10,from_decimal)
else from_amount/pow(10,from_decimal) end ) swapped_volume
from osmosis.core.fact_swaps join atom_price on block_timestamp::date = daily
where tx_status = 'SUCCEEDED'
group by 1 having type is not NULL
------------------CopyRight by Ali3n------------------ https://app.flipsidecrypto.com/dashboard/axl-usdc-soon-to-be-forgotten-tNernJ
Run a query to Download Data