Query editor
-- v4meta: roster of Uniswap v4 pools on the Robinhood chain that have a nonzero hook attached,-- ranked by trailing 7d volume that actually stayed on the hooked pool.---- SCHEMA SMOKE TEST (2026-08-03, run before this query was saved):-- uniswap_v4_robinhood.poolmanager_evt_initialize columns:-- contract_address, evt_tx_hash, evt_tx_from, evt_tx_to, evt_tx_index, evt_index,-- evt_block_time, evt_block_number, evt_block_date, currency0, currency1, fee, hooks,-- id, sqrtPriceX96, tick, tickSpacing-- uniswap_v4_robinhood.poolmanager_evt_swap columns:-- contract_address, evt_tx_hash, evt_tx_from, evt_tx_to, evt_tx_index, evt_index,-- evt_block_time, evt_block_number, evt_block_date, amount0, amount1, fee, id,-- liquidity, sender, sqrtPriceX96, tick-- The assumed columns (id on both tables, amount1 and evt_block_time on swap) all exist.-- The byte-offset raw-log fallback described in earlier drafts is not needed.---- THREE THINGS THE RECON GOT WRONG, corrected here (see docs/dashboards.md, dashboard 8):-- 1. Recon assumed one hooked pool existed (INDEX/ETH). Reality on 2026-08-03: 97,020 hooked-- pools out of 246,379 total v4 pools, first hooked deploy 2026-06-19. This chain launches-- tokens through hooked v4 pools by default, so an unranked roster is 97k useless rows.-- This query therefore ranks by trailing 7d hooked volume and cuts at 100.-- 2. Recon assumed prices.usd could price roster tokens. prices.usd carries exactly TWO-- Robinhood-chain tokens in the trailing 7d window: WETH and USDG. Per-token pricing off-- prices.usd would collapse every downstream panel to two rows.-- Fix used across v4meta_a/b/c/e: join each decoded Swap event to its own dex.trades row on-- (tx_hash, evt_index) and read Dune's amount_usd. Measured match rate 328,084 of 336,289-- hooked swaps over 2d (97.6 percent), of which 74.8 percent carry a nonnull amount_usd.-- This keeps exact per-pool attribution (recon section 3 is right that dex.trades cannot-- distinguish v4 pools by project_contract_address, since every v4 row carries the-- PoolManager singleton) while borrowing dex.trades' USD pricing, which covers 21.4M of-- 22.1M Robinhood rows over 7d.-- 3. Recon assumed the pool init fee is always a real fee rate. 74,034 of 97,020 hooked pools-- carry fee = 8388608 = 0x800000, the Uniswap v4 dynamic-fee flag, not a rate. Treating it-- as ppm would report an 838 percent fee. fee_mode below separates the two cases; the-- per-swap fee actually charged is read from the Swap event instead (see v4meta_e).---- currency1 is treated as the token and currency0 as the quote asset. This is a v4 protocol-- invariant plus a chain fact: PoolKey requires currency0 < currency1 by address, and WETH-- (0x0bd7...) sorts low enough to be currency0 in 60,408 of the 97,020 hooked pools. Measured-- confirmation: in 328,064 of 328,084 matched swaps (99.99 percent) currency1 is the token-- dex.trades records as bought or sold.with roster as (selectevt_block_time as created_at,id as pool_id,currency0,currency1,hooks as hook_address,fee as fee_ppmfrom uniswap_v4_robinhood.poolmanager_evt_initializewhere hooks <> 0x0000000000000000000000000000000000000000),hooked_trades as (selectr.pool_id,sum(t.amount_usd) as hooked_usd_7d,count(*) as swaps_7d,approx_percentile(cast(s.fee as double), 0.5) as median_swap_fee_ppmfrom uniswap_v4_robinhood.poolmanager_evt_swap sjoin roster ron s.id = r.pool_id