Keyrockuni3_lp_distribution
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 pool_info as (
select
pool_address,
pool_name,
block_timestamp as pool_create_time,
tick_spacing,
fee_percent,
token0_address,
token0_symbol,
token0_decimals,
token1_address,
token1_symbol,
token1_decimals
from ethereum.uniswapv3.ez_pools
where pool_address = lower('{{pool_address}}')
limit 1 -- can only match exactly one pool
),
mint_burn as (
select
lp.tick_lower,
lp.tick_upper,
pinfo.tick_spacing,
case
-- liquidity is misnomer, it's NOT new liquidity after action
-- it's delta liquidity in that action
when lp.action = 'INCREASE_LIQUIDITY' then lp.liquidity
when lp.action = 'DECREASE_LIQUIDITY' then -1*lp.liquidity
end as delta_liquidity
from ethereum.uniswapv3.ez_lp_actions lp
Run a query to Download Data