LittlerDataLRON withdraws & redeem copy
    Updated 2025-04-02


    with redeems as (
    select
    tx_hash
    ,block_timestamp
    ,origin_from_address
    ,utils.udf_hex_to_int(right(data, 64))::int / 1e18 as LRON_amount
    ,iff(origin_to_address = '0xcad9e7aa2c3ef07bad0a7b69f97d059d8f36edd2', 'Scrow contract', origin_to_address) as origin_to_address --0xcad9e7aa2c3ef07bad0a7b69f97d059d8f36edd2 scrow contract
    from ronin.core.fact_event_logs
    where 1=1
    and block_timestamp > '2025-03-19'
    and contract_address = '0xcad9e7aa2c3ef07bad0a7b69f97d059d8f36edd2' --LRON contract
    and topic_0 = '0xfbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db' --redeem topic
    )

    select
    date_trunc('day',block_timestamp) as date
    ,avg(lron_amount) as avg_redeem
    ,median(lron_amount) as median_redeem
    ,max(lron_amount) as max_redeem
    ,min(lron_amount) as min_redeem
    from redeems
    group by 1
    --group by date




    Last run: 25 days ago
    DATE
    AVG_REDEEM
    MEDIAN_REDEEM
    MAX_REDEEM
    MIN_REDEEM
    1
    2025-03-31 00:00:00.000740.484095238095149.9041888.6940.998
    2
    2025-03-22 00:00:00.000128.6195263157892015100.26
    3
    2025-03-30 00:00:00.000596.4862528.996535000.999
    4
    2025-04-01 00:00:00.000522.01390909090939.16246504
    5
    2025-03-20 00:00:00.0002222
    6
    2025-03-26 00:00:00.0001241.00173684210599.9999214.910.589
    7
    2025-03-25 00:00:00.0001311.635761009803.1620.5
    8
    2025-03-21 00:00:00.000355.3121432.512913.6071
    9
    2025-03-28 00:00:00.000661.31612587.257999.580
    10
    2025-04-02 00:00:00.00016.4993952515350.997581
    11
    2025-03-27 00:00:00.000265.5721875851635.870.449
    12
    2025-03-23 00:00:00.000619.2352941176474033001
    13
    2025-03-29 00:00:00.0001522.3384150150000.998
    14
    2025-03-24 00:00:00.000170.370666666667201406.7340.05
    14
    795B
    37s