Eman-RazSATOSHI Swap Stats
    Updated 2025-05-13
    with overview as (with base as (with tab1 as (select block_timestamp, tx_hash, origin_from_address as swapper, symbol_in, symbol_out, case
    when token_in=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217') then amount_in
    when token_out=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217') then amount_out
    end as swap_amount, case
    when token_in=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217') then amount_in_usd
    when token_out=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217') then amount_out_usd
    end as swap_amount_usd
    from base.defi.ez_dex_swaps
    where (token_in=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217') or
    token_out=lower('0x45e7eaedb8e3360f850c963c5419a5236e451217')))

    select 'Base' as "Chain", count(distinct tx_hash) as "Swap Count",
    count(distinct swapper) as "Swapper Count", sum(swap_amount) as "Swap Amount (SATOSHI)",
    sum(swap_amount_usd) as "Swap Amount (USD)"
    from tab1
    where block_timestamp::date>='2025-01-01'
    group by "Chain"),

    ethereum as (with tab1 as (select block_timestamp, tx_hash, origin_from_address as swapper, symbol_in, symbol_out, case
    when token_in=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c') then amount_in
    when token_out=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c') then amount_out
    end as swap_amount, case
    when token_in=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c') then amount_in_usd
    when token_out=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c') then amount_out_usd
    end as swap_amount_usd
    from ethereum.defi.ez_dex_swaps
    where (token_in=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c') or
    token_out=lower('0xcbf4d5efa82e32a9187385480a7c74cb062b956c')))

    select 'Ethereum' as "Chain", count(distinct tx_hash) as "Swap Count",
    count(distinct swapper) as "Swapper Count", sum(swap_amount) as "Swap Amount (SATOSHI)",
    sum(swap_amount_usd) as "Swap Amount (USD)"
    from tab1
    where block_timestamp::date>='2025-01-01'
    group by "Chain"),

    Last run: 19 days ago
    Chain
    Swap Count
    Swapper Count
    Swap Amount (SATOSHI)
    Swap Amount (USD)
    1
    Ethereum488713252238349.320135753618807.87
    2
    Solana2804578247522.98159732366490.79
    3
    Base2158456263176.119478881387882.44
    3
    143B
    15s