datavortexTop Swappers
    Updated 2025-04-01
    WITH decoded_logs AS (
    SELECT
    l.tx_hash AS transaction_hash,
    '0x' || SUBSTR(l.topics[2], 27) AS recipient,
    l.event_index,
    ROW_NUMBER() OVER (
    PARTITION BY l.tx_hash
    ORDER BY l.event_index ASC
    ) AS row_num,
    l.contract_address AS pool_address,
    CAST(ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 3, 64)) AS DECIMAL(38,0)) AS amount0In,
    CAST(ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 67, 64)) AS DECIMAL(38,0)) AS amount1In,
    CAST(ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 131, 64)) AS DECIMAL(38,0)) AS amount0Out,
    CAST(ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 195, 64)) AS DECIMAL(38,0)) AS amount1Out,
    t.block_timestamp
    FROM boba.core.fact_event_logs l
    JOIN boba.core.fact_transactions t ON l.tx_hash = t.tx_hash
    WHERE l.contract_address IN (
    '0xaf3da220bc03bdbf9b0280d6e2813ea0ffe03f69',
    '0x78c6db2b6073e762f89a23eb3da71d2feeb18315',
    '0x4f059f8d45230cd5b37544e87eebba033a5f1b17',
    '0x6398a59ca706c11d02de1ea3d921742771bcd06f',
    '0xce4956c398ba118f4eacabca1b32ae97bd31df2a',
    '0x247442181b8baa03b3c7dc0d8e971bd4686db27c',
    '0x48643395833882729032170078bf7791a0999f8c',
    '0x3b444d1dbf68d1cfc64a8158affb6a24a6bdf038',
    '0x2e014fe08247a080f2ed6d230b2594911f9f9a69',
    '0x0ec9d6d21358221cccfc933530a8026038cedc12'
    )
    AND l.topics[0] = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822'
    ),
    pool_metadata AS (
    SELECT
    CONTRACT_ADDRESS AS pool_address,
    SYMBOL_1,
    SYMBOL_2,
    Last run: about 1 month ago
    RECIPIENT
    TOTAL_VOLUME_ACROSS_POOLS
    POOLS_SWAPPED
    1
    0x9f034dddd9c6464e827f648110dda4b6a3a428446391263.83475095BOBA/WETH, USDC/WETH, WBTC/WETH
    2
    0x8d611a80910bd289896e793d43d0ad0a34c233ea1070820.40278763BOBA/WETH, USDC/WETH, WBTC/WETH
    3
    0xb2bb815784685b3c5b996e002d442e1113c56ab01063853.66969712BOBA/WETH, USDC/WETH, WBTC/WETH
    4
    0x1e70222c0bead73864a9c4ddde682056dd8f9543730508.0139359USDC/WETH
    5
    0x000000000003b57982426680c8eeeaf1920ffe21726774.735041367BOBA/WETH, USDC/BOBA, USDC/WETH, USDT/USDC, WBTC/WETH
    6
    0x1b02da8cb0d097eb8d57a175b88c7d8b47997506679407.739039292BOBA/WETH, SUSHI/WETH, USDC/WETH, WBTC/WETH
    7
    0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6363987.903770534BOBA/WETH, SUSHI/WETH, USDC/WETH, WBTC/WETH
    8
    0x4f059f8d45230cd5b37544e87eebba033a5f1b17330638.438500452BOBA/WETH, SUSHI/WETH, USDC/BOBA, USDC/WETH, USDT/USDC, WBTC/WETH
    9
    0xb28cfe82641446a4d80ca3610e1e062c9fdc9d77281567.397641433USDC/BOBA, USDC/WETH
    10
    0x842fab064cdc9dc0715cd4bdca5756f7d347efee260897.767543166BOBA/WETH, USDC/WETH, WBTC/WETH
    10
    1KB
    41s