Query editor
-- index: daily holder inflow in USD (3 percent census fee on hooked pool volume)-- Recon correction (docs/notes/robinhood-schema.md section 3): dex.trades attributes every-- Uniswap v4 pool's rows to the shared PoolManager address (0x8366a39CC670B4001A1121B8F6A443A643e40951),-- never to a per-pool address, so filtering dex.trades on the hooked pool's identity does not work.-- This query instead reads the decoded uniswap_v4_robinhood.poolmanager_evt_swap table, keyed by the-- hooked pool's poolId, and prices the native ETH leg (currency0) against prices.usd WETH, since native-- ETH and WETH share the same USD price. The earlier "not spot-checked" caveat is now resolved:-- docs/notes/robinhood-schema.md section 11 confirms prices.usd carries exactly two robinhood-chain-- tokens in the trailing 7d window, WETH and USDG, so the WETH slice this query joins on does exist.-- No ethereum-chain fallback is needed.with v4_swaps as (selectevt_block_time as block_time,abs(cast(amount0 as double)) / 1e18 as eth_amtfrom uniswap_v4_robinhood.poolmanager_evt_swapwhere id = 0x00dd2df2f17d431cf3a0938f06c9cf9abc5e9643b6cc466ca3f71f3af246edf3and evt_block_time > now() - interval '90' day),weth_px as (select date_trunc('hour', minute) as hour, avg(price) as weth_usdfrom prices.usdwhere blockchain = 'robinhood'and symbol = 'WETH'and minute > now() - interval '90' daygroup by 1)selectdate_trunc('day', s.block_time) as day,sum(s.eth_amt * p.weth_usd) as hooked_volume_usd,0.03 * sum(s.eth_amt * p.weth_usd) as holder_inflow_usdfrom v4_swaps sjoin weth_px p on date_trunc('hour', s.block_time) = p.hourgroup by 1order by 1