Research
How Much Must a Private Mempool Hide? Exact Leakage Thresholds for Sandwich Attacks
Private and encrypted mempools hide pending transactions to prevent sandwich attacks, but they rarely hide everything: the trading pair, the direction, and a coarse range for the trade's size often…

- arXiv
- 2609.31379
- Published
- 2026-09-25
- Authors
- Tingyi Lin, Jiazhuo Li, Ruoran Lai
AI summary
Overview
Research area: Blockchain economics and market microstructure — specifically maximal extractable value (MEV), automated market maker (AMM) trading games, and the information design of private or encrypted mempools. The paper sits at the intersection of game theory, mechanism design, and DeFi protocol engineering.
Technical level: Advanced. The paper is written for readers comfortable with perfect Bayesian equilibrium, first-price auctions, and the algebra of constant-product invariants; the results are closed-form theorems rather than empirical estimates.
Scope: The paper derives exact conditions on how much information about a hidden trade's size a privacy layer may leak before sandwich attacks become robustly profitable on a fee-free constant-product AMM.
Authors and venue: Tingyi Lin, Jiazhuo Li, and Ruoran Lai; listed affiliations include the University of Michigan, Sun Yat-sen University, and the Tropic Research Institute. Submitted to arXiv (2609.31379v2 [cs.GT], 13 Oct 2026; published 2026-09-25), category Computer Science and Game Theory, licensed CC BY 4.0. The paper reports no third-party funding.
What This Paper Is About
Private and encrypted mempools hide pending transactions to prevent sandwich attacks, but they rarely hide everything: the trading pair, the direction, and a coarse range for the trade's size often still leak. This paper asks precisely how much size leakage is enough for a sandwich to become profitable, and answers exactly for a fee-free constant-product AMM — the pricing rule behind Uniswap v2. The central insight is that only the smallest trade size consistent with the leak matters, and that this single number determines which front-runs are safe, which one is optimal, and whether any sandwich is profitable at all.
Key Contributions
-
An exact characterization of robustly admissible front-runs. For a leaked interval containing the victim's size, the set of front-runs that keep the victim's trade executable at every consistent size is shown to be the interval from 0 to an explicit closed-form maximum depending only on the pool reserve, the slippage tolerance, and the interval's lower endpoint (Theorem 4.1).
-
A closed-form robust sandwich value and a distribution-free leakage threshold. The largest admissible front-run maximizes pointwise, expected, and worst-case profit simultaneously, and the guaranteed profit is exactly τℓ(X+ℓ)/(X+τℓ). With an execution cost, a uniformly profitable sandwich exists if and only if the leaked lower bound exceeds an explicit threshold λ_c (Theorems 4.2 and 4.3).
-
An exact theory of the execution-rights auction. With two or more symmetric risk-neutral traders bidding for the right to sandwich, every pure-strategy perfect Bayesian equilibrium hands the auctioneer the entire expected net rent whenever that rent is positive, and no sandwich occurs when it is negative (Theorem 4.5).
-
Boundary results on what privacy does and does not achieve. Perfect pre-trade hiding removes universally profitable sandwiches but not attacks that pay in expectation (Corollary 4.4), and post-trade arbitrage can survive even perfect pre-trade hiding, with gross profit up to q²/(X+q) (Proposition 4.7). Hiding the trade direction separately rules out non-contingent front-runs altogether (Proposition 6.4).
Main Findings
-
Only the lower endpoint of the leaked interval matters. The upper endpoint of the leaked size range is irrelevant to admissibility, to the optimal attack, and to the profitability threshold. The reason is monotonicity: a front-run hurts small victims proportionally more, so the constraint binds at the smallest consistent size (Lemma 5.1, Theorem 4.1).
-
The admissible set is an interval with a closed-form endpoint. Robustly admissible front-runs form [0, a_max(ℓ, τ)], where a_max(ℓ, τ) = [−(2X+ℓ) + √((2X+ℓ)² + 4τX(X+ℓ)/(1−τ))]/2. Equivalently, a is admissible if and only if (X+a)(X+a+ℓ) ≤ X(X+ℓ)/(1−τ). For an interval with no positive lower bound, the endpoint becomes a₀ = X((1−τ)^(−1/2) − 1).
-
The largest admissible front-run is optimal under every objective. Because sandwich profit is strictly increasing in both front-run size and victim size (Lemma 5.2), a*(I) = a_max(ℓ, τ) uniquely maximizes pointwise profit, posterior expected profit, and worst-case profit at once (Theorem 4.2).
-
The guaranteed profit has a simple closed form. The worst-case gross profit is W(I) = π(a*(I), ℓ) = τℓ(X+ℓ)/(X+τℓ). The derivation turns on the boundary identity σ(σ+ℓ) = X(X+ℓ)/(1−τ) for σ = X + a_max(ℓ, τ), which makes numerator and denominator collapse to multiples of X/(1−τ).
-
The leakage threshold is exact and distribution free. A robustly admissible bundle with strictly positive net payoff at every consistent size exists if and only if W(I) > c, equivalently ℓ > λ_c where λ_c = [−(X−c) + √((X−c)² + 4cX/τ)]/2. Only X, τ, c, and ℓ enter; the posterior and the upper endpoint do not.
-
In dimensionless terms the threshold is approximately c/τ. Writing ĉ = c/X and λ̂ = λ_c/X gives λ̂ = [−(1−ĉ) + √((1−ĉ)² + 4ĉ/τ)]/2, and as ĉ ↓ 0, λ̂ = ĉ/τ + O(ĉ²) (Proposition 6.6). Table 1 reports, for example, λ_c/X = 0.00990 at c/X = 10⁻⁴ and τ = 0.01, and 0.00498 at τ = 0.02. Example 6.8 uses X = 10⁶, τ = 0.02, c = 100, giving λ_c ≈ 4,976.
-
Perfect hiding eliminates the uniform guarantee but not all attacks. If the signal reveals only (0, Q], then inf over ℓ ↓ 0 of W([ℓ, Q]) is 0, and with c > 0 no universally profitable robust sandwich exists. Yet the front-run a₀ > 0 stays admissible, so under a posterior concentrated at Q a trader bidding (a₀, 0) against null bids wins and earns π(a₀, Q) − c, which is positive for small c; every equilibrium then places a sandwich on path (Corollary 4.4).
-
Competition transfers the entire rent to the auctioneer. Defining R_s = V_μs(I_s) − c, if R_s > 0 every pure-strategy perfect Bayesian equilibrium has an on-path winning bundle (a*(I_s), b*_s) with b*_s = R_s, the winner's expected utility is 0, and the auctioneer captures all of R_s. If R_s < 0 no equilibrium places a sandwich; at R_s = 0 a no-attack equilibrium exists and sandwich outcomes yield zero revenue and zero trader payoffs (Theorem 4.5).
-
Leaking the first d bits of the size exposes exactly the upper bins. With dyadic bins I_j = [jQ/2^d, (j+1)Q/2^d] for j = 1, …, 2^d − 1 and I₀ = (0, Q/2^d], bin j supports a universally profitable robust sandwich if and only if jQ/2^d > λ_c. With c > 0 the lowest bin never qualifies, and the zero-bit case recovers the perfect-hiding result (Proposition 4.6). Figure 1 illustrates this for Q = 0.06X, τ = 1%, c = 10⁻⁴X, where λ_c ≈ 0.0099X.
-
Post-trade arbitrage survives perfect pre-trade hiding. Even when no universally profitable robust sandwich exists and no pure-strategy equilibrium sandwiches on path, a trader who observes the reserves after a victim trade of size q can earn strictly positive gross arbitrage profit, up to q²/(X+q), against an external market trading at the pool's initial price (Proposition 4.7).
-
Hiding the direction blocks the non-contingent sandwich entirely. If the signal reveals only that a swap of size q ∈ I will occur while the direction may be either way, and the first leg must be fixed before direction is revealed, no non-null first leg is a front-run against both directions (Proposition 6.4).
-
Hidden slippage collapses to its public lower bound. If slippage tolerance lies in a public set T_s with infimum τ̄_s, robust admissibility over all (q, τ) pairs reduces to the condition at ℓ_s and τ̄_s, and the worst-case value becomes τ̄_s ℓ_s (X+ℓ_s)/(X + τ̄_s ℓ_s) (Proposition 6.5).
-
Swap fees only make universal sandwiching harder. For a fee rate ρ withheld from the input and not added to reserves (α = 1 − ρ), gross profit is weakly smaller than in the fee-free model, so the fee-free threshold is conservative: if universal robust sandwiching is impossible at ρ = 0, it is also impossible at fee rate ρ (Proposition 6.7).
-
Tolerating rare failures replaces the lower endpoint with a lower quantile. Under ε-admissibility with a continuous, strictly increasing posterior CDF on the leaked interval, the admissible set becomes [0, a_max(q_ε, τ)], where q_ε is the lower ε-quantile; ε = 0 recovers the robust case (Proposition 6.2).
-
Empirical motivation is drawn from existing measurement work. The paper cites 63,257 sandwich attacks identified among apparent arbitrages by McLaughlin, Kruegel, and Vigna — including one whose manipulation and unwind route through both Uniswap v2 and v3 — and 60,946 sandwich events detected by Bai et al. across 210,000 Ethereum blocks.
Methodology in Plain English
The authors build a four-step game. A victim submits a swap of hidden size q with a slippage tolerance τ that cancels the trade if output falls too far below honest execution. A public signal reveals an interval that contains q — either [ℓ_s, u_s] with a positive lower endpoint, or (0, u_s] with none. Traders then bid in a first-price auction for the single right to place a front-run immediately before the victim and an unwind immediately after. The winner must choose its front-run size without learning q, and the front-run must leave the victim's trade executable at every size the signal permits.
The analysis proceeds through two monotonicity lemmas. The ratio of the victim's output after a front-run to its honest output is strictly increasing in the victim's size, so the admissibility constraint binds at the smallest consistent size. Sandwich profit is strictly increasing in both front-run size and victim size, so the largest admissible front-run dominates every smaller one for all three objectives considered. Solving the resulting quadratic gives the admissibility bound; substituting the boundary case q = ℓ gives the closed-form worst-case profit; and solving W(I) > c gives the leakage threshold.
The auction layer is then treated as a one-dimensional competition problem. Since all traders agree post-signal on the optimal admissible bundle and on its continuation value R_s = V_μs(I_s) − c, competition among at least two symmetric traders behaves in a Bertrand-like way: any winning bid below R_s can be undercut by a rival, and any bid above R_s is unprofitable for the winner, which pins the equilibrium payment at exactly R_s. Extensions handle bit-prefix leakage, direction ambiguity, hidden slippage, chance-constrained admissibility, swap fees, and a scale-free normalization of the threshold.
Why This Matters
Impact on research. Prior analytical work on sandwich attacks, including Heimbach and Wattenhofer's sandwich game and Zhou et al.'s public-order-flow analysis, assumes full or near-full observability. This paper characterizes the intermediate regime and shows that the correct analogue of the "minimum profitable victim input" intuition is the leaked lower endpoint ℓ, not the victim's actual size. It also connects the leakage map to the information-structure literature on first-price auction revenue (Bergemann, Brooks, and Morris) and complements Angeris, Evans, and Chitra's result that standard CFMM implementations cannot hide traded quantities from an adversary who sees remaining public information.
Real-world applications:
- Private and encrypted mempool design (systems in the spirit of Ferveo, Shutter, and BlindPerm): deciding which metadata a privacy layer must suppress and which it may safely reveal.
- Wallet and interface defaults for slippage tolerance: since the threshold scales roughly as c/τ to first order, halving the slippage tolerance roughly doubles the lower bound that can safely leak.
- Order-flow auction and PBS design: the execution-rights auction result predicts that a single-slot auction with symmetric competitors transfers the full expected net rent to the auctioneer, which bears on how much value protected order flow can retain for users.
- Pool-level risk assessment for Uniswap v2-style pools, including a local, fee-free benchmark for Uniswap v3 within a single tick range with fixed active liquidity Λ, where virtual reserves satisfy X_v Y_v = Λ².
Industry relevance. The results give protocol designers a concrete, checkable rule: to rule out sandwiches profitable at every consistent size when execution is costly, a privacy layer may reveal any upper bound on an order's size but no lower bound above λ_c. Revealing the first d bits of the size exposes exactly the bins whose lower edge exceeds λ_c, and fees can only shrink that exposed set.
Future Directions
-
Multiple victims and bundle interactions. The single-victim assumption is what makes the feasible region one-dimensional. With several same-direction buys, each victim's slippage guard depends on the orders ahead of it, and unwind profit depends on cumulative downstream flow, so feasibility is no longer a condition on one number.
-
General CFMMs. The lower-endpoint logic is argued to be the most robust part of the analysis, but the exact cancellations behind the closed-form value are specific to the constant-product invariant. Stableswap-style or piecewise invariants are expected to preserve only the monotonicity backbone, and tick-crossing Uniswap v3 swaps lie outside the theorems.
-
Richer allocation mechanisms. The post-signal market is reduced to symmetric traders competing for one slot. Extending exact results to multi-stage or asymmetric allocation mechanisms remains open.
-
Endogenous leakage. The leakage map is exogenous. Optimizing the information structure subject to implementability or efficiency constraints, or letting it be released strategically over time, turns the model into an information-design problem.
The paper also flags, in Remark 6.3, that once attackers maximize expected profit with occasional failures or face revert losses, the relevant objective depends on the full posterior rather than just its support minimum — a direction the chance-constrained extension only begins to address.
Target Audience
This paper is most valuable to MEV and mechanism-design researchers, cryptoeconomics and game-theory academics, and protocol engineers designing private mempools, order-flow auctions, or encrypted transaction systems. It also suits quantitatively sophisticated DeFi practitioners — AMM designers, market makers, and risk analysts — who need to reason about how much order information can safely be exposed. Readers without comfort in equilibrium analysis and AMM algebra will find the theorem statements readable but the derivations demanding; the paper is not an introductory treatment and does not report empirical measurements of its own.
Authors’ abstract
Private and encrypted mempools hide pending transactions to stop sandwich attacks and other forms of maximal extractable value (MEV), but what they hide is rarely everything: a transaction's pair, direction, and a coarse range for its size can still leak. How much leakage makes sandwiching pay? We answer exactly for a fee-free constant-product automated market maker, the pricing rule behind Uniswap v2. Traders observe an interval containing the victim's size and bid in a…
The full abstract on arXiv