somethingelseLiquidated Mirror collateral filtered by collateral
Updated 2022-01-04
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
›
⌄
select
m.block_id,
m.event_attributes:"owner"::string as borrower,
m.tx_id,
m.event_attributes:liquidated_amount[0]:amount/ pow(10, 6) as liquidated_mAsset_amount,
m.event_attributes:return_collateral_amount[0]:amount/ pow(10, 6) as liquidated_collateral_amount,
m.event_attributes:return_collateral_amount[0]:denom::string as liquidated_collateral,
m.event_attributes:protocol_fee[0]:amount/ pow(10, 6) as protocol_fee,
m.event_attributes:"position_idx"::string as position_idx,
'Liquidated' as position_type
from terra.msg_events m
where m.event_type = 'from_contract'
and m.event_attributes:liquidated_amount[0]:denom::string = 'terra1aa00lpfexyycedfg5k2p60l9djcmw0ue5l8fhc'
and m.event_attributes:"position_idx"::string is NOT NULL
UNION
select
m.block_id,
m.event_attributes:"owner"::string as borrower,
m.tx_id,
m.event_attributes:liquidated_amount[0]:amount/ pow(10, 6) as liquidated_mAsset_amount,
m.event_attributes:return_collateral_amount[0]:amount/ pow(10, 6) as liquidated_collateral_amount,
m.event_attributes:return_collateral_amount[0]:denom::string as liquidated_collateral,
m.event_attributes:protocol_fee[0]:amount/ pow(10, 6) as protocol_fee,
m.event_attributes:"0_position_idx"::string as position_idx,
'Liquidated' as position_type
from terra.msg_events m
where m.event_type = 'from_contract'
and m.event_attributes:liquidated_amount[0]:denom::string = 'terra1aa00lpfexyycedfg5k2p60l9djcmw0ue5l8fhc'
and m.event_attributes:"0_position_idx"::string is NOT NULL
Run a query to Download Data