Updated 2025-03-02
    WITH eth_trades AS (
    SELECT
    'Ethereum' AS chain,
    COUNT(DISTINCT tx_hash) AS "Total Trades",
    SUM(amount_in_usd) AS "Total Trades Volume",
    COUNT(DISTINCT origin_from_address) AS "Total Traders"
    FROM ethereum.defi.ez_dex_swaps
    WHERE pool_name IN (
    'USD0-LBTC 3000 60 UNI-V3 LP',
    'WBTC-LBTC 100 1 UNI-V3 LP',
    'eBTC-LBTC 500 10 UNI-V3 LP',
    'LBTC-WETH',
    'LBTC-cbBTC 500 10 UNI-V3 LP',
    'WBTC-LBTC 500 10 UNI-V3 LP'
    )
    ),
    base_trades AS (
    SELECT
    'Base' AS chain,
    COUNT(DISTINCT tx_hash) AS "Total Trades",
    SUM(amount_in_usd) AS "Total Trades Volume",
    COUNT(DISTINCT origin_from_address) AS "Total Traders"
    FROM base.defi.ez_dex_swaps
    WHERE pool_name IN (
    'cbBTC-LBTC 3000 60 UNI-V3 LP',
    'cbBTC-0xeca...11c1 0 1 ASLP',
    'Balancer LBTC/cbBTC',
    'cbBTC-LBTC'
    )
    ),
    bsc_trades AS (
    SELECT
    'BSC' AS chain,
    COUNT(DISTINCT tx_hash) AS "Total Trades",
    SUM(amount_in_usd) AS "Total Trades Volume",
    COUNT(DISTINCT origin_from_address) AS "Total Traders"
    Last run: 2 months ago
    CHAIN
    Total Trades
    Total Trades Volume
    Total Traders
    1
    Ethereum51555652095254.9335492
    2
    Base134990117849644.3318369
    3
    BSC887938069809.1716232
    3
    105B
    9s