Query editor
WITH event_txs AS (SELECT 'e957_hist' source,0xe957a99f5134e7129c30ff87c173b536a38188f2 wallet,tx_hash,dayFROM dune.tusa3112.result_rh_e957_strict_events GROUP BY 1,2,3,4UNION ALLSELECT '5422_hist',0x5422ee0965a121f0197c6885d4a373115f7eb418,tx_hash,dayFROM dune.tusa3112.result_rh_5422_strict_events GROUP BY 1,2,3,4UNION ALLSELECT 'public6505_oos',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_public6505_oos_current_events GROUP BY 1,2,3,4UNION ALLSELECT '6505_leaders',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_6505_jul12_leaders_events GROUP BY 1,2,3,4UNION ALLSELECT 'tier34_hist',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_tier34_strict_events GROUP BY 1,2,3,4UNION ALLSELECT 'gmgn_oos',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_gmgn_survivors_oos_events GROUP BY 1,2,3,4UNION ALLSELECT 'wholechain_top5',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_wholechain_top5_events GROUP BY 1,2,3,4UNION ALLSELECT 'gmgn4_component',wallet,tx_hash,dayFROM dune.tusa3112.result_rh_gmgn_4wallet_component_events GROUP BY 1,2,3,4),native_out AS (SELECT e.source,e.wallet,e.tx_hash,e.day,SUM(IF(LOWER(tr.token_standard)='native' AND tr."from"=e.wallet,COALESCE(tr.amount,0e0),0e0)) native_transfer_out_ethFROM event_txs eLEFT JOIN tokens.transfers tr ON tr.blockchain='robinhood'AND tr.block_date>=DATE '2026-06-01' AND tr.block_date<=CURRENT_DATEAND tr.block_date=e.day AND tr.tx_hash=e.tx_hashGROUP BY 1,2,3,4),audit AS (SELECT e.source,e.wallet,e.tx_hash,e.day,t.block_time,t.success,t."to" target,CAST(t.value AS DOUBLE)/1e18 tx_value_eth,COALESCE(n.native_transfer_out_eth,0e0) native_transfer_out_eth,IF(t.success,GREATEST(CAST(t.value AS DOUBLE)/1e18-COALESCE(n.native_transfer_out_eth,0e0),0e0),0e0) missing_native_out_ethFROM event_txs eJOIN robinhood.transactions t ON t.block_date=e.day AND t.hash=e.tx_hashLEFT JOIN native_out n ON n.source=e.source AND n.wallet=e.walletAND n.tx_hash=e.tx_hash AND n.day=e.day)SELECT source,COUNT(*) attempts,COUNT_IF(NOT success) reverts,SUM(tx_value_eth) tx_value_eth,SUM(native_transfer_out_eth) indexed_native_out_eth,SUM(missing_native_out_eth) missing_native_out_eth,COUNT_IF(missing_native_out_eth>1e-12) affected_txs,MAX(missing_native_out_eth) max_missing_tx_eth,MAX_BY(CONCAT('0x',TO_HEX(tx_hash)),missing_native_out_eth) example_txFROM auditGROUP BY 1ORDER BY missing_native_out_eth DESC