KARTODEth2 liquid staking balances (time series)
Updated 2023-04-13Copy 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
›
⌄
SELECT
Time,
"Protocol",
"Number of Stakes",
"Number of Unique Staker",
"Amount of ETH Staked",
SUM("Amount of ETH Staked") OVER (PARTITION BY "Protocol" ORDER BY Time) AS "Total Amount of ETH Staked",
SUM("Number of Stakes") OVER (PARTITION BY "Protocol" ORDER BY Time) AS "Total Number of Stakes"
FROM (
(select
'Lido' as "Protocol",
DATE(BLOCK_TIMESTAMP) AS Time,
count(*) as "Number of Stakes",
count(distinct event_inputs:to) as "Number of Unique Staker",
sum(event_inputs:value/1e18) as "Amount of ETH Staked"
from ethereum.core.fact_event_logs
where contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
and event_inputs:from = '0x0000000000000000000000000000000000000000'
--and block_timestamp >= '2022-02-01'
and event_name = 'Transfer'
group by 1,2)
union all
(select
'Rocket Pool' as "Protocol",
DATE(BLOCK_TIMESTAMP) AS Time,
count(*) as "Number of Stakes",
count(distinct event_inputs:to) as "Number of Unique Staker",
sum(event_inputs:value/1e18) as "Amount of ETH Staked"
from ethereum.core.fact_event_logs
where contract_address = '0xae78736cd615f374d3085123a210448e74fc6393'
and event_inputs:from = '0x0000000000000000000000000000000000000000'
--and block_timestamp >= '2022-02-01'
and event_name = 'Transfer'
Run a query to Download Data