MetiocreTop Sushi pools by volume
Updated 2022-05-20
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
›
⌄
WITH add_liq AS (SELECT to_address_name as liq_pool, sum(amount_usd) as liq_added, sum(1) as count_added, avg(amount_usd) as avg_added
FROM ethereum.udm_events
WHERE to_label = 'sushiswap' AND to_label_subtype = 'pool'
and block_timestamp::date >= CURRENT_DATE - interval '90 days'
AND origin_function_name IN ('addLiquidity', 'addLiquidityETH')
AND amount_usd IS NOT NULL
and liq_pool not like '%sushiswap%'
GROUP BY liq_pool),
remove_liq AS (SELECT from_address_name as liq_pool, sum(amount_usd) as liq_removed, sum(1) as count_removed, avg(amount_usd) as avg_removed
FROM ethereum.udm_events
WHERE from_label = 'sushiswap' AND from_label_subtype = 'pool'
and block_timestamp::date >= CURRENT_DATE - interval '90 days'
AND origin_function_name IN ('removeLiquidityETH', 'removeLiquidityETHSupportingFeeOnTransferTokens', 'removeLiquidityWithPermit',
'removeLiquidityETHWithPermitSupportingFeeOnTransferTokens', 'removeLiquidity', 'removeLiquidityETHWithPermit')
AND amount_usd IS NOT NULL
and liq_pool not like '%sushiswap%'
GROUP BY liq_pool)
SELECT add_liq.liq_pool, liq_added, liq_removed, liq_added+liq_removed as total_volume, liq_added - liq_removed as tvl_change,
add_liq.avg_added as avg_liquidity_added, remove_liq.avg_removed as avg_liquidity_removed, avg_liquidity_removed+avg_liquidity_added as avg_liquidity
FROM add_liq LEFT JOIN remove_liq ON add_liq.liq_pool = remove_liq.liq_pool
where liq_removed is not null
ORDER BY total_volume DESC
LIMIT 20
Run a query to Download Data