binhachonDaily stETH Metrics - #5
Updated 2022-06-06
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with stETH_stake as (
select
block_timestamp,
raw_amount/1e18 as staked_amount
from flipside_prod_db.ethereum_core.fact_token_transfers
where contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
and from_address = '0x0000000000000000000000000000000000000000'
),
staking_stats as (
select
date_trunc('day', block_timestamp) as time,
sum(staked_amount) as daily_staked_amount,
datediff('day', time, getdate()) as number_of_days
from stETH_stake
group by 1
)
select
sum(daily_staked_amount * number_of_days) / sum(daily_staked_amount) as average_time
from staking_stats
Run a query to Download Data