Query editor
-- Stonks Exchange — every trade in a launch pool, both generations, priced in USD. Base view for-- the volume charts.---- Volume deliberately does NOT come from the trade routers' own Buy/Sell events: those fire only-- for trades routed through our UI, and miss anything that reaches the pool from DexScreener, an-- aggregator, or a bot. The pool is the honest denominator.---- Decoded from the pools' own Swap logs rather than read from dex.trades. Uniswap v3 and Slipstream-- emit the same event —-- Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1,-- uint160 sqrtPriceX96, uint128 liquidity, int24 tick)-- — so one decoder covers V1 and V2. dex.trades was complete on the Uniswap pools, but on the-- Slipstream ones it dropped whole launch hours: 16 of 16 swaps missing on one pool, 94 of 204 on-- another, seven hours after the trades happened — and the launch hour is when a launchpad trades-- most. It also lags the chain by an hour or more; base.logs does not.---- The USD figure is built from the quote leg against prices.minute, never from-- dex.trades.amount_usd, which is null for every equity- and STONKEX-quoted pool.WITH launches AS (-- Reads the launches QUERY rather than a materialized copy of it, so this view is live: any-- viewer refreshing the dashboard gets current data instead of the owner's last snapshot. The-- matview that used to sit here froze silently for 35 hours when the team was renamed and again-- when credits ran out — stale data with no error is worse than slow data.SELECT version, venue, token, quote, pool, quote_decimals, quote_symbol, token_symbol,quote_category, pre_cutoverFROM query_8623428),swaps AS (SELECTs.block_time,s.block_date,s.tx_hash,s.index AS evt_index,s.tx_from AS trader,l.version,l.venue,l.token,l.token_symbol,l.quote,l.quote_symbol,l.quote_category,l.quote_decimals,l.pool,l.pre_cutover,-- The pool's view: positive = the pool received that token, negative = it paid it out.-- token0 is the lower address, so which amount is the quote depends on the coin's address.CASE WHEN l.quote < l.tokenTHEN bytearray_to_int256(bytearray_substring(s.data, 1, 32))ELSE bytearray_to_int256(bytearray_substring(s.data, 33, 32)) END AS quote_delta,CASE WHEN l.quote < l.tokenTHEN bytearray_to_int256(bytearray_substring(s.data, 33, 32))ELSE bytearray_to_int256(bytearray_substring(s.data, 1, 32)) END AS token_deltaFROM base.logs sJOIN launches l ON l.pool = s.contract_addressWHERE s.block_date >= DATE '2026-08-17'AND s.topic0 = 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67),trades AS (