0xaimanStaking Platform Performance Metrics
    Updated 2022-09-05
    with a as (select block_timestamp, origin_from_address,tx_hash, origin_to_address, amount from
    ethereum.core.ez_eth_transfers
    where origin_to_address = '0x00000000219ab540356cbb839cbe05303d7705fa'
    or origin_to_address = lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84')
    or origin_to_address = lower('0x4D05E3d48a938db4b7a9A59A802D5b45011BDe58')
    or origin_to_address = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670')
    or origin_to_address = lower('0x49D72e3973900A195A155a46441F0C08179FdB64')
    or origin_to_address = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A')
    or origin_to_address = lower ('0xcBc1065255cBc3aB41a6868c22d1f1C573AB89fd')
    ),

    b as ( select block_timestamp as t, tx_hash,origin_from_address, case when origin_to_address = '0x00000000219ab540356cbb839cbe05303d7705fa' then 'Direct Staking'
    when origin_to_address = lower('0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84') then 'Lido '
    when origin_to_address = lower('0x4D05E3d48a938db4b7a9A59A802D5b45011BDe58') then 'Rocket Pool '
    when origin_to_address = lower('0x84db6eE82b7Cf3b47E8F19270abdE5718B936670') then 'Cream Finance 2.0'
    when origin_to_address = lower('0x49D72e3973900A195A155a46441F0C08179FdB64') then 'stkr '
    when origin_to_address = lower('0xC874b064f465bdD6411D45734b56fac750Cda29A') then 'Stakewise'
    when origin_to_address = lower ('0xcBc1065255cBc3aB41a6868c22d1f1C573AB89fd') then 'Cream Finance 1.0 '

    else null end as staking_platform
    , amount
    from a
    ),
    c as (select origin_from_address as depo, staking_platform, sum(amount) as vol_eth_staked
    from b
    --where staking_platform='Direct Staking'
    group by 1,2 order by 1)

    select staking_platform, avg(vol_eth_staked) as avg_eth_deposited, min(vol_eth_staked) as min_eth_deposited, max(vol_eth_staked) as max_eth_deposited
    from c
    group by 1


    Run a query to Download Data