freemartianLVN increase liquidity
Updated 2023-12-29
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
›
⌄
-- SELECT * FROM osmosis.core.fact_tx_body_msgs
-- where MSG_TYPE = '/osmosis.concentratedliquidity.v1beta1.MsgWithdrawPosition'
-- AND block_timestamp::date = current_date - 1
WITH increase_liquidity AS (
SELECT
tx_id,
msg:attributes[3]:value AS pool_id,
msg:attributes[2]:value AS sender
FROM osmosis.core.fact_msgs
WHERE tx_id in(
SELECT tx_id
FROM osmosis.core.fact_tx_body_msgs
WHERE msg_type = '/osmosis.concentratedliquidity.v1beta1.MsgAddToPosition'
)
AND msg_type = 'withdraw_position'
AND pool_id IN ('1325','1337')
)
SELECT
block_timestamp,
msgs.tx_id,
msg:sender,
'LVN' AS token0_symbol,
msg:amount0 AS token0_raw_amount,
msg:amount0 / pow(10,6) AS token0_amount,
(CASE
WHEN pool_id = '1325' THEN 'OSMO'
WHEN pool_id = '1337' THEN 'USDC'
END
) AS token1_symbol,
msg:amount1 AS token1_raw_amount,
msg:amount1 / pow(10,6) AS token1_amount,
pool_id
QueryRunArchived: QueryRun has been archived