Updated 2024-08-05
    -- 0xc148cf85: unstake
    -- 0xc88d9ba6: stake


    WITH stake AS (
    SELECT
    block_timestamp,
    tx_hash,
    from_address,
    value,
    tx_fee,
    'Stake' AS label
    FROM blast.core.fact_transactions
    WHERE to_address = '0xe1784da2b8f42c31fb729e870a4a8064703555c2'
    AND origin_function_signature = '0xc88d9ba6'
    )

    SELECT
    date_trunc('hour',block_timestamp) AS hour,
    count(tx_hash) AS transactions,
    count(DISTINCT from_address) AS users,
    SUM(value) AS stake_value,
    SUM(tx_fee) AS fee,
    SUM(stake_value) OVER(ORDER BY hour ASC) AS cum_stakke_value,
    SUM(fee) OVER(ORDER BY hour ASC) AS cum_fee,
    SUM(transactions) OVER(ORDER BY hour ASC) AS cum_transactions,
    SUM(users) OVER(ORDER BY hour ASC) AS cum_users

    FROM stake
    GROUP BY 1
    ORDER BY 1 DESC



    Auto-refreshes every 1 hour
    QueryRunArchived: QueryRun has been archived