Query editor
-- Arc launch tracker · 08 · DEX volume (USDC-leg notional)---- One row per {{granularity}} × venue: swap count, traders, and volume-- measured on the USDC side of each swap.---- Method-- * Uniswap v4: Swap on the PoolManager singleton. Pool currencies come from-- Initialize. Split into no-hook pools and hooked pools (mostly launchpads).-- * V3-style: UniV3 / Slipstream-style Swap events from pools announced by a-- standard PoolCreated event (Uniswap v3 and forks, CL factories).-- * V2-style: Swap events from pairs announced by a standard PairCreated.-- * Spoof guard for V2/V3: anyone can emit PoolCreated / PairCreated. On launch-- day, seven self-registered "pairs" (factory == pool) emitted fake Swaps-- worth ~7.6e16 USDC. A pool only counts if the announcing factory actually-- deployed it (arc.creation_traces) and that factory created at least 10-- pools. Uniswap v4 needs no guard: the PoolManager emits its own events.-- * USDC legs: native USDC (v4 currency 0x0, 18dp), the USDC ERC-20 interface-- 0x3600…0000 (6dp) and WUSDC 0xe6b0…6044 (wrapped native, 18dp).-- usdc_volume = |USDC delta| per swap. Swaps with no USDC leg count in swaps-- but add no volume (compare swaps with usdc_leg_swaps).---- Caveats-- * Multi-hop routes through USDC count once per hop, as in dex.trades.-- * Hooks can take over pricing (return deltas). Hooked-pool volume is a-- lower bound when the PoolManager Swap event under-reports the trade.-- * traders = distinct transaction signers. Bundlers and relayers undercount.-- * Launch-day volume includes bots and wash trading. Pair with 09.-- * Not covered: pools whose factories emit non-standard events. At launch-- that meant 2 Aerodrome-style v2 pools.WITH usdc_legs (token, decimals) AS (VALUES(0x0000000000000000000000000000000000000000, 18), -- native USDC (v4 native currency)(0x3600000000000000000000000000000000000000, 6), -- USDC ERC-20 interface(0xe6b0a06c87a1422f966e8a31b5d1f3b3fa348c5a, 18) -- WUSDC),v4_pools AS (SELECTtopic1 AS pool_id,varbinary_substring(topic2, 13, 20) AS currency0,varbinary_substring(topic3, 13, 20) AS currency1,varbinary_substring(data, 77, 20) AS hooksFROM arc.logsWHERE contract_address = 0x8366a39cc670b4001a1121b8f6a443a643e40951 -- Uniswap v4 PoolManagerAND topic0 = 0xdd466e674ea557f56295e2d0218a125ea4b4f0f6f3307b95f85e6110838d6438 -- Initialize),announced_pools AS (SELECTIF(topic0 = 0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9, 'v2', 'v3') AS pool_type,contract_address AS factory,CASEWHEN topic0 = 0x783cca1c0412dd0d695e784568c96da2e9c22ff989357a2e8b1d9b2b4e6b7118THEN varbinary_substring(data, 45, 20) -- PoolCreated(token0, token1, fee, tickSpacing, pool)ELSE varbinary_substring(data, 13, 20) -- PoolCreated(token0, token1, tickSpacing, pool) / PairCreated(token0, token1, pair, n)END AS pool,varbinary_substring(topic1, 13, 20) AS token0,varbinary_substring(topic2, 13, 20) AS token1FROM arc.logs