通过结构等价性检测跨链套利,无需依赖特定协议
If It Walks Like an Arbitrage: Protocol-Agnostic Detection with Decidable Structural Equivalence
- 将交易痕迹转化为抽象语法树,用16条规则归约成唯一标准形式
- 发现46.9万次确认套利,99.2%由固定点直接得出且无误报
- 方法通用可复用,同一程序在以太坊、Arbitrum等链上运行无修改
交易是否执行了套利及路径为何,通常需事后分析其执行轨迹。我们假设此类轨迹存在一种标准形式,使相关问题可化为查询,并通过构建该形式进行验证。每个轨迹被转化为按调用帧嵌套分组的代币转移抽象语法树,再经16条规则的项重写系统归约,无论规则执行顺序如何,归约均终止并精确保留原轨迹中的所有转移。在确定性内核扫描EVM固定轨迹顺序下,每个轨迹有唯一标准形式,由此诱导的资金流结构等价性是可判定的。保全性、终止性、正确性、唯一性和可判定性已在Rocq中机械化证明,无需额外假设。我们实现了完整的套利检测:循环在不动点处显现,可直接从标准形式读取,无需依赖特定协议模式。检测即所评估的查询,结构等价性是第二个查询。该流程仅依赖标准ERC代币和WETH ABI,因此相同二进制文件可在Arbitrum和BSC上无修改运行。我们在两个任意区块范围上评估:22万以太坊区块与广泛使用的MEV检测平台EigenPhi对比,以及1000个共享区块与图神经网络分类器ArbiNet对比。这些是本领域唯一可复用的工具与标签集。报告共确认469,801次套利,与EigenPhi重叠83.5%,与ArbiNet重叠81%,另发现245,497次尝试套利及60,199次EigenPhi未报告的确认检测。99.2%的结果仅由不动点得出,且基于解码转移结果完全正确;对500笔交易的手动验证显示确认结果中无误报。
原文摘要 · Abstract (English)
Whether a transaction performed an arbitrage, and by which route, is a question asked of its execution trace after the fact. We conjecture that such traces admit a normal form on which questions of this kind become queries, and we test it by building one and putting it to work. Each trace becomes an abstract syntax tree of token transfers, grouped by call- frame nesting. A term rewriting system of 16 rules reduces it. Rewriting terminates and carries exactly the transfers of the trace, whichever order the rules fire in. Under a deterministic kernel scanning the EVM-fixed trace order, every trace has a unique normal form, and the structural equivalence this induces on fund flows is decidable. Preservation, termination, soundness, uniqueness and decidability are mechanized in Rocq with zero admitted obligations. We report arbitrage detection in full: cycles emerge at the fixpoint and are read off the normal form with no protocol-specific patterns. Detection is the query we evaluate at scale; structural equivalence is a second query. The pipeline depends only on the standard ERC token and WETH ABIs, so the same binary runs unmodified on Arbitrum and BSC. We evaluate on two arbitrary block ranges, analysed in full with no transaction excluded: 220 000 Ethereum blocks against EigenPhi, a widely used MEV detection platform, and 1 000 shared blocks against ArbiNet, a graph neural network classifier. These are the only tools and label sets in this domain we were able to reuse. We report 469 801 confirmed arbitrages, overlapping 83.5% with EigenPhi and 81% with ArbiNet, together with 245 497 attempted arbitrages and 60 199 confirmed detections EigenPhi does not report. 99.2% follow from the fixpoint alone and are sound over the decoded transfers, and manual validation of 500 transactions finds no false positive among the confirmed.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。