boomer77stader medium - lunax provide liquidity
Updated 2021-12-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with lp as (
select
BLOCK_TIMESTAMP,
tx_id,
MSG_VALUE:contract::string as contract,
MSG_VALUE:sender::string as sender,
MSG_VALUE:execute_msg:provide_liquidity:assets[0]:amount::string/1e6 as LUNA,
MSG_VALUE:execute_msg:provide_liquidity:assets[1]:amount::string/1e6 as lunax
from terra.msgs
where contract = 'terra1zrzy688j8g6446jzd88vzjzqtywh6xavww92hy')
select
date_trunc('day', block_timestamp) as dt,
sum(LUNA) as luna_lp,
sum(lunax) as LUNAX_LP,
sum(lunax_lp) over (order by dt) as LUNAX_provided_cumulative,
count(distinct(sender)) as addresses_count,
count(distinct(tx_id)) as tx_count
from lp
where lunax is not null
group by 1
order by 1 desc
Run a query to Download Data