0xHaM-dTotal
    Updated 2025-03-27
    with eventTb as (
    select
    block_timestamp,
    ORIGIN_FUNCTION_SIGNATURE,
    tx_hash,
    from_address as delegator,
    value as amount,
    concat('0x',split(input_data,'000000000000000000000000')[1]) as validator_id
    from ronin.core.fact_transactions
    where block_timestamp::date>='2024-10-01'
    and ORIGIN_FUNCTION_SIGNATURE = '0x5c19a95c' --Delegate
    and TO_ADDRESS='0x545edb750eb8769c868429be9586f5857a768758'

    union all

    select
    block_timestamp,
    ORIGIN_FUNCTION_SIGNATURE,
    tx_hash,
    origin_from_address as delegator,
    DECODED_LOG:amount/1e18 as amount,
    DECODED_LOG:poolId as validator_id
    from ronin.core.ez_decoded_event_logs
    where block_timestamp::date>='2024-10-01'
    and origin_TO_ADDRESS='0x545edb750eb8769c868429be9586f5857a768758'
    and ORIGIN_FUNCTION_SIGNATURE in (
    '0x4d99dd16' --undelegate
    , '0x097e4a9d' -- RewardClaimed
    )
    and EVENT_NAME in ('Undelegated','RewardClaimed')
    )
    ,
    priceTb as (
    select
    hour,
    median(price) as price
    Last run: 23 days ago
    RON_PRICE
    TOTAL_STAKE
    TOTAL_REWARDS
    TOTAL_N_DELEGATORS
    TOTAL_STAKE_USD
    N_VALIDATORS
    N_DELEGATORS
    CURRENT_DELEGATE_AMT
    UNDELEGATE_AMT
    DELEGATE_AMT
    AVG_DELEGATE_AMT
    MAX_DELEGATE_AMT
    CLAIMED_REWARD
    AVG_CLAIMED_REWARD
    MAX_CLAIMED_REWARD
    CURRENT_DELEGATE_AMT_USD
    UNDELEGATE_AMT_USD
    DELEGATE_AMT_USD
    CLAIMED_REWARD_USD
    1
    0.79621424908840859503032315064198327677.68731242779508306801.0483934374527745.558603582834546.6069969182.30637279533000002164274.570057414.76324266639458.1317409216613991.2899455259340034.402197965954025.69214341723225.71252369
    1
    250B
    20s