0xaimanlp loop liquidity
Updated 2022-01-23
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
32
33
34
35
36
›
⌄
⌄
-----this good
/*
select *
from terra.msg_events, table(flatten(input=>EVENT_ATTRIBUTES))ea
where tx_id='C1001D96EE7E1C7CA5C898DA72ED2686ACFE6B29A3786765D36B7A2B2E461026' and event_type='wasm'
limit 100
*/
-- mega da6ta 1
--lca and wlp
with lwp as
(with lw as (
with wnv as -- wnv=withdraw and value
( with burn as
(select tx_id , ea.value/1000000 as wlp
from terra.msg_events, table(flatten(input=>EVENT_ATTRIBUTES))ea
where --tx_id='C1001D96EE7E1C7CA5C898DA72ED2686ACFE6B29A3786765D36B7A2B2E461026' and
event_type='wasm'
and key='0_amount'
),
--this is withdrawal data
wdata as
(select tx_id
from terra.msg_events, table(flatten(input=>EVENT_ATTRIBUTES))ea
where --tx_id='C1001D96EE7E1C7CA5C898DA72ED2686ACFE6B29A3786765D36B7A2B2E461026' and
event_type='wasm' and key='1_action' and value='withdraw_liquidity'