amdonatusprinceCompare Info: Pool 2
Updated 2022-10-08
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 lp_ltv as (
select
pool_name,
pool_address,
avg(token0_balance_usd + token1_balance_usd) as tvl
from uniswapv3.pool_stats
where token0_balance_usd is not null and token1_balance_usd is not null
and pool_name is not null
group by 1,2
order by tvl desc
limit 100
),
swap_txns as (
select
pool_name,
pool_address,
tx_id,
sender
from uniswapv3.swaps
where pool_name in (select pool_name from lp_ltv)
),
swaps as (
select
pool_name,
count(distinct(tx_id)) as n_swaps,
count(distinct(sender)) as n_wallets
from uniswapv3.swaps
group by pool_name
),
fees as (
select
s.pool_name,
sum(t.fee_usd) as total_fees
from ethereum.transactions t
join swap_txns s on s.tx_id = t.tx_id
Run a query to Download Data