2844ETH STAKED WITH LIDO
Updated 2022-10-05
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
›
⌄
with
lido as ( select date(block_timestamp) as "DATE"
,case
when BLOCK_NUMBER < 15537351 then 'Before Merg'
when BLOCK_NUMBER >= 15537351 then 'After Merg'
END AS CATEGORY,
tx_hash, event_inputs:to as total_lido_user,
event_inputs:value/pow(10,18) as total_stETH
from ethereum_core.fact_event_logs
where event_inputs:from = '0x0000000000000000000000000000000000000000' and contract_address = lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
and block_timestamp::date >= '2022-01-01'
)
,
price as ( select date(hour) as "DATE", symbol , avg(price) as price
from ethereum_core.fact_hourly_token_prices
where symbol = 'WETH'
group by 1,2)
,
lido_deposit as ( select lido."DATE" ,CATEGORY
, count(total_lido_user) as total_lido_user
, sum(total_stETH) as total_stETH , sum(total_stETH*price) as lido_total_deposit_usd
from lido,price
where lido."DATE" = price."DATE"
group by 1,2
)
select *
from lido_deposit
order by "DATE"
Run a query to Download Data