0xaimanImpermanent Loss/Gain Uniswap v3
Updated 2023-08-13
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
›
⌄
with top_pool as (
with tvl as (
select
pool_name,
pool_address,
avg(token0_balance_usd +token1_balance_usd) as tvl_USD
from ethereum.uniswapv3.ez_pool_stats
where block_timestamp>=dateadd(day,-1,CURRENT_DATE)
group by 1 ,2 order by 3 desc
)
select *
from tvl
where tvl_USD is not null
order by 3 desc
limit 5
),
lpa as (select ezlpa.*
from ethereum.uniswapv3.ez_lp_actions ezlpa
inner join top_pool on ezlpa.pool_address=top_pool.pool_address),
add_liquidity as
(
select
block_timestamp,
liquidity_provider,
pool_name,
token0_symbol,
amount0_adjusted,
amount0_usd,
token1_symbol,
amount1_adjusted,
Run a query to Download Data