Afonso_DiazOvertime (claim reward)
    Updated 4 days ago
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    ronin.price.ez_prices_hourly
    where
    symbol = 'RON'
    group by 1
    ),


    main as (
    select
    tx_hash,
    block_timestamp,
    '0x' || right(topics[2], 40) as pool_id,
    origin_from_address as user,
    utils.udf_hex_to_int(data)::bigint / 1e18 as amount,
    amount * token_price_usd as amount_usd,
    case origin_function_signature
    when '0x4d99dd16' then 'Unstake'
    when '0x5c19a95c' then 'Stake'
    when '0x097e4a9d' then 'Claim Reward'
    end as event_name
    from
    ronin.core.fact_event_logs
    left join
    pricet on block_timestamp::date = date
    where
    tx_succeeded
    and origin_to_address = '0x545edb750eb8769c868429be9586f5857a768758'
    and topics[0] in ('0xe5541a6b6103d4fa7e021ed54fad39c66f27a76bd13d374cf6240ae6bd0bb72b', '0x4d10bd049775c77bd7f255195afba5088028ecb3c7c277d393ccff7934f2f92c')
    and origin_function_signature in ('0x4d99dd16', '0x5c19a95c', '0x097e4a9d')
    Last run: 4 days ago
    DATE
    TRANSACTIONS
    USERS
    VOLUME_RON
    AVERAGE_AMOUNT_RON
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    1
    2024-09-30 00:00:00.00047363486323979.76787704268.407890177323979.76787704268.407890177
    2
    2024-10-07 00:00:00.00053023818253310.24356929147.776356765253310.24356929147.776356765
    3
    2024-10-14 00:00:00.00058214211144134.29374849324.761088086144134.29374849324.761088086
    4
    2024-10-21 00:00:00.00055684145264682.13555203847.53630308264682.13555203847.53630308
    5
    2024-10-28 00:00:00.00052673837417011.44989343379.174378184417011.44989343379.174378184
    6
    2024-11-04 00:00:00.00062884658267410.10748282242.527052717267410.10748282242.527052717
    7
    2024-11-11 00:00:00.00058634252214608.35805151836.603847527214608.35805151836.603847527
    8
    2024-11-18 00:00:00.00066134916338172.29063446951.137500474338172.29063446951.137500474
    9
    2024-11-25 00:00:00.00072325183577495.6314463879.852825145577495.6314463879.852825145
    10
    2024-12-02 00:00:00.00073575172595084.70766501980.88687069595084.70766501980.88687069
    11
    2024-12-09 00:00:00.000639243961240510.16840051194.0723041931240510.16840051194.072304193
    12
    2024-12-16 00:00:00.00064924479533121.66218158582.119787767533121.66218158582.119787767
    13
    2024-12-23 00:00:00.00066304736419654.71286062863.296336781419654.71286062863.296336781
    14
    2024-12-30 00:00:00.00071055158598395.83845970384.221792887598395.83845970384.221792887
    15
    2025-01-06 00:00:00.00089286806395409.70019726344.2887209395409.70019726344.2887209
    16
    2025-01-13 00:00:00.00069874774258789.25854799837.038680199258789.25854799837.038680199
    17
    2025-01-20 00:00:00.00063324338214533.28668876533.880809648214533.28668876533.880809648
    18
    2025-01-27 00:00:00.00058894023287583.16123483948.833955041287583.16123483948.833955041
    19
    2025-02-03 00:00:00.00061014381132250.76896562821.676900339132250.76896562821.676900339
    20
    2025-02-10 00:00:00.00061364274271927.52450124544.316741281271927.52450124544.316741281
    25
    2KB
    33s