REVIEW 4 major objections 6 minor 12 references
Quantifying Sub-Optimality in Routing for Automated Market Makers
T0 review · 4 major / 6 minor · reviewed 2026-08-01 · deepseek-v4-flash
Pith's one-line read Realized DEX routing sacrifices about 2 bps per trade, or $24 million in aggregate, and most of that loss comes from failing to activate more liquidity pools.
desk verdict A solid, useful empirical audit with a reasonable benchmark decomposition; the headline dollar loss is plausible in direction but not pinned down because the heavy-tailed mean lacks error bars. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
Marginal price equalization: at the optimum each active pool has the same marginal price mp_j = 1/o'_j(q_j), while inactive pools have weakly higher marginal prices; this is computed exactly by bisection on the aggregate clipped inverse marginal cost curve S(lambda) = sum_j mp_j^{-1}(lambda). Gas-aware routing wraps this inner allocation in a subset enumeration over pool activations, yielding the G-FVO benchmark. This machinery is what makes the three counterfactual benchmarks computable at scale.
What would settle it
Replay the optimized benchmark allocations as sequential transactions on historical state: simulate each leg against the pool state after prior legs, including gas. If the resulting total output gap falls far below $24 million, the headline loss is an unattainable counterfactual; if it reproduces the gap, the simultaneous-snapshot assumption is immaterial.
Extended reading notes
Core claim
Relative to a best-possible allocation over the same pools (SCO), all pools (FVO), or all pools with per-activation gas (G-FVO), realized routes fall short on average by 0.05 bps, 1.78 bps, and 2.02 bps respectively, aggregating to about $24 million. The dominant component is failure to activate additional liquidity venues, not misallocation among activated venues. Information timeliness matters: a single block of staleness raises mean shortfall by roughly 1.29 bps under FVO and 1.78 bps under G-FVO, and when realized routes are evaluated at the stale state itself they look closer to optimal, indicating timing mismatch as a key component. Sandwich attacks produce heavy right tails: sandwiche
Load-bearing premise
The benchmark counterfactuals treat all pools as executing simultaneously at one fixed pool state, whereas a real transaction executes legs sequentially and each pool sees the state left by earlier legs.
Editorial extensions
If this is right
- Routers that activate more of the four WETH-USDC Uniswap pools, while paying per-pool gas, would capture most of the measured $24 million.
- Planning on the freshest implementable state (bottom of the previous block) instead of one-block-old state recovers roughly $15.5 million under FVO and $21.4 million under G-FVO in the sample.
- An implementable router optimizing at the previous block's bottom state outperforms all five labeled routers when both are evaluated at execution time.
- Sandwiched transactions account for a disproportionate share of routing shortfalls, especially on public-mempool routers, while solver-mediated flow shows near-zero incidence.
- Small trades under $1,000 are disproportionately inefficient in basis points, while large trades dominate absolute dollar losses.
Reading between the lines
- Editorial inference: the $24 million counterfactual is likely an upper bound, because optimized routes are evaluated against a single pool-state snapshot; in real multi-leg execution each leg sees the state left by earlier legs, so simulated sequential execution would probably shrink the attainable gain.
- Editorial inference: the heavy-tailed loss distribution implies that a few extreme events, not typical trades, drive the aggregate loss; router improvements aimed at the median trade will capture little of the potential value.
- Editorial inference: the same benchmark suite transfers to multi-hop or cross-chain routing by replacing output functions with compound swap functions; the gas-aware subset enumeration would then treat route hops as activation decisions.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper reports a large-scale empirical audit of routing suboptimality for WETH-USDC swaps on Ethereum mainnet, using 2.98 million reconstructed transactions. It introduces three benchmarks—SCO (support-constrained), FVO (full-venue), and G-FVO (gas-aware full-venue)—and a bisection-based optimizer for the fixed-pool-state routing problem. The central claim is that realized routes sacrifice on average 2.02 bps per trade relative to optima at execution-time state, aggregating to about $24 million across $120 billion of volume. The paper also reports that one-block-stale state information costs ~1.29–1.78 bps, that limited pool activation is the dominant driver of suboptimality, and that sandwiching is associated with much larger shortfalls.
Significance. If the quantitative claims are supported, this is a substantial empirical contribution: it provides a reproducible benchmark suite, a scalable exact optimizer with correctness proofs, and a decomposition of routing losses into activation and split-quality components on a large on-chain sample. The paper is also careful to compare several router types and to separate oracle and implementable benchmarks. The algorithm and benchmark definitions are well specified, and the empirical design is largely transparent. However, the headline magnitudes are not yet robustly established because they are means of a heavy-tailed distribution without uncertainty or outlier-sensitivity analysis, and the theoretical derivation contains an algebraic inconsistency.
major comments (4)
- [§3.2, Eq. (4)] The KKT condition as written is algebraically incorrect. From the Lagrangian (3), optimality for an active pool gives o'_j(q_j) = λ, where λ is the multiplier on the budget constraint. Since the paper defines mp_j = 1/o'_j, the correct relation is mp_j(q_j) = 1/λ, not mp_j(q_j) = λ. The bisection algorithm on S(λ) = Σ mp_j^{-1}(λ) is correct if λ is reinterpreted as the common marginal price, but Eq. (4)-(5) and the proof sketch are internally inconsistent. This is load-bearing because all benchmarks are computed with this optimizer; please correct the derivation or introduce distinct notation for the Lagrange multiplier and the marginal price.
- [§3.1 vs §3.3, Eq. (1) and Eq. (9)] The gas-accounting signs are inconsistent. The prose in §3.1 states that for z=1 (token0→token1) gas reduces output (objective-side deduction), and for z=0 gas reduces the input budget (constraint-side adjustment). Eq. (1) implements the opposite: for z=1 it adds gas to the budget constraint and for z=0 it subtracts gas from the objective. Eq. (9) matches the prose. Since G-FVO uses Eq. (9), the empirical results may be unaffected, but the general formulation in Eq. (1) is wrong as written and must be repaired or reconciled.
- [§5.1 and §5.4] The headline magnitudes—2.02 bps and $24 million—are means of a distribution that the paper itself describes as heavy-tailed, with 'a small set of transactions contribut[ing] disproportionately to average losses.' No standard errors, confidence intervals, trimmed/winsorized means, or sensitivity to transaction-reconstruction filters are reported. A handful of extreme or misreconstructed transactions could drive the aggregate. This is not merely a presentation issue: the specific numeric claim is unsupported without outlier-robustness analysis. Please add such diagnostics and report the fragility of the $24M figure.
- [§5.4 and Abstract] The claim that sandwiching attacks 'drive a significant fraction' of routing suboptimality is not quantified. The analysis tags victims with a within-block bracket heuristic and shows a level shift in mean suboptimality, but it does not estimate the share of the aggregate dollar shortfall attributable to sandwiched transactions. Given the low incidence (0.308% by count), the dollar share could be small or large. Please provide an explicit decomposition or soften the causal wording to 'is associated with'.
minor comments (6)
- [§4 and throughout] The label 'Full-Venue Optimum' overstates the scope: FVO considers only four Uniswap L1 pools (v2 30bps, v3 1/5/30bps), not all venues on Ethereum. Please qualify the label, e.g., 'Full-Uniswap-Venue Optimum,' or explicitly state that other venues (Balancer, Curve, etc.) are excluded.
- [§5.2, Figure 3] The caption says 'router-level means as lines,' but the figure panels show box plots and separate mean lines. Please align the caption with the actual visualization.
- [Eq. (7) and Algorithm 1] The symbol λ is used both as the Lagrange multiplier in Eq. (4) and as the marginal-price argument in Eq. (7). These are different mathematical objects and should be distinguished to avoid confusion.
- [Tables 1 and 2] Table 1 reports 3.36×10^6 total transactions while Table 2 reports 2,978,019. Clarify the difference (e.g., Table 1 may include unfiltered or both-direction transactions).
- [§5.3(B)] The implementable-router gains ($0.77M for FVO1, $0.66M for G-FVO1) are computed on the labeled-router subsample, while §5.1 reports FVO/G-FVO losses for the full sample. Please state this explicitly to avoid misleading comparisons.
- [§4] The manuscript does not address the sequential-execution concern directly. For the four same-pair pools with at most one swap leg per pool, evaluating all legs at the same pre-execution snapshot is equivalent to sequential execution; stating this explicitly would preempt a natural objection.
Circularity Check
No significant circularity: benchmarks are parameter-free optima computed from on-chain states; the headline shortfall is a direct comparison, not a fitted prediction.
full rationale
The paper's central measurement compares realized routes to optimization benchmarks (SCO/FVO/G-FVO) that are defined by convex programs over on-chain pool states and solved by a bisection/subset-enumeration algorithm with correctness proofs. No free parameter is fit to the data to produce the 2.02 bps/$24M shortfall, and no quantity labeled a 'prediction' is an optimized or fitted input by construction. The SCO/FVO/G-FVO decomposition is an accounting identity over successively larger feasible sets, not a circular derivation. The staleness analysis in Section 5.2 is a controlled comparison between optima computed at different snapshots; the 1.29-1.78 bps figures are differences between two optimizer evaluations, not assumptions of the result. Section 5.4's sandwich finding is an empirical correlation between a tagging heuristic and shortfall levels, not a definitional equivalence. The paper also does not rely on load-bearing self-citations: the convex-programming foundation is cited to external work [1,6], and the CoW Protocol references [3,4] are external documentation. Theorem 1 and Theorem 2 are proved in the appendix. The simultaneity concern raised in the reader's take (optimizing as if legs execute simultaneously) does not create circularity because pools are same-pair and output functions depend only on each pool's own state; at most it is an assumption about benchmark attainability, which is a correctness/robustness issue rather than a circularity issue. Overall, the derivation chain is self-contained and the headline result is not forced by any definitional equivalence or self-citation chain.
Assumptions & free parameters
free parameters (3)
- Per-pool activation gas cost \bar g_j(\omega_j) =
not reported in text
- Candidate pool universe =
Uniswap v2 30bp + v3 1/5/30bp WETH-USDC pools
- Minimum trade-size filter =
$100 USDC side
assumptions (6)
- domain assumption Assumption 1: each pool output function is nonnegative, continuous, strictly increasing a.e., differentiable except at finitely many points, and strictly concave.
- domain assumption Gas is a fixed per-activation cost, independent of swap quantity.
- ad hoc to paper All allocations are evaluated against a single fixed pool-state snapshot, as if all pool legs execute simultaneously.
- domain assumption Only same-pair, same-token routing is considered; no multi-hop or intermediate-token routes.
- domain assumption Pool states and realized outputs can be accurately reconstructed from on-chain swap events at the transaction's execution position.
- domain assumption Sandwich victims are identified by same-block front-run/back-run brackets from the same counterparty cluster.
Cite this review
Pith. "Pith review of Quantifying Sub-Optimality in Routing for Automated Market Makers." pith.science (2026). https://pith.science/paper/FBUI3H3W
@misc{pith2026260720762,
author = {Pith},
title = {Pith review of: Quantifying Sub-Optimality in Routing for Automated Market Makers},
year = {2026},
howpublished = {\url{https://pith.science/paper/FBUI3H3W}},
note = {Machine review of arXiv:2607.20762}
}
abstract
We provide a large-scale empirical audit of DEX routing using 2.98 million WETH-USDC swaps on Ethereum. Comparing realized routes with optimized benchmarks, we measure an average shortfall of 2.02 bps per trade or \$24 million. To attribute losses, we introduce three reproducible optimal benchmarks: a Support-Constrained Optimum (SCO) that evaluates split quality conditional on the pools actually used; a Full-Venue Optimum (FVO) that considers all available pools to quantify the value of broader pool access; and a Gas-Aware FVO (G-FVO) that augments FVO with gas costs to capture the trade-off between additional pool usage and gas expenditure. Computing these benchmarks at scale is enabled by a bisection-based algorithm for optimal routing across multiple pools for the same token pair. Two regularities emerge. First, information timeliness is crucial: moving from execution-time state to one-block lagged state optimization significantly raises mean shortfall and additional delays further degrade performance, albeit with diminishing increments; evaluated on the same stale snapshots, realized routes lie closer to optimal, indicating timing-mismatch as a key component. Second, inefficiency is heterogeneous and heavy-tailed: small trades suffer higher percentage losses, while a few extreme outliers dominate the aggregate dollar shortfalls. Finally, we demonstrate that sandwiching attacks drive a significant fraction of routing sub-optimality. Our benchmark protocol and algorithm offer a rigorous, reproducible basis for evaluating and improving information-timely, gas-aware routing.
Figures
Figures from the paper (3 more)
Reference graph
Works this paper leans on
-
[1]
In: Proceedings of the 23rd ACM Conference on Economics and Computation (EC ’22)
Angeris, G., Evans, A., Chitra, T., Boyd, S.: Optimal routing for constant function market makers. In: Proceedings of the 23rd ACM Conference on Economics and Computation (EC ’22). pp. 115–128 (2022).https://doi.org/10.1145/3490486. 3538336
-
[2]
arXiv preprint (2025),https://arxiv.org/abs/2502.02059
Chitra, T., Kulkarni, K., Srinivasan, K.: Optimal routing in the presence of hooks: Three case studies. arXiv preprint (2025),https://arxiv.org/abs/2502.02059
arXiv 2025
-
[3]
CoW Protocol: CoW protocol documentation: Batch auctions, solvers, and archi- tecture.https://docs.cow.fi/(2023)
2023
-
[4]
CoW Protocol Team: CoW protocol: A trustless meta-DEX aggregator using batch auctions and ring trades.https://docs.cow.fi/(2023)
2023
-
[5]
In: Proceedings of the 2020 IEEE Sym- posium on Security and Privacy (S&P)
Daian, P., Goldfeder, S., Kell, T., Li, Y., Zhao, X., Eyal, I., Juels, A., Tram` er, F., Breidenbach, L.: Flash boys 2.0: Frontrunning, transaction reordering, and consen- sus instability in decentralized exchanges. In: Proceedings of the 2020 IEEE Sym- posium on Security and Privacy (S&P). pp. 910–927 (2020).https://doi.org/10. 1109/SP40000.2020.00040
arXiv 2020
-
[6]
In: International Conference on Financial Cryptography and Data Security
Diamandis, T., Resnick, M., Chitra, T., Angeris, G.: An efficient algorithm for opti- mal routing through constant function market makers. In: International Conference on Financial Cryptography and Data Security. pp. 128–145. Springer (2023)
2023
-
[7]
In: International Conference on Web and Internet Economics
Kulkarni, K., Diamandis, T., Chitra, T.: Routing mev in constant function market makers. In: International Conference on Web and Internet Economics. pp. 456–473. Springer (2023)
2023
-
[8]
Qin, K., Zhou, L., Gervais, A.: Quantifying blockchain extractable value: How dark is the forest? In: Proceedings of the 2022 IEEE Symposium on Security and Privacy (S&P). pp. 198–214 (2022).https://doi.org/10.1109/SP46214.2022.9833734
arXiv 2022
Show all 12 references
-
[9]
Yaish, A., Dotan, M., Qin, K., Zohar, A., Gervais, A.: Suboptimality in defi.https: //eprint.iacr.org/2023/892(2023) 18 Weiye Xi and Ciamac C. Moallemi A Algorithms and Implementation Details A.1 Bisection for the Lagrange Multiplier Algorithm 1Bisection for the Lagrange Multi...
2023
-
[10]
(Existence and uniqueness) There exists a uniqueλ ⋆ ∈[λ low, λhigh]such thatS(λ ⋆) =Q, and the allocationq ⋆ j = mp −1 j (λ⋆)is the unique optimizer of(7)
-
[11]
Hence to achieve |bλ−λ ⋆| ≤ελ it suffices to take k≥ l log2 (λ(0) high −λ (0) low)/ελ m
(Convergence inλ) Afterkiterations of Algorithm 1, the current bracket containsλ ⋆ and has widthλ (k) high −λ (k) low ≤(λ (0) high −λ (0) low)/2k. Hence to achieve |bλ−λ ⋆| ≤ελ it suffices to take k≥ l log2 (λ(0) high −λ (0) low)/ελ m
-
[12]
Therefore to reach|S( bλ)−Q| ≤ εS it suffices that k≥ l log2 L(λ (0) high −λ (0) low)/εS m
(Convergence in output space) If, in addition,SisL-Lipschitz on the bracket, then|S( bλ)−Q| ≤L(λ(0) high−λ(0) low)/2k. Therefore to reach|S( bλ)−Q| ≤ εS it suffices that k≥ l log2 L(λ (0) high −λ (0) low)/εS m . Proof sketch.SinceSis continuous and increasing with opposite-sig...
2024
Reviewed August 1, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.