Search arXivSearch

arXiv · 2608.20377

If It Walks Like an Arbitrage: Protocol-Agnostic Detection with Decidable Structural Equivalence

Abstract

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Adam Khayam, Hamid Kolli, Mohamed Iguernlala, Çagdas Bozman. 2026-08-25. If It Walks Like an Arbitrage: Protocol-Agnostic Detection with Decidable Structural Equivalence. https://arxiv.org/abs/2608.20377

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

CFOs Meet LLMs

Business sentiment is a closely watched economic signal, but measuring it is slow and costly: surveys typically reach only a few hundred firms, arrive periodically, and take time to compile. We show that large language models hold the potential to address these shortcomings. We prompt an LLM to role-play as the CFO of a specific company on a specific date, for every public-company CFO who responded to the Duke--Federal Reserve CFO Survey between 2002 and 2025, and answer a question about economy-wide optimism. The LLM-generated optimism score predicts the individual CFO's actual answer, even in specifications that include firm and year-quarter fixed effects as well as a control variable measuring the human CFO's lagged response. Accuracy increases with the information provided to the LLM, and the relation persists under quarterly aggregation. We find the same patterns hold for two other questions measuring CFO expectations: the respondent's optimism about their own firm and their expectation of own-firm revenues. With appropriate conditioning, LLMs may in the future be able to serve as digital twins of executives, offering scalable, high-frequency expectations data for financial research and policy.

q-fin.CP

The Physical Crash Frontier: What Finite Option Quotes Can and Cannot Reveal

Physical crash probabilities recovered from option prices depend on a pricing kernel and on a risk-neutral distribution that finitely many bid and ask quotes do not identify. For a power utility investor, we characterize the pairs of physical crash probability and expected loss below the crash threshold that the quotes admit; the boundary of this set is the physical crash frontier. Both coordinates are ratios of moments, yet when the index is bounded above the set is convex, and second-order cone programs compute it exactly at the calibrated risk aversion of two. In a decade of weekly S&P 500 cross sections, the quotes beyond the two puts nearest a 10 percent decline shrink the range of admissible crash probabilities by about 80 percent, yet its upper end remains two to three times its lower end. That lower end exists only because the index is bounded. Otherwise, for any investor more risk averse than the log investor, a vanishing probability far in the right tail inflates the denominator and drives the crash probability to zero while every quote stays inside its spread. A positive floor is therefore a joint statement about prices and a tail restriction; anything tighter than the frontier is an assumption.

q-fin.CP

OrderFusion+: Probabilistic Buy--Sell Price Trajectory Forecasting in Intraday Electricity Markets

Intraday electricity markets enable participants to adjust energy positions close to delivery, with price forecasts necessary to support trading and the scheduling of flexible electricity resources as well as increasingly responsive consumers. Forecasting model specifications have progressed from using macro-features, such as renewable generation and load, to the micro-features of continuous orderbooks. A recent advanced deep learning model, OrderFusion, explicitly models micro-level buy-sell orderbook interactions. However, despite its superior comparative forecasting performance, it considers only one delivery product at a time, ignoring neighboring-product information. Moreover, when forecasting aggregated price indices such as the liquid German ID3, ID2, and ID1 products, it omits the information contained in price trajectories. In contrast, pretrained time-series foundation models have shown success in financial, renewable-energy, and day-ahead electricity price forecasting. However, their performance on intraday orderbook data remains an open research question of considerable practical importance. In this paper, we propose OrderFusion+, an open-source deep learning model that combines historical orders from the target and neighboring delivery products to forecast probabilistic buy-sell price trajectories. We benchmark OrderFusion+ against forecasting baselines and pretrained foundation models, and investigate dynamic market conditions through the designed dynamic masking mechanism, revealing insights into market efficiency. The implementation and forecasts can be found at: https://runyao-yu.com/OrderFusion/

q-fin.CP