nitsTVL for top 10 liquidity pools
Updated 2022-02-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
with prices as (select token_address as ta, date(hour) as day, avg(price) as avg_price from ethereum.token_prices_hourly
where day = CURRENT_DATE -1
GROUP by 1, 2)
select pool_address,pool_name, sum(current_amt_net) as tvl from (select *, amt_net*avg_price as current_amt_net FROM
(select *, case when direction = 'IN' then amount_in else amount_out*(-1) end as amt_net
from ethereum.dex_swaps
where platform = 'sushiswap')
inner join prices
on ta = token_address )
where current_amt_net is not NULL
GROUP by 1,2
ORDER by 3 desc
limit 10
Run a query to Download Data