Skip to content
Crypto.world

Research

On Identifying Sound Conditions for Frontrunning Resistance

Frontrunning attacks — where a block producer (miner) observes pending transactions in the mempool and reorders, delays, or inserts transactions to the detriment of honest users — have caused large…

On Identifying Sound Conditions for Frontrunning Resistance
arXiv
2609.11535
Published
2026-09-10
Authors
Sebastian Holler, Anna Piscitelli, Jannik Albrecht, Stephan Dübler, Ghassan Karame, Clara Schneidewind

AI summary

Overview

Research area: Blockchain security and formal methods — specifically formal security definitions for smart contracts (cs.CR), with emphasis on transaction-order manipulation (frontrunning / MEV).

Technical level: Advanced. The core contribution is a simulation-based security definition with a symbolic cryptographic model and a synthesis algorithm; the motivating empirical study is accessible to a general blockchain audience.

Scope (one sentence): The paper empirically demonstrates that existing frontrunning detection criteria miss a majority of professionally audited vulnerabilities, then proposes the first formal definition of frontrunning resistance ("Deckstacking Resistance") that is parameterized by honest-user behavior, together with an algorithm for synthesizing sound interaction conditions and a prototype evaluated on real audited contracts.

What This Paper Is About

Frontrunning attacks — where a block producer (miner) observes pending transactions in the mempool and reorders, delays, or inserts transactions to the detriment of honest users — have caused large financial losses, yet the field has had no rigorous definition of what it means for a smart contract to resist them. The authors show that the two dominant criteria are inadequate: the static notion of transaction order dependence (TOD) is too broad (nearly every contract exhibits benign TOD), while the dynamic notion of maximal-extractable value (MEV) is too narrow (it only captures immediate, monetary attacks). The paper's goal is to give a precise, sound definition of frontrunning resistance and to turn that definition into automatically derivable conditions that honest users can follow to provably avoid being frontrun.

Key Contributions

  1. Empirical analysis of frontrunning detection gaps. A manual review of 287 publicly available smart contract audits from 8 auditing firms, covering 393 reported frontrunning vulnerabilities, showing that 55% (217) of them cannot be captured by MEV-based criteria, including 61 (28%) rated critical or major. Static tools Nyx and Sailfish were also run on the executable subset, and their detection performance was measured.

  2. A new formal definition: Deckstacking Resistance (DS Resistance). A simulation-based, real-world/ideal-world definition that treats frontrunning as an attacker's targeted interference with an honest user's interaction with a contract, defined relative to a set of honest user strategies rather than the contract code alone. It is positioned between the overly narrow MEV notion and the overly broad TOD notion.

  3. An algorithm for synthesizing secure interaction conditions. Given a contract's code, the algorithm derives conditions on user strategies that provably prevent a frontrunning attacker from interfering with the user's interaction.

  4. Prototype implementation and real-world evaluation. Applied to audited real-world contracts, the tool found previously undiscovered vulnerabilities in two Ethereum contracts, including in fixes that had been implemented in response to audit reports. Findings were responsibly disclosed to contract owners, audit companies, and the Enterprise Ethereum Alliance, leading to an adjustment of the vulnerability classification in the EEA EthTrust Security Levels Specification (2025).

Main Findings

  • Existing dynamic detection (MEV) misses a majority of audited vulnerabilities. Of 393 audited frontrunning vulnerabilities, 217 (55.2%) could not be captured by MEV: 18.6% were eventual-only, 21.9% were non-monetary-only, and 14.8% were both eventual and non-monetary. No limitations other than the eventual and non-monetary natures hindered MEV's applicability.

  • "Eventual" and "non-monetary" attacks are the two structural blind spots of MEV. MEV requires an attacker's gain to be monetary and measurable, and the attack to be completed within the attacker's scheduling window. Attacks whose payoff materializes after the voting/execution phase (eventual), or whose goal is harm rather than profit (e.g., denial-of-service frontrunning that blocks a candidate proposal by reserving the identifier), fall outside it.

  • Static detection (TOD) is too coarse, and existing heuristics are neither sound nor complete. Contract-level TOD flags essentially all stateful contracts; Sailfish and Nyx narrow this heuristically by requiring a direct monetary effect and by validating consecutive execution of the two interfering calls.

  • State-of-the-art static tools perform poorly in practice. On the 24 contracts in the executable dataset, Sailfish produced execution errors on 67% of contracts and detected only two vulnerabilities in the remainder; Nyx failed in 21% of cases and also detected only two vulnerabilities. Neither detected any eventual-only attacks, and both missed 89% of non-monetary-only frontrunning attacks.

  • Tool "safe" verdicts on fixed contracts were largely accidental. Among the 24 fixed contracts, most cases where a tool correctly labeled a fixed contract "safe" were cases where the same tool had already misclassified the corresponding vulnerable contract as secure (four instances for Sailfish, 16 for Nyx). Only a single contract across both tools was correctly classified at both stages, and only by Sailfish.

  • Resistance is not a property of contract code alone. Because attacks are interferences with how honest users interact, resistance must be stated relative to a set of user strategies. Users who refrain from calling the vulnerable function, or who comply with timing/secret-hiding restrictions, are not subject to the described attacks.

  • The definition is validated on real code. Applying the prototype revealed previously undiscovered vulnerabilities in two Ethereum contracts, including cases where fixes made in response to audit reports remained susceptible to frontrunning.

  • Dataset composition. The 393 vulnerabilities in the full dataset (D_full) break down by auditor as: Trail of Bits 81, ConsenSys Diligence 79, OpenZeppelin 65, Quantstamp 65, Hacken 37, HashEx 35, Runtime Verification 20, Nethermind 11. The executable subsets D_avail and D_fixes each contain 24 vulnerabilities.

Methodology in Plain English

The authors proceed in three stages.

Stage 1 — Measure the gap. They collect publicly available audits from the top eight audit firms (selected via the "rekt.news" leaderboard, filtered to those listed by the Ethereum Foundation), keep those reporting frontrunning issues, and manually tag each reported vulnerability according to whether it is monetary or non-monetary and immediate or eventual. They then check, by hand and by running the tools Nyx and Sailfish, whether existing criteria would flag each one. A second, smaller dataset of contracts with both the vulnerable code and the implemented fix lets them test whether tools correctly change their verdict after a fix.

Stage 2 — Define resistance. They borrow the real-world/ideal-world simulation paradigm from cryptographic protocol analysis. In the real world, an attacker is a block producer with full mempool visibility and full freedom to reorder, delay, insert, or drop transactions. In the ideal world, a "simulator" must produce a block template — a sequence containing its own transactions plus wildcards for honest transactions — without seeing the mempool. A contract is Deckstacking-Resistant, relative to a set of honest user strategies, if for every real-world attacker there exists a single such non-adaptive simulator whose output is indistinguishable from the real execution for all honest user behaviors. The non-adaptivity is enforced by a stability requirement: substituting or removing transactions in the mempool must commute with the simulator's output. The model is built on prior formal blockchain and Solidity calculi and treats cryptography symbolically (attackers learn a user's secret only after it appears in the mempool or on-chain), so transactions and observables may contain symbolic terms. Mempools must be persistent (a submitted transaction stays until included), and block producers must include pending transactions after a delay of k blocks.

Stage 3 — Synthesize conditions and evaluate. From the definition they derive an algorithm that computes, from a contract, conditions on user strategies that guarantee resistance, implement it as a prototype, and run it on the audited contracts in their curated datasets.

Why This Matters

Impact on research. The paper replaces an informal, contested notion (TOD/MEV) with a definition grounded in established simulation-based security, giving the smart contract security community a target property that can be proved and falsified. It also produces the first quantitative evidence that the field's benchmark criteria are misaligned with what professional auditors actually report, which reframes how detection tools should be evaluated. The distinction between immediate/monetary and eventual/non-monetary attacks is a concrete, measured taxonomy rather than a conjecture.

Real-world applications:

  • Smart contract auditing: auditors gain a criterion that covers the non-monetary and eventual vulnerabilities that MEV-based and TOD-based tooling systematically misses, which in this dataset is 55% of reported findings.
  • Developer guidance: synthesized interaction conditions translate directly into documentation and client-side rules (e.g., which calls to make, in what windows, with what identifier hygiene) that make a deployment resistant without changing the contract.
  • Post-audit verification: the finding that two fixes made in response to audits remained vulnerable shows the approach can be used as a regression check after remediation.
  • DeFi protocol design: protocols can be checked for exposure to denial-of-service frontrunning and later-phase manipulation, not just for sandwiching and arbitrage profit.

Industry relevance. The work led to a change in the Enterprise Ethereum Alliance's EthTrust Security Levels Specification vulnerability classification, and the prototype with all code and data is released publicly on GitHub. The motivating loss figure cited — $540.54M over 32 months (Dec 2018–Aug 2021) from arbitrage attacks alone — frames the economic stakes.

Future Directions

  • Completeness and automation of the synthesis. The paper emphasizes soundness of the synthesized interaction conditions; a natural next question is how complete those conditions are, and whether the procedure can be made fully automatic and scalable to large contracts without user-supplied strategy annotations.

  • Extending detection criteria to eventual and non-monetary attacks. Since 18.6% (eventual-only), 21.9% (non-monetary-only), and 14.8% (both) of audited vulnerabilities escape MEV, dynamic monitoring criteria would need a notion of value or harm that spans multiple blocks and non-financial goals.

  • Closing the tooling gap. Sailfish and Nyx both missed 89% of non-monetary-only attacks and never detected eventual-only ones, and Sailfish errored on 67% of contracts; better static or hybrid analyses aligned with the new definition are needed.

  • Generalization beyond Ethereum and beyond single contracts. The authors state the model is modular with respect to the contract execution semantics and could be instantiated for other formal smart contract languages; extending the definition to multi-contract systems, layer-2 orderings, and cross-chain settings remains open. The exact composition and size of the full real-world benchmark and its quantitative results are beyond the excerpt provided.

Target Audience

Smart contract security researchers and formal-methods researchers working on blockchain semantics and security definitions; auditors and tool builders who need to know where MEV- and TOD-based detection breaks down; protocol and DeFi developers who want concrete rules for interacting safely with their own contracts; and standards bodies and reviewers who classify frontrunning vulnerabilities — as the EEA classification change illustrates. Readers should be comfortable with basic blockchain execution (mempools, block production, Solidity) to benefit fully, though the empirical sections are readable without the formalism.

Authors’ abstract

Blockchains enable decentralized applications through smart contracts---interactive programs executed through consensus. However, the inherently asynchronous nature of blockchain transaction ordering introduces a class of vulnerabilities known as frontrunning attacks, which have caused millions of dollars in losses in major blockchains, such as Ethereum. Frontrunning attacks arise because users interact with smart contracts through transactions, which are added to the…

The full abstract on arXiv
Read the original paper