Meir2023-08-18 03:27 AM
Updated 2023-09-21
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
›
⌄
-- 0xb0ce2021785143f268c9eaf39bc957c7a9082d11 -- uni v3 oeth ovg
with increase as (
SELECT
LIQUIDITY_PROVIDER,
sum(AMOUNT0_ADJUSTED) as oeth_amount,
sum(AMOUNT1_ADJUSTED) as ovg_amount
FROM ethereum.uniswapv3.ez_lp_actions
WHERE TOKEN0_SYMBOL = 'OETH'
AND ACTION = 'INCREASE_LIQUIDITY'
GROUP BY LIQUIDITY_PROVIDER
),
decrease as (
SELECT
LIQUIDITY_PROVIDER,
sum(AMOUNT0_ADJUSTED) as oeth_amount,
sum(AMOUNT1_ADJUSTED) as ovg_amount
FROM ethereum.uniswapv3.ez_lp_actions
WHERE TOKEN0_SYMBOL = 'OETH'
AND ACTION = 'DECREASE_LIQUIDITY'
GROUP BY LIQUIDITY_PROVIDER
)
SELECT
increase.LIQUIDITY_PROVIDER as lp,
(increase.oeth_amount - decrease.oeth_amount) as net_oeth,
(increase.ovg_amount - decrease.ovg_amount) as net_ovg
FROM increase
Run a query to Download Data