LittlerDataLRON dposits and stakes net values ranges
    Updated 2025-04-02

    with deposits as (
    select
    tx_hash
    ,date_trunc('hour',block_timestamp) as hour
    ,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 tx_hash = '0x67dac46a1c1ad81bf77958a46cc8f35ec90f7f04efad84ec98ef9f78310bb687' --first deposit
    and contract_address = '0xcad9e7aa2c3ef07bad0a7b69f97d059d8f36edd2' --LRON contract
    and topic_0 = '0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7' --deposit topic
    ),

    wron_price as ( --wrapped ron
    select
    hour
    ,price as avg_price
    from ronin.price.ez_prices_hourly
    where token_address = '0xe514d9deb7966c8be0ca922de8a064264ea6bcd4'
    and hour > '2025-03-19'
    ),

    hourly as (
    select
    hour
    ,sum(lron_amount * avg_price) as deposit_volume_usd
    ,avg(lron_amount * avg_price) as avg_deposit_usd
    ,median(lron_amount * avg_price) as median_deposit_usd
    ,max(lron_amount * avg_price) as max_deposit_usd
    ,min(lron_amount * avg_price) as min_deposit_usd
    from deposits
    left join wron_price using (hour)
    group by hour
    Last run: 13 days ago
    DATE
    DEPOSIT_VOLUME_USD
    AVG_DEPOSIT_USD
    MEDIAN_DEPOSIT_USD
    MAX_DEPOSIT_USD
    MIN_DEPOSIT
    1
    2025-03-27 00:00:00.0002093017.1162745424545.17528342594.8378303931934510.636924920.7686862278
    2
    2025-03-20 00:00:00.000178847.75366922355.96920862577.0653177250.190.770653
    3
    2025-03-31 00:00:00.00036216.504512293534.4616233718.36904324331614.7157074460.006908222776
    4
    2025-04-02 00:00:00.00081677.4754822452486.57973507814.68452373178237.0552399440.4259519786
    5
    2025-04-01 00:00:00.0003208.853023202106.41491007151.045106567679.1083959060.01794023154
    6
    2025-03-22 00:00:00.00017206.809623742333.04030601738.41033906.850.0385575
    7
    2025-03-29 00:00:00.00019823.41668696521.466617164157.8294918212658.9320332680.7190147759
    8
    2025-03-30 00:00:00.0005157.813688545133.13010104528.7113791262141.2169316590.3573343437
    9
    2025-03-21 00:00:00.000392794.1113058512089.04489013626.86755276312.36250.00780387
    10
    2025-03-25 00:00:00.000311619.212553661964.24835812381.51052537972446.940.804966
    11
    2025-03-23 00:00:00.00022641.50123929354.0567350838.971007312467.7647160.779284
    12
    2025-03-24 00:00:00.000366498.537357404874.05655353253.125494161438.80
    13
    2025-03-26 00:00:00.00032555.100397957740.79256779757.44320885512574.8846057870.008049029872
    14
    2025-03-28 00:00:00.000201122.697720081212.6654002379.28875978638810.4876647580
    14
    1KB
    22s