phu44. % redeploy of top 10 pools remove liquidity before the merge
Updated 2022-10-04
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
pool_cte as (
select
pool_address
, pool_name
from ethereum.core.dim_dex_liquidity_pools
where 1=1
and platform = 'sushiswap'
)
, remove_cte as (
select
from_address pool_address
, origin_from_address
, sum(ifnull(amount_usd,0)) amount_usd
from ethereum.core.ez_token_transfers
where 1=1
and origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
and origin_function_signature in ('0x02751cec','0x2195995c','0x5b0d5984','0xaf2979eb','0xbaa2abde','0xded9382a') -- remove liquidity
and from_address in (select pool_address from pool_cte)
and BLOCK_TIMESTAMP::date > '2022-09-01'
and BLOCK_TIMESTAMP::date <= '2022-09-15'
and block_number < 15537394 -- first POS block
and amount_usd > 0
group by 1,2
)
, redeploy_cte as (
select
to_address pool_address
, sum(ifnull(amount_usd,0)) amount_usd
from ethereum.core.ez_token_transfers
where 1=1
and origin_to_address = '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f'
and origin_function_signature in ('0xe8e33700','0xf305d719') -- add liquidity
and to_address in (select pool_address from pool_cte)
and BLOCK_TIMESTAMP::date >= '2022-09-15'
and BLOCK_TIMESTAMP::date < '2022-09-28'
Run a query to Download Data