hessAxlar Liquidity
Updated 2022-09-30Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with liquidity as ( select trunc(block_timestamp,'hour') as date, tx_id, liquidity_provider_address as user,
pool_id, amount/pow(10,6) as amounts, case when CURRENCY = 'uosmo' then 'Osmo'
when CURRENCY = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E' then 'Axelar'
end as token, action
from osmosis.core.fact_liquidity_provider_actions
where pool_id = '812'
and TX_STATUS = 'SUCCEEDED' and (CURRENCY = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
or CURRENCY in ('osmo','uosmo'))
and block_timestamp::date >= CURRENT_DATE - 10)
select date, token , count(DISTINCT(user)) as total_user, count(DISTINCT(tx_id)) as total_tx,
sum(amounts) as total_amount, avg(amounts) as avg_amount,
sum(total_user) over (partition by token order by date asc) as cum_user,
sum(total_tx) over (partition by token order by date asc) as cum_tx,
sum(total_amount) over (partition by token order by date asc) as cum_amount
from liquidity
where action = 'pool_joined'
group by 1,2
Run a query to Download Data