Query editor
-- T3 reserve-continuity and implicit-price verification over the locked T1 set.-- The first trade of each mint has no predecessor and is excluded from transition-- checks. Ledger order was independently verified against RPC in T2.WITHsample AS (SELECT mint, cast(mint_ts AS timestamp) AS mint_tsFROM query_8263142),events AS (SELECTt.mint,t.evt_block_slot,t.evt_tx_index,t.evt_outer_instruction_index,coalesce(t.evt_inner_instruction_index, -1) AS inner_index,t.ix_name,coalesce(t.is_buy, t."isBuy") AS is_buy,cast(coalesce(t.sol_amount, t."solAmount") AS bigint) AS sol_amount,cast(coalesce(t.token_amount, t."tokenAmount") AS bigint) AS token_amount,cast(coalesce(t.virtual_sol_reserves, t."virtualSolReserves") AS bigint) AS virtual_sol,cast(coalesce(t.virtual_token_reserves, t."virtualTokenReserves") AS bigint) AS virtual_tokenFROM pumpdotfun_solana.pump_evt_tradeevent tJOIN sample s ON t.mint = s.mintWHERE t.evt_block_date >= DATE '2025-12-01'AND t.evt_block_date < DATE '2026-06-02'AND t.evt_block_time >= s.mint_tsAND t.evt_block_time < date_add('minute', 60, s.mint_ts)),ordered AS (SELECT *,lag(virtual_sol) OVER (PARTITION BY mintORDER BY evt_block_slot, evt_tx_index, evt_outer_instruction_index, inner_index) AS pre_virtual_sol,lag(virtual_token) OVER (PARTITION BY mintORDER BY evt_block_slot, evt_tx_index, evt_outer_instruction_index, inner_index) AS pre_virtual_tokenFROM events),checks AS (SELECT *,abs(virtual_sol - pre_virtual_sol) AS reserve_sol_delta,abs(virtual_token - pre_virtual_token) AS reserve_token_delta,abs((cast(abs(virtual_sol - pre_virtual_sol) AS double)/ nullif(cast(abs(virtual_token - pre_virtual_token) AS double), 0.0))/ nullif(cast(sol_amount AS double) / nullif(cast(token_amount AS double), 0.0), 0.0)- 1.0) AS price_deviationFROM orderedWHERE pre_virtual_sol IS NOT NULL),per_mint AS (SELECTmint,count(*) + 1 AS trade_events,count(*) AS transitions_checked,count_if(reserve_token_delta <> token_amount) AS token_delta_mismatches,count_if(reserve_sol_delta <> sol_amount) AS sol_delta_mismatches,