Query editor
-- Varo launchpad 0x851153fe84239C2dC55fa191aC2f099e20a6d0b8 (Robinhood Chain)-- UniV3 Swap(address,address,int256 amount0,int256 amount1,uint160,uint128,int24)-- amount > 0 => flowed INTO the pool (this is the side that pays the fee)-- amount < 0 => flowed OUT of the poolWITH launches AS (SELECTbytearray_substring(data, 45, 20) AS pool,bytearray_substring(topic2, 13, 20) AS token, -- launched token, always 18 decbytearray_substring(data, 77, 20) AS quote_asset,CAST(bytearray_to_uint256(bytearray_substring(data, 318, 3)) AS double) / 1e6 AS fee_rateFROM robinhood.logsWHERE contract_address = 0x851153fe84239C2dC55fa191aC2f099e20a6d0b8AND topic0 = 0x422c4b44369e863c705352bbe29bc8e926fe8c9edb738712e00c57025adcb675),pools AS (SELECT l.pool, l.quote_asset, l.fee_rate,COALESCE(e.symbol, CONCAT('0x', TO_HEX(l.quote_asset))) AS quote_symbol,COALESCE(e.decimals, 18) AS quote_decimals,l.token < l.quote_asset AS token_is_token0FROM launches lLEFT JOIN tokens.erc20 eON e.blockchain = 'robinhood' AND e.contract_address = l.quote_asset),swaps AS (SELECTl.block_time, p.quote_symbol, p.quote_decimals, p.quote_asset, p.fee_rate,IF(p.token_is_token0,bytearray_to_int256(bytearray_substring(l.data, 33, 32)),bytearray_to_int256(bytearray_substring(l.data, 1, 32))) AS quote_delta,IF(p.token_is_token0,bytearray_to_int256(bytearray_substring(l.data, 1, 32)),bytearray_to_int256(bytearray_substring(l.data, 33, 32))) AS token_deltaFROM robinhood.logs lJOIN pools p ON l.contract_address = p.poolWHERE l.topic0 = 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67AND l.block_date >= DATE '2026-07-24'),priced AS (SELECT s.*,ABS(CAST(s.quote_delta AS double)) / POWER(10, s.quote_decimals) AS vol_quote,pr.price AS pxFROM swaps sLEFT JOIN prices.hour prON pr.blockchain = 'robinhood'AND pr.contract_address = s.quote_assetAND pr.timestamp = DATE_TRUNC('hour', s.block_time))SELECTIF(GROUPING(quote_symbol) = 1, 'ALL QUOTE ASSETS', quote_symbol) AS quote_asset,COUNT(*) AS swaps,IF(GROUPING(quote_symbol) = 1, NULL, SUM(vol_quote)) AS volume_quote_units,SUM(vol_quote * px) AS volume_usd,SUM(vol_quote * fee_rate * px) AS total_pool_fees_usd,-- fee taken in the QUOTE token (i.e. from buys)IF(GROUPING(quote_symbol) = 1, NULL,