How Much Must a Private Mempool Hide? Exact Leakage Thresholds for Sandwich Attacks
Heikichi Hayashi, Li Jiazhuo, Ruoran Lai
NeurIPS 2026
TL;DR. Whether a sandwich attack on a constant-product AMM is guaranteed to pay depends only on the smallest victim size consistent with the leak, which gives private mempools an exact threshold for how large a lower bound they may reveal.
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 first-price auction for the right to sandwich it, and the winning front-run must keep the victim’s trade executable at every size in the interval. The answer turns on the smallest size consistent with the leak. It alone determines the feasible front-runs, the largest feasible front-run is optimal for pointwise, expected, and worst-case profit alike, and the guaranteed profit has a closed form. When execution is costly, a privacy layer that wants to rule out sandwiches profitable at every consistent size may therefore reveal anything about the size except a lower bound above an explicit threshold; the upper end of the range is irrelevant. With two or more symmetric traders, every pure-strategy perfect Bayesian equilibrium of the auction hands the entire expected net rent to the auctioneer. If the direction is hidden too, no non-contingent first leg front-runs both possible directions, while post-trade arbitrage can survive even perfect pre-trade hiding.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:50 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper studies robust sandwich trading against a partially observed hidden order in a constant-product market maker. The reviewers are all mostly positive about the paper and its contribution. There are some concerns about the presentation and how realistic some of the assumptions are. In their rebuttal, the authors made a good effort to address these concerns. The paper could be a good addition to NeurIPS if space allows.
Final justification
The reviewers are all on the positive side and the authors made a good attempt to address their concerns. If there is sufficient space in the programme, the paper can be accepted as a poster.
Read meta-review
Meta-review
This paper studies robust sandwich trading against a partially observed hidden order in a constant-product market maker. The reviewers are all mostly positive about the paper and its contribution. There are some concerns about the presentation and how realistic some of the assumptions are. In their rebuttal, the authors made a good effort to address these concerns. The paper could be a good addition to NeurIPS if space allows.
Final justification
The reviewers are all on the positive side and the authors made a good attempt to address their concerns. If there is sufficient space in the programme, the paper can be accepted as a poster.
1 comment
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studied sandwich attacks on constant-product AMM under partial information: the attacker observes only a public interval signal containing the true (hidden) size of a victim order, rather than itself. It shows that the feasible front-run size depends only on the lower bound , yielding a closed-form worst-case profit formula and a profitability threshold on . The paper also found that, in a symmetric multi-trader auction, every pure-strategy equilibrium implements the optimal attack but transfers all the rent to the auctioneer.
Strengths and weaknesses
Strength: The model is clean, and the question is natural. The authors obtain closed-form characterizations and a simple threshold phenomenon. While the technical arguments are not very complex, the results lead to useful insights.
Weakness: My major concern is that the setting of the paper is somewhat simple compared to the real-world case. For example, many smart contracts now use Uniswap v3, where the market cannot be modeled simply by the constant-product equation . Also, real-world attack chains are often longer and involve more steps, and the one-attacker, one-victim setting is relatively idealized.
Questions
- Although the paper does not include empirics, I am still curious about the practicality of the approach. For example, are sandwich attacks and Uniswap-pair-based attacks still common in the reported incidents? Can the authors
- The paper assumes that the attacker only knows that . How would the results change under a richer Bayesian model in which the attacker has a posterior distribution over and optimizes expected profit?
Limitations
Please see the "weakness" part
Final justification
I thank the authors for their helpful response. Before the rebuttal, my main concerns were (1) how well the constant-product curve captures real-world decentralized exchanges and (2) whether the analysis can be extended to more complex attacks.
The authors clarified the connection to Uniswap v3 and which cases are outside the scope of the theoretical results (e.g., cross-tick execution). I also found their proposed revisions to the discussion helpful.
Although the model remains restricted, I find the theoretical results clean and interesting. I therefore maintain my positive score.
Formatting concerns
I have no concern about the paper's format
1 comment
Rebuttal
Thank you for the positive assessment. The central scope question is whether this benchmark remains informative for modern DEX execution. We clarify the empirical motivation, the precise connection to Uniswap v3 and richer attack paths, and the Bayesian component of the model.
1. Practical relevance of sandwich attacks
Recent measurement evidence indicates that sandwiching remains active and is not confined to simple Uniswap v2 traces. McLaughlin, Kruegel, and Vigna [1] identify 63,257 sandwich-attack arbitrages and give a concrete multi-hop example whose manipulation and unwind use both Uniswap v2 and v3. More recent block-level work by Bai et al. [2] explicitly parses Uniswap v2/v3 and multi-token routes and reports 60,946 sandwich events over 210,000 Ethereum blocks. We will add this recent evidence to make the practical motivation current.
These measurements motivate the information question studied here, but the paper is not intended as an estimator of aggregate attack incidence. Its target is the local strategic subproblem: once a candidate victim order and a relevant pool leg have been identified, how much residual information about the hidden size is already sufficient to construct a sandwich that remains executable? The answer is an exact leakage threshold, rather than a claim that every observed MEV trace has only three swaps.
2. Uniswap v3 and longer attack chains
Uniswap v3 is not described by one global constant-product curve. There is nevertheless a direct local connection. As specified in the Uniswap v3 whitepaper [3], within a tick interval with fixed active liquidity, v3 trades against virtual reserves satisfying
Consequently, when the front-run, victim trade, and unwind all remain within the same active-liquidity interval, the constant-product pricing algebra applies after replacing physical reserves by the corresponding virtual reserves. Proposition 7.7 separately shows that positive swap fees make universal sandwiching weakly harder than in the fee-free benchmark.
If an attack crosses initialized ticks, active liquidity changes and the exact one-line threshold need not survive; the relevant calculation becomes piecewise. We will state this distinction explicitly: the within-tick case gives a direct v3 interpretation, while cross-tick execution is outside the current closed-form theorem. This also sharpens Remark 7.10, which already separates the lower-tail monotonicity mechanism from the constant-product-specific cancellation.
The allocation layer also contains multiple potential attackers: the execution-rights auction has symmetric traders, and Theorem 4.5 characterizes every pure-strategy equilibrium of that competition. What is deliberately singular is the executed bundle and the victim/pool leg it surrounds. For multiple victims, unknown interleavings, or cross-venue routing, the state becomes multidimensional, as discussed in Remark 7.9. These richer paths are important extensions, while the present theorem supplies an exact benchmark for their single-pool component.
3. The posterior-Bayesian model is already part of the baseline
The interval specifies the support revealed by signal ; it does not replace a posterior distribution. Nature draws from a common prior, and after observing , all traders update to a posterior supported on . Theorem 4.2 is stated for any such posterior and gives
Thus the attacker already maximizes posterior expected profit over robustly admissible front-runs. The full posterior generally changes the value , and therefore changes whether an attack occurs and how much is paid in the auction:
When , Theorem 4.5 shows that the optimal robust bundle is implemented and the equilibrium payment is . The posterior does not change the selected robust size because is increasing in for every : once robust admissibility fixes the common upper bound , every posterior supported on the interval selects that boundary. In short, the lower endpoint determines robust feasibility, whereas the posterior determines valuation and equilibrium participation.
If the question instead allows the attacker to tolerate a positive probability that the victim does not execute, Section 7.1 studies precisely that relaxation. Under -admissibility, is replaced by the posterior's lower -quantile , so the feasible size becomes
If failed bundles also incur a separate revert loss, the entire posterior enters both the success probability and expected payoff. We will foreground the baseline posterior and this distinction earlier, since the current presentation makes the Bayesian layer easier to miss than intended.
We will therefore revise the scope discussion in three focused ways: add recent evidence on v2/v3 and multi-token sandwiches, state the within-tick v3 interpretation and cross-tick boundary, and move the prior-signal-posterior timing before the main results. None of these changes alters the exact constant-product theorems; they clarify where the closed form applies and how the existing Bayesian auction layer answers the reviewer's final question.
References
[1] R. McLaughlin, C. Kruegel, and G. Vigna. "A Large Scale Study of the Ethereum Arbitrage Ecosystem." In 32nd USENIX Security Symposium, pp. 3295-3312, 2023.
[2] J. Bai, D. Li, Z. Jiang, and G. Du. "Design and implementation of a real-time detection system for multi-token sandwich attacks in Ethereum based on Geth client." Discover Computing, 28:180, 2025.
[3] H. Adams, N. Zinsmeister, M. Salem, R. Keefer, and D. Robinson. "Uniswap v3 Core." Whitepaper, 2021.
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 4/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper considers a version of a sandwiching attack on a victim making a trade from one unit to another in a market where the product of quantities of units are maintained invariant. A trader launches a sandwiching attack against a victim by buying the unit the victim aims to buy, before the victim buys, thereby decreasing the quantity of that unit and making it more expensive. Typically, the optimal quantity to buy for the attacker requires knowledge of the amount of quantity that the victim intends to buy. This paper asks what the attacker's optimal sandwich attack strategy is with only partial information of the victim's quantity parameter. This is the information that the quantity lies in some bounded interval instead of knowing the exact value. The paper considers attack strategies that are robustly admissible: don't prevent the victim's buying for any true buying quantity in the interval. The paper shows the optimal robustly admissible strategy is the same for all possible quantities and only depends on the lower bound on the victim's parameter. The robustly admissible property imposes a maximum attack strategy that ensures that even for the minimum quantity, the victim still chooses to buy. And this maximum strategy is pointwise optimal. The paper also considers an auction setting, where multiple traders participate in an auction for a single slot to launch the attack and characterizes the equilibria of this auction into parameter regions where the victim is negatively impacted by the attack. Finally, they consider other variants of uncertainty and relaxed notions of admissibility in their model and discuss how the results change for these regimes.
Strengths and weaknesses
Strengths:
-
the form of uncertainty considered in the paper is a natural uncertainty to study in this setting. And it is nice how the results imply that all an attacker needs to know is a lower bound on the victim's parameter
-
The paper addresses and discusses many variants of their modeling choices and how their results generalize to those settings
Weaknesses:
-
I felt that the model presentation lacked some clarity. It would be helpful to give more economic intuition for the components of the model to help someone not very familiar with this area
-
There seems to be a discrepancy in risk-neutrality for different aspects of the problem that is not motivated well enough. For example, the notion of robustly admissible is highly risk-averse, requiring the victim to buy for all possible parameters in the interval. But in the auction setting, the attackers are risk-neutral trying to maximize expected utility conditioned on launching the attack. I felt this difference could be motivated better
-
The proof of Theorem 4.3 seems to have an issue. In line 396, the proof invokes Theorem 4.5a. However, Theorem 4.5a is in the auction setting where it is about posterior expected utility. Theorem 4.3 on the other hand is about the uniform profitability.
Questions
can you motivate more risk-averseness of the form uniform acceptibility and risk neutrality in the auction setting where traders aim to maximize posterior expected utility?
Limitations
Yes
Final justification
The authors provided a local modification to their proof that preserves the correctness of their result.
Formatting concerns
N/A
1 comment
Rebuttal
Thank you for the careful and largely positive assessment. We especially appreciate the reviewer's recognition that interval uncertainty is natural and that the lower-endpoint characterization is useful. We agree that the economic roles of robust admissibility and risk neutrality need to be separated more clearly. We also clarify below the distinct roles of Theorem 4.3 and Theorem 4.5(a).
1. Economic intuition for the model
The baseline round has four steps. First, the victim submits an exact-input swap with a slippage guard: if its honest output is , the order requires at least . Second, the public signal reveals only that the hidden size lies in . Third, a trader chooses one non-contingent front-run size before learning . Fourth, traders bid for the single right to place that front-run immediately before the victim and unwind immediately afterward.
The victim's slippage guard creates a hard feasibility cap on . A proposed bundle is the sandwich studied in the paper only if the victim remains between its two legs; if the slippage guard fails, the victim order does not execute and the modeled sandwich path is absent. The relative-output ratio is
For fixed , this ratio increases with , so the smallest feasible victim order is the hardest one to keep executable. By contrast, the trader's profit increases with . This gives the economic division behind the results: the lower endpoint determines which bundles are feasible, while the posterior over determines the value of a feasible bundle. We will add this timing and intuition before the formal definitions.
2. Robust admissibility versus risk-neutral bidding
These assumptions operate at different layers of the model. Robust admissibility defines the action set:
Risk neutrality then ranks the actions in that set. Conditional on signal , a bidder values an admissible bundle by
Thus we do not assume that the trader evaluates profit by a max-min criterion. We impose an execution guarantee and use posterior expected utility among bundles satisfying that guarantee. This is analogous to maximizing expected return subject to a hard safety or implementability constraint.
The robust baseline is useful because it asks a distribution-free question: how much leakage suffices to construct one bundle that remains a valid sandwich for every hidden size consistent with the signal? It is not intended as a claim that all real attackers refuse every positive failure probability. Section 7.1 already studies the alternative. Under -admissibility, the execution requirement becomes
and the support minimum is replaced by the lower -quantile . If failed bundles also carry a state-dependent revert loss, the full posterior enters both feasibility and payoff. We will move this motivation into the baseline model and state explicitly that robustness is an execution requirement, whereas risk neutrality is the payoff criterion.
There is also no disagreement among the pointwise, expected, and worst-case objectives once the robust action set is fixed: because is increasing in for every , all three select the same maximal admissible front-run. The posterior matters for its value and hence for the auction bid, rather than for the selected robust size.
3. Clarifying Theorem 4.3 and Theorem 4.5(a)
Theorem 4.3 does not need to invoke Theorem 4.5(a). Its proof uses only the robust-value characterization in Theorem 4.2. For a closed interval with ,
Consequently, a robustly admissible bundle satisfying for every exists if and only if . Substitution of the closed form for then yields the threshold in Theorem 4.3. This argument is entirely independent of the auction and posterior expected utility.
The reference to Theorem 4.5(a) appears in the subsequent Corollary 4.4, after the proof of Theorem 4.3, where the discussion turns from the uniform-profit threshold to an auction consequence. We will make this transition more explicit by stating the two criteria separately:
- Theorem 4.3 and the first part of Corollary 4.4 concern the distribution-free uniform guarantee, governed by .
- Auction behavior is governed by the posterior continuation value
Accordingly, before invoking Theorem 4.5(a), we will state its applicable condition explicitly. This keeps the distribution-free boundary statement and the posterior-dependent auction statement distinct.
This is a local clarification at the open-endpoint boundary. The exact robust admissibility theorem, the optimal robust value, the distribution-free threshold for , and the execution-auction equilibrium theorem are unchanged.
- Rating
- 4/6
- Confidence
- 1/5
- Quality
- 3/4
- Clarity
- 2/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
Caveat: This paper is well outside my expertise so I am mainly judging on presentation.
The paper studies the problem where an order exists, but before the order executes some front-running trading could happen giving the front runners potential benefit by exploiting the hidden order depending on the particular market mechanism.
For a non-expert reader, some aspects of the problem and results are not clear. For example, what does "competing in an auction for a single execution slot" mean? What type of auction? What does highest transfer mean (is it highest profit for the sandwich trade). Does the auctioneer know q? What is the market maker model? What is AMM (I don't believe this term is ever defined), but presumably this is what is defined in section 3.1. Is constant product a natural choice?
Strengths and weaknesses
Strengths: appears to be an interesting result
Weakness: Lot of knowledge is leaked to compute the optimal frontrun size; Seems a big stretch to assume that the direction of the hidden order is known. The intro and contributions are too technical for a non-expert who is not already familiar with the definitions, which is fine if the paper is only meant for experts but it makes it very hard to review.
Questions
On line 31 what is s, in "Traders only observe s"? Based on the discussion, the front runners need to know I_s, the direction of the hidden trade, and tau? It is surprising that the profit does not depend on Y, the reserve of token Y?
Limitations
Hidden order trade direction is needed.
Formatting concerns
None
1 comment
Rebuttal
Thank you for pointing out that several aspects of the model, auction, and notation were not sufficiently clear to readers unfamiliar with AMMs. We agree that the paper should distinguish more clearly in the hidden variable, the public order attributes and the execution-rights auction. We will revise the description accordingly.
1. What is observed, and what is the signal ?
The only partially hidden variable in the baseline model is the victim's exact input size . Nature generates a public signal , which identifies an interval containing . Before bidding, every trader and the auctioneer observe the pool state , the trading pair, the direction , the slippage tolerance , and . Neither the traders nor the auctioneer observe ; they share a posterior supported on .
Thus, traders use more than the symbol alone. The phrase "traders only observe " was incomplete shorthand for observing , rather than the exact , in addition to the public pool and order metadata. We will replace it with the complete information set. Conditional on these public inputs, the optimal robust front-run requires only , , and the lower endpoint . It is independent of the exact , the upper endpoint , and . The contribution is therefore not that an attack can be computed from without any other public information. It is that, once the pool, direction, and slippage tolerance are public, is the only statistic about the hidden size needed to determine the optimal robust attack.
2. What are the AMM and the auction?
An automated market maker (AMM) is a smart contract that exchanges two tokens according to a reserve-based pricing rule. Our baseline is a fee-free constant-product AMM with reserves and invariant . The victim submits an exact-input swap of units of token for token , subject to slippage tolerance . We agree that "AMM" should be expanded and explained at first use.
By a "single execution slot," we mean one indivisible right to place a sandwich bundle around the victim order: a front-run immediately before the victim and the corresponding unwind immediately after it. After observing , the traders simultaneously submit , where is a robustly admissible front-run size and is a transfer to the auctioneer. The auctioneer selects the admissible bundle with the highest , and the winner pays its submitted amount. This is a one-shot first-price, or pay-as-bid, contest for the execution right, with deterministic tie-breaking.
The transfer is not the profit from the sandwich. Gross trading profit is , and the winner's realized utility is , where is the fixed execution cost. We will add this plain-language timing before the formal game and use "payment to the auctioneer" instead of "highest transfer" where the latter could be confused with trading profit.
3. Why is constant product a natural benchmark?
The constant-product rule is the pricing rule used by Uniswap v1/v2 and is a standard theoretical benchmark for analyzing sandwich trading. It captures the central nonlinear features needed here, including price impact and slippage, while still permitting an exact solution.
The main qualitative logic is that among all victim sizes consistent with the public signal, the smallest victim order imposes the tightest constraint on how large the front-run can be. The exact closed-form threshold, however, uses the particular algebra of the constant-product rule . We do not claim that the same formula applies unchanged to other automated-market-maker designs. Extending the exact characterization to those pricing rules is an open problem. We will make this scope clearer in the paper.
4. Why does profit not depend on ?
This is a homogeneity property of the constant-product model, not an omitted variable. Scaling the initial -reserve scales both the amount of acquired in the front-run and the relevant -side reserves in the back-run by the same factor. Because profit is measured in units of token , this common factor cancels. Direct substitution yields
We agree that this cancellation is initially surprising and will explain it immediately after deriving the profit formula.
5. How substantive is the public-direction assumption?
We agree that it is substantive. The baseline intentionally isolates residual leakage about size conditional on the pair, direction, and slippage information being public. It does not claim that direction is always observable. Proposition 7.4 gives the corresponding boundary result: if direction may be either or , and the trader must choose a non-contingent first leg before direction is revealed, no non-null bundle can be a robust sandwich for both directions. Proposition 7.5 similarly considers hidden slippage tolerance and shows that robust feasibility is governed by its public lower bound. We will foreground these scope conditions in the introduction. The resulting message is conditional but sharp: hiding direction blocks the non-contingent robust sandwich studied here, and if direction leaks while size is only interval-revealed, the lower endpoint determines the exact threshold.
Finally, we agree that the introduction and contribution list currently may introduce notation too quickly for a reader outside the area. We will precede them with a nontechnical four-step description: a victim order is partially hidden; a public interval signal is released; traders bid for the right to surround the order; and the winner must choose a front-run that preserves execution for every size consistent with the signal. This will make the information structure and scope clear before the theorem statements.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
A brief note as the discussion period closes.
On the technical comment about the proof: the proof of Theorem 4.3 uses only the robust-value characterization in Theorem 4.2 and is independent of the auction layer. The reference to Theorem 4.5(a) belongs to the subsequent Corollary 4.4, and the revision states its applicable condition explicitly there. No statement or proof changes.
The remaining items are presentational: a plain-language description of the timing and the auction before the formal game, AMM and notation defined at first use, the within-tick virtual-reserve reading of Uniswap v3 with current measurement evidence, and explicit scope statements for the public-direction assumption. All revisions are additive, and every theorem, proof, and assumption stands as submitted.
We thank the reviewers and the AC for their time and careful reading