KeyrockETH Deposit and Withdraw
    Updated 2024-01-24
    with w as (
    select
    date_trunc('hour', slot_timestamp) as utc
    ,sum(withdrawal_amount) * -1 as eth
    ,sum(eth) over (order by utc) as eth_cumul
    ,count(distinct withdrawal_address) as n_addresses
    from ethereum.beacon_chain.fact_withdrawals
    group by 1
    )

    ,st as (
    select
    date_trunc('hour', block_timestamp) as utc
    ,sum(amount) as eth
    ,sum(amount_usd) as usd
    ,count(distinct eth_from_address) as n_addresses
    from ethereum.core.ez_eth_transfers
    where eth_to_address = '0x00000000219ab540356cbb839cbe05303d7705fa'
    and block_timestamp::date >= '2023-04-11'
    group by 1
    )

    select
    st.utc
    ,concat(w.eth,0) as eth_withdrawn
    ,w.n_addresses as n_w_addresses
    ,st.eth as eth_staked
    ,st.n_addresses as n_st_addresses
    ,eth_staked + eth_withdrawn as eth_diff -- plus sign because withdrawals already negative
    from st
    left join w using (utc)
    Last run: over 1 year ago
    UTC
    ETH_WITHDRAWN
    N_W_ADDRESSES
    ETH_STAKED
    N_ST_ADDRESSES
    ETH_DIFF
    1
    2023-08-01 15:00:00.000-115.14503178403353194203.854968216
    2
    2023-08-19 20:00:00.000-85.73779537405876377551.262204626
    3
    2023-10-18 07:00:00.000-1024.81824850204387067-318.818248502
    4
    2023-05-04 15:00:00.000-1378.89882707905756025174646.101172921
    5
    2023-05-05 22:00:00.000-52433.46618378902428186252-44247.466183789
    6
    2023-09-30 06:00:00.000-92.3428544850313333073237.657145515
    7
    2023-08-07 19:00:00.000-307.5766417760690642-243.576641776
    8
    2023-07-29 22:00:00.000-212.44994358507939601233747.550056415
    9
    2023-04-24 21:00:00.000-137.759823110645623175485.24017689
    10
    2023-08-03 12:00:00.000-279.99059780903396107330.009402191
    11
    2023-12-14 05:00:00.000-736.20876045903551281-608.208760459
    12
    2024-01-18 20:00:00.000-2021.1647062830610307091048.835293717
    13
    2024-01-11 14:00:00.000-257.7021334540120011188860.297866546
    14
    2024-02-04 10:00:00.000-2081.929749646028214417-640.929749646
    15
    2023-12-24 01:00:00.000-2980.760058435015995766-2023.760058435
    16
    2024-02-08 22:00:00.000-607.690547051034292481238640.309452949
    17
    2023-12-31 05:00:00.000-4502.635163862060251597-3987.635163862
    18
    2023-11-22 16:00:00.000-2094.24584425301693214-1773.245844253
    19
    2023-06-04 15:00:00.000-768.783763714040192919160.216236286
    20
    2023-05-18 03:00:00.000-238.08148278908414735104496.918517211
    ...
    7503
    521KB
    10s