Updated 2025-03-02
    WITH eth_trades AS (
    SELECT
    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
    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
    COUNT(DISTINCT tx_hash) AS total_trades,
    SUM(amount_in_usd) AS total_trades_volume,
    COUNT(DISTINCT origin_from_address) AS total_traders
    FROM bsc.defi.ez_dex_swaps
    WHERE pool_name IN (
    'BTCB-LBTC 500 10 PCS-V3 LP',
    Last run: 2 months ago
    TOTAL_TRADES
    TOTAL_TRADES_VOLUME
    TOTAL_TRADERS
    1
    275338778014708.4370093
    1
    29B
    12s