Afonso_DiazOvertime
    Updated 2025-05-18
    with

    swaps as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as swapper,
    a.contract_address as token_in,
    b.contract_address as token_out,
    a.amount as amount_in,
    b.amount as amount_out,
    a.amount_usd as amount_in_usd,
    b.amount_usd as amount_out_usd,
    a.symbol as symbol_in,
    b.symbol as symbol_out
    from
    ronin.core.ez_token_transfers a
    join
    ronin.core.ez_token_transfers b using (tx_hash, block_timestamp)
    where
    a.contract_address != b.contract_address
    and b.to_address = origin_from_address
    and a.to_address != '0x22cefc91e9b7c0f3890ebf9527ea89053490694e'
    and b.to_address != '0x22cefc91e9b7c0f3890ebf9527ea89053490694e'
    and a.from_address != '0x0000000000000000000000000000000000000000'
    and b.from_address != '0x0000000000000000000000000000000000000000'
    and tx_hash not in (select distinct tx_hash from ronin.core.fact_transactions where input_data = '0x')
    ),

    main as (
    select
    *,
    nvl(amount_in_usd, amount_out_usd) as amount_usd,
    iff(token_in = '0xf988f63bf26c3ed3fbf39922149e3e7b1e5c27cb', amount_in, amount_out) as amount,
    iff(token_in = '0xf988f63bf26c3ed3fbf39922149e3e7b1e5c27cb', 'Sell', 'Buy') as type
    Last run: 12 days ago
    DATE
    SWAPS
    SWAPPERS
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    VOLUME
    AVERAGE_AMOUNT
    CUMULATIVE_SWAPS
    CUMULATIVE_VOLUME
    CUMULATIVE_VOLUME_USD
    1
    2025-01-20 00:00:00.00021631054163398.0569.3245863392339407402.78894901158.47565059121632339407402.78894163398.05
    2
    2025-01-27 00:00:00.00056027125415.6248.595831741627972849.53742459173.4887271927233967380252.32634188813.67
    3
    2025-02-03 00:00:00.00035517019602.8952.8379784371376384698.802973332650.602428530785343764951.12931208416.56
    4
    2025-02-10 00:00:00.000854116081630973.36128.1405845385263923241.55728371247.848336081161910607688192.68661839389.92
    5
    2025-02-17 00:00:00.000794715532046121.46124.6419018032458211242.80104137869.3910712871956613065899435.48763885511.38
    6
    2025-02-24 00:00:00.0001281621372891298.34114.109177521457487646.1910757521.8109634183238214523387081.67876776809.72
    7
    2025-03-03 00:00:00.000898718402303482.08142.225369227464632654.4551528688.1115371174136914988019736.13399080291.8
    8
    2025-03-10 00:00:00.000508312451509137.84144.00170229391880044.22430137393.1339908684645215379899780.358210589429.64
    9
    2025-03-17 00:00:00.0003001851701570.63107.900742848323261565.18601149717.2508745024945315703161345.544211291000.27
    10
    2025-03-24 00:00:00.0001790640478578.77135.497953001180512996.80174251107.8699891685124315883674342.345911769579.04
    11
    2025-03-31 00:00:00.00038352662484148.3286.408766732197995627.32225735337.4312550885507816081669969.668212253727.36
    12
    2025-04-07 00:00:00.0002094803561504.67142.045198583309104507.53537878194.917160485717216390774477.203512815232.03
    13
    2025-04-14 00:00:00.000998375185889.3195.720550978138661118.53583271401.1938907485817016529435595.739413001121.34
    14
    2025-04-21 00:00:00.0001531457286486.03101.735095881255021831.53835390561.7299496995970116784457427.277713287607.37
    15
    2025-04-28 00:00:00.0001361450201932.9686.555062152251413945.067337107764.2284900726106217035871372.345113489540.33
    16
    2025-05-05 00:00:00.0001694534304825.5592.849695401319829621.98206197419.9274998666275617355700994.327113794365.88
    17
    2025-05-12 00:00:00.00059522380879.4574.61203874588410814.05456481559.7915632516335117444111808.381713875245.33
    17
    2KB
    16s