binhachon1. Weigh Anchor (Users) - top 100 number of tx
Updated 2022-01-09
999
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 Anchor_borrow as (
select
block_timestamp,
msg_value:sender::string as borrower,
msg_value:execute_msg:borrow_stable:borrow_amount::float/1e6 as borrow_amount
from
terra.msgs
where msg_value:execute_msg:borrow_stable is not null
and msg_value:contract::string = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and tx_status = 'SUCCEEDED'
),
Anchor_repay as (
select
block_timestamp,
msg_value:sender::string as borrower,
msg_value:coins[0]:amount::float/1e6 as repay_amount
from
terra.msgs
where msg_value:execute_msg:repay_stable is not null
and msg_value:contract::string = 'terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s'
and msg_value:coins[0]:denom::string = 'uusd'
and tx_status = 'SUCCEEDED'
),
single_liquidation as (
select
tx_id,
block_timestamp,
event_attributes:"0_borrower"::string as borrower,
event_attributes:liquidator::string as liquidator,
event_attributes:"1_repay_amount"::float/1e6 as repay_amount
from
terra.msg_events
where event_type = 'from_contract'
and tx_status = 'SUCCEEDED'
and event_attributes:"0_action"::string = 'liquidate_collateral'
and event_attributes:collateral_token::string is not null
Run a query to Download Data