MoDeFi#eth - Liquid Staking 5
Updated 2023-06-24Copy Reference Fork
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 platforms_staking as (
select BLOCK_TIMESTAMP,'Stakewise' as platform, ETH_FROM_ADDRESS as staker, AMOUNT, AMOUNT_USD
from ethereum.core.ez_eth_transfers
where ETH_TO_ADDRESS='0xc874b064f465bdd6411d45734b56fac750cda29a' --Stakewise: ETH2 Staking
union all
select BLOCK_TIMESTAMP,'Ankr' as platform, ETH_FROM_ADDRESS as staker, AMOUNT, AMOUNT_USD
from ethereum.core.ez_eth_transfers
where ETH_TO_ADDRESS='0x84db6ee82b7cf3b47e8f19270abde5718b936670' --Ankr: ETH2 Staking
union all
select BLOCK_TIMESTAMP,'Rocket Pool' as platform, ETH_FROM_ADDRESS as staker, AMOUNT, AMOUNT_USD
from ethereum.core.ez_eth_transfers
where ETH_TO_ADDRESS in ('0x4d05e3d48a938db4b7a9a59a802d5b45011bde58', '0x2cac916b2a963bf162f076c0a8a4a8200bcfbfb4') --Rocket Pool
and ETH_FROM_ADDRESS not in ('0x3bdc69c4e5e13e52a65f5583c23efb9636b469d6')
union all
select BLOCK_TIMESTAMP,'Rocket Pool' as platform, ETH_FROM_ADDRESS as staker, AMOUNT, AMOUNT_USD
from ethereum.core.ez_eth_transfers
where ETH_TO_ADDRESS='0xdcd51fc5cd918e0461b9b7fb75967fdfd10dae2f' --Rocket Pool: Node Deposits
union all
select BLOCK_TIMESTAMP,'Lido' as platform, ETH_FROM_ADDRESS as staker, AMOUNT, AMOUNT_USD
from ethereum.core.ez_eth_transfers
where ETH_TO_ADDRESS='0xae7ab96520de3a18e5e111b5eaab095312d7fe84' --Lido: stETH Token
)
select *,
sum(users) over (partition by platform order by date) as total_users
from
(select date_trunc('week',min_date) as date, platform, count(distinct staker) as users
from
Run a query to Download Data