shreyash-5873Anchor: New Deposits
Updated 2021-08-27
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
›
⌄
with daily_deposit_increases as (
select
date(block_timestamp) as block_date,
sum(m.msg_value:coins[0]:amount / pow(10, 6)) as deposit_amount_usd
from terra.msgs m
where m.msg_value:contract::string = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg:deposit_stable is not null
and tx_status = 'SUCCEEDED'
group by 1
),
borrow_stables as (
select
date(block_timestamp) as block_date,
sum(m.msg_value:execute_msg:borrow_stable:borrow_amount / pow(10, 6)) as borrow_amount_usd
from terra.msgs m
where m.msg_value:contract::string = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:execute_msg:borrow_stable is not null
and tx_status = 'SUCCEEDED'
group by 1
)
select
d.block_date,
deposit_amount_usd,
borrow_amount_usd
from daily_deposit_increases d
inner join borrow_stables b
on d.block_date = b.block_date
Run a query to Download Data