Sandwich Attacks on Ethereum Rollups
- Sandwich attacks on Ethereum rollups are MEV strategies that exploit cross-layer ordering to extract profit from victim trades.
- Formal models quantify attack profitability by optimizing trade sizes, evaluating slippage effects, and assessing batch execution probabilities.
- Empirical analyses reveal low success rates and negative median net PnL, driving recommendations for private mempools and randomized sequencing.
A sandwich attack is a maximal extractable value (MEV) strategy whereby an adversary observes a victim’s pending swap and orchestrates two trades: a frontrun to buy into the victim’s intended asset before their transaction, and a backrun to sell after, extracting profit by manipulating the local price. While endemic on Ethereum Layer-1 (L1) owing to its public mempool, Ethereum rollups—Layer-2 (L2) solutions such as Arbitrum, Optimism, Base, Unichain, and zkSync—introduce sequencing architectures that fundamentally alter the feasibility and profitability of sandwiching. Recent research rigorously models these attacks, analyzes transaction-level data, and clarifies both the empirical rarity and the cross-layer nuances of sandwiching in the rollup context (Torres et al., 2024, Gogol et al., 27 Jan 2026).
1. Classical Sandwich Attacks and the Role of the Mempool
On Ethereum L1, the public mempool discloses all pending transactions, enabling adversaries to monitor for victim swaps and submit sandwich legs to sandwich the victim’s trade in the same block. The canonical workflow is:
- The attacker submits (frontrun: buy) before the victim’s swap ,
- The attacker submits (backrun: sell) immediately after .
The profit per sandwich is given by
where is the trade quantity and is total gas expended. Public mempool visibility and atomic builder markets make this exploitation deterministic and highly competitive.
In contrast, rollups employ private sequencer mempools: unless a user controls the sequencer, pending swaps are invisible—rendering public sandwich strategies infeasible. As a result, empirical analysis over a multi-year window detects zero standard on-chain sandwich attacks on Arbitrum, Optimism, and zkSync (Torres et al., 2024).
2. Formal Modeling of Sandwich Profitability in Rollups
Recent formalization extends the sandwich paradigm to automated market makers (AMMs) on rollups, considering both constant product (CPMM) and concentrated liquidity (CLMM) models (Gogol et al., 27 Jan 2026). The attacker operates three trades: front-run () of size , victim trade () of size , and back-run () of size .
In the small-trade regime (, with being pool liquidity), the incremental profit before gas is: where is the swap fee. The optimal attack size without slippage constraint is
and the net expected profit accounts for both slippage and gas costs.
For CLMMs, optimization takes into account tick boundaries. Crossing into lower liquidity ticks can amplify profits if is sufficient to push the price across a tick, but is limited by slippage tolerance.
3. Execution Feasibility Under Rollup Sequencer Architectures
Sandwiches in private-mempool rollups are constrained by sequencers’ batching and ordering policies, and the lack of atomic inclusion (i.e., the inability to guarantee that , , land together).
Three principal probabilistic factors determine success:
- Same-batch probability: For batch window and attack submission separation , probability .
- Priority ordering: Under FCFS, background arrivals modeled as Poisson process () yield ; under tip-priority, the probability is as an expected value over background tip distribution.
- Arrival-time noise: Modeled as Gaussian variance , with .
The aggregate co-inclusion probability is
Empirical measurements under typical rollup parameters (–$800$ms) yield ; only 5–20% of attempted sandwiches are expected to land as valid same-batch, correctly ordered sandwiches (Gogol et al., 27 Jan 2026).
4. Cross-Layer Sandwiching: Attack Strategies and Empirical Outcomes
Although direct same-chain sandwiching is stymied, cross-layer communication reintroduces sandwich vectors (Torres et al., 2024). Researchers systematically catalog three attack strategies exploiting the public visibility of L2-call transactions on the Ethereum L1 mempool:
| Strategy | Key Steps | Execution Site(s) |
|---|---|---|
| S₁: Classical Cross-Layer | Frontrun/backrun on L1 to sandwich L2 swap transaction (visible on L1) | L1, with effects on L2 |
| S₂: Hybrid | Frontrun on L1, backrun directly to L2 sequencer ahead of victim batch | L1 (frontrun), L2 (backrun) |
| S₃: Speculative | React to finalized L1 blocks, insert both legs on L2 before relayed victim | L2 only |
Simulation of these strategies over historical L1→L2 bridge traffic (notably, Hop Protocol) identifies approximately 170,000 potential targets. Total simulated extractable profit is approximately 2 million USD over 32 months: Arbitrum (1.2 million per strategy), Optimism (0.75 million per strategy) (Torres et al., 2024). These scenarios assume attacker capital in the $10k$–“infinite” range; even modest budgets suffice for hundreds of profitable opportunities. The cross-layer delay (mean 13 minutes on Arbitrum) provides attackers with a generous window for S₃-type insertions.
5. Empirical Prevalence, Profitability, and False Positive Analysis
Automated sandwich detection on rollups suffers from high false-positive rates. Naïve heuristics overestimate sandwiching due to shared routers and fragmented actor identity. Enhanced methods group transactions by (chain, block, pool), then filter based on actor identities and swap directions.
Analysis across Arbitrum, Base, Optimism, Unichain, and zkSync (2025 data) yields:
- Only 5–25% of candidate sandwich patterns meet the “strong signature” ().
- Front–back run correlation: as low as 0.08 (Optimism), maximum 0.63 (Arbitrum); victim–attacker leg correlation everywhere.
- Median net PnL per sandwich is negative across all chains:
| Chain | Median Net PnL (USD) | IQR Net PnL |
|---|---|---|
| Arbitrum | –$0.80 | [–$1.96, +$0.40] | |
| Base | –$2.23 | [–$4.06, +$0.91] | |
| Optimism | –$0.46 | [–$1.47, +$0.21] | |
| Unichain | –$0.65 | [–$3.30, +$0.27] | |
| ZKsync | –$0.44 | [–$0.66, +$0.26] |
Prevalence is extremely low: 95% of supposed sandwich structures fail economic checks, and bot-level “sandwich efficiency” remains $<0.1\%<300P_{\text{batch}}fb$ pairs unless victim size justifies the wedge.
A plausible implication is that, as rollups move toward public mempools or builder markets, or as transaction sizes increase, probabilistic sandwiching may regain practical feasibility. Sequencer and protocol designs must anticipate these economic models and preemptively incorporate countermeasures, rather than retrofitting controls after vulnerabilities emerge (Gogol et al., 27 Jan 2026, Torres et al., 2024).