0xHaM-dSwaps Overview
    Updated 2025-03-27
    with swapEvent as (
    select
    block_timestamp,
    tx_hash,
    origin_from_address as swapper,
    case platform
    when 'balancer' then 'Balancer'
    when 'curve' then 'Curve'
    when 'trader-joe-v1' then 'Trader Joe'
    when 'trader-joe-v2' then 'Trader Joe'
    when 'uniswap-v3' then 'Uniswap'
    when 'woofi' then 'WOOFi'
    else platform
    end as dex,
    pool_name,
    token_in as from_token,
    token_out as to_token,
    symbol_in as from_symbol,
    symbol_out as to_symbol,
    (amount_in_usd + amount_out_usd) / 2 as swap_vol,
    case
    when amount_in_usd - amount_out_usd > 100 then amount_out_usd
    when amount_in_usd - amount_out_usd < -100 then amount_in_usd
    else (amount_in_usd + amount_out_usd) / 2
    end as amount_usd,
    iff(amount_in_usd - amount_out_usd between -10 and 10, (amount_out_usd - amount_in_usd) / amount_out_usd * 100, 0) as slippage
    from avalanche.defi.ez_dex_swaps
    where (token_in ilike '0xb2F85b7AB3c2b6f62DF06dE6aE7D09c010a5096E' -- XSGD
    or token_out ilike '0xb2F85b7AB3c2b6f62DF06dE6aE7D09c010a5096E') -- XSGD
    )
    select
    count(distinct tx_hash) as "Swaps",
    count(distinct swapper) as "Swappers",
    round(sum(amount_usd)) as "Volume"
    from swapEvent


    Last run: 28 days ago
    Swaps
    Swappers
    Volume
    1
    1269613717436573229
    1
    25B
    37s