Afonso_DiazOvertime
    Updated 2025-03-06
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    crosschain.price.ez_prices_hourly
    where
    blockchain = 'ethereum'
    and token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as staker,
    utils.udf_hex_to_int(substring(data, 67, 64))::bigint / 1e18 as amount,
    'Stake' as event_name
    from
    ink.core.fact_event_logs
    where
    tx_succeeded
    and topics[0] = '0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f'
    and origin_to_address = '0xcab283e4bb527aa9b157bae7180fef19e2aaa71a'

    union all

    select
    tx_hash,
    block_timestamp,
    origin_from_address as staker,
    utils.udf_hex_to_int(substring(data, 3, 64))::bigint / 1e18 as amount,
    'Unstake' as event_name
    Last run: about 2 months ago
    DATE
    EVENT_NAME
    TRANSACTIONS
    STAKERS
    VOLUME_ETH
    AVERAGE_AMOUNT_ETH
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    CUMULATIVE_TRANSACTIONS
    CUMULATIVE_VOLUME_ETH
    CUMULATIVE_VOLUME_USD
    1
    2024-12-18 00:00:00.000Stake220.00030.000151.1537116250.576855812520.00031.153711625
    2
    2024-12-19 00:00:00.000Stake40393.2066070.08016517511587.524655566289.688116389423.20690711588.678367191
    3
    2024-12-19 00:00:00.000Unstake110.00020.00020.72272808330.722728083310.00020.7227280833
    4
    2024-12-20 00:00:00.000Stake63593.1080650.04933436507910463.500256671166.0873056611056.31497222052.178623862
    5
    2024-12-21 00:00:00.000Stake32294.0061040.1251907513761.0840847430.03387764713710.32107635813.262708562
    6
    2024-12-21 00:00:00.000Unstake220.8000020.4000012748.0302033921374.01510169630.8002022748.752931475
    7
    2024-12-22 00:00:00.000Stake27250.2908830.010773444444969.8698554835.92110575916410.61195936783.132564042
    8
    2024-12-22 00:00:00.000Unstake110.00010.00010.33342266670.333422666740.8003022749.086354142
    9
    2024-12-23 00:00:00.000Stake33310.3380690.0102445151521120.63802344233.95872798319710.95002837903.770587484
    10
    2024-12-23 00:00:00.000Unstake110.00010.00010.33148204170.331482041750.8004022749.417836183
    11
    2024-12-24 00:00:00.000Stake66431.4108220.0213760909094838.61744250573.31238549226312.3608542742.388029989
    12
    2024-12-24 00:00:00.000Unstake110.0800080.080008274.398970487274.39897048760.880413023.81680667
    13
    2024-12-25 00:00:00.000Stake42410.8253660.0196515714292872.56874834568.39449400830513.18621645614.956778334
    14
    2024-12-25 00:00:00.000Unstake440.3350090.083752251165.951085718291.487771429101.2154194189.767892388
    15
    2024-12-26 00:00:00.000Stake114422.2295480.0195574385967560.50781642266.32024400441915.41576453175.464594756
    16
    2024-12-26 00:00:00.000Unstake541.0910030.21820063699.645268565739.929053713152.3064227889.413160953
    17
    2024-12-27 00:00:00.000Stake27270.3127620.0115837777781050.93361985738.92346740244615.72852654226.398214613
    18
    2024-12-28 00:00:00.000Stake28281.5966780.0570242142865354.894767755191.24624170647417.32520459581.292982368
    19
    2024-12-28 00:00:00.000Unstake440.3420320.0855081147.09751572286.77437893192.6484549036.510676673
    20
    2024-12-29 00:00:00.000Stake31300.2680110.008645516129905.51134498529.21004338750517.59321560486.804327353
    ...
    152
    18KB
    11s