Query editor
WITH cfg AS (SELECTTIMESTAMP '2026-07-01' AS start_time,DATE '2026-07-01' AS start_date,0x92a7dafef46b41a066fa5a075d18818ad7eb1d51 AS beneficiary,0x34ee90ca00000000000000000000000092a7dafef46b41a066fa5a075d18818ad7eb1d51 AS needle),-- Robinhood Chain 当前及上一个 0x Settlersettlers(settler) AS (VALUES(0x39b38686a19836ac10162c490e4558e120cbbe5f),(0xaa61254627b7392b0bc922097b10eb0587db2be7)),native_token AS (SELECTtoken_address,token_symbolFROM dune.blockchainsWHERE name = 'robinhood'),-- 在成功的 Settler 调用中定位 POSITIVE_SLIPPAGE actionhit_positions AS (SELECTr.block_time,r.block_number,r.tx_hash,r.trace_address,r."from" AS call_from,r."to" AS settler,r.input,varbinary_substring(r.input, 1, 4) AS method_id,varbinary_position(r.input, c.needle) AS action_posFROM robinhood.traces rJOIN settlers sON r."to" = s.settlerCROSS JOIN cfg cWHERE r.block_time >= c.start_timeAND r.successAND r.tx_successAND varbinary_position(r.input, c.needle) > 0),-- 解码 Settler 入口参数和 POSITIVE_SLIPPAGE 参数hits AS (SELECT*,-- execute/executeMetaTxn/executeWithPermit 的 buyTokenvarbinary_substring(input, 49, 20)AS buy_token_raw,-- POSITIVE_SLIPPAGE(recipient, token, expectedAmount, maxBps)varbinary_substring(input, action_pos + 48, 20)AS surplus_token_raw,varbinary_to_uint256(varbinary_substring(input, action_pos + 68, 32)