Query editor
-- T4 deterministic observed-flow validation. Each fee-program binary interval-- gets a bounded slot slice (at most 108k slots, or its full life if shorter).-- The slice is deliberately broader than the study's canonical-pool universe:-- all PumpSwap flows must obey the same component rounding rules.WITHfee_slices(version_id, valid_from_slot, valid_to_slot,sample_from_slot, sample_to_slot, start_date, end_date) AS (VALUES('upgrade_slot_363415192', 363415192, 392381152, 383900000, 384008000, DATE '2025-12-01', DATE '2025-12-02'),('upgrade_slot_392381153', 392381153, 392611031, 392381153, 392489153, DATE '2026-01-09', DATE '2026-01-10'),('upgrade_slot_392611032', 392611032, 396946627, 392611032, 392719032, DATE '2026-01-10', DATE '2026-01-11'),('upgrade_slot_396946628', 396946628, 408577983, 396946628, 397054628, DATE '2026-01-30', DATE '2026-01-31'),('upgrade_slot_408577984', 408577984, 415858012, 408577984, 408685984, DATE '2026-03-24', DATE '2026-03-25'),('upgrade_slot_415858013', 415858013, 416459395, 415858013, 415966013, DATE '2026-04-26', DATE '2026-04-27'),('upgrade_slot_416459396', 416459396, 416471431, 416459396, 416471431, DATE '2026-04-29', DATE '2026-04-29'),('upgrade_slot_416471432', 416471432, 419621214, 416471432, 416579432, DATE '2026-04-29', DATE '2026-04-30'),('upgrade_slot_419621215', 419621215, 420801947, 419621215, 419729215, DATE '2026-05-14', DATE '2026-05-15'),('upgrade_slot_420801948', 420801948, 9223372036854775807, 420801948, 420909948, DATE '2026-05-19', DATE '2026-05-20')),bonding_raw AS (SELECTs.version_id,'bonding' AS phase,t.ix_name AS direction,cast(coalesce(t.sol_amount, t."solAmount") AS bigint) AS gross_amount,cast(coalesce(t.fee, 0) AS bigint) AS protocol_fee,cast(coalesce(t.fee_basis_points, 0) AS bigint) AS protocol_bps,cast(coalesce(t.creator_fee, 0) AS bigint) AS creator_fee,cast(coalesce(t.creator_fee_basis_points, 0) AS bigint) AS creator_bps,cast(0 AS bigint) AS lp_fee,cast(0 AS bigint) AS lp_bpsFROM pumpdotfun_solana.pump_evt_tradeevent tJOIN fee_slices sON t.evt_block_slot BETWEEN s.sample_from_slot AND s.sample_to_slotAND t.evt_block_date BETWEEN s.start_date AND s.end_dateWHERE t.evt_block_date >= DATE '2025-12-01'AND t.evt_block_date < DATE '2026-06-01'AND coalesce(t.mayhem_mode, false) = false),amm_buy_raw AS (SELECTs.version_id,'amm' AS phase,'buy' AS direction,cast(t.quote_amount_in AS bigint) AS gross_amount,cast(coalesce(t.protocol_fee, 0) AS bigint) AS protocol_fee,cast(coalesce(t.protocol_fee_basis_points, 0) AS bigint) AS protocol_bps,cast(coalesce(t.coin_creator_fee, 0) AS bigint) AS creator_fee,cast(coalesce(t.coin_creator_fee_basis_points, 0) AS bigint) AS creator_bps,cast(coalesce(t.lp_fee, 0) AS bigint) AS lp_fee,cast(coalesce(t.lp_fee_basis_points, 0) AS bigint) AS lp_bpsFROM pumpdotfun_solana.pump_amm_evt_buyevent tJOIN fee_slices sON t.evt_block_slot BETWEEN s.sample_from_slot AND s.sample_to_slotAND t.evt_block_date BETWEEN s.start_date AND s.end_dateWHERE t.evt_block_date >= DATE '2025-12-01'AND t.evt_block_date < DATE '2026-06-01'),