Pith. sign in

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 →

arxiv 2607.20762 v1 pith:FBUI3H3W submitted 2026-07-22 q-fin.TR

classification q-fin.TR
keywords DEXroutingautomatedmarketmakerssuboptimalityUniswappoolssandwichattacksMEVinformationstalenessgas-awareoptimization
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

The paper tries to establish that current decentralized-exchange routing is measurably suboptimal and that the shortfall is systematic, not noise. Using 2.98 million WETH-USDC swaps on Ethereum, it measures an average loss of 2.02 basis points per trade, about $24 million in aggregate, relative to optimized benchmarks. It attributes the bulk of the loss to limited pool activation rather than poor splitting across pools already used, and it shows that planning on stale, one-block-old pool state costs roughly 1.3-1.8 bps. A sympathetic reader would care because the gap represents attainable efficiency gains for router design, and the benchmarks plus bisection algorithm give a reproducible way to measure those gains.

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.

Watch

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 extensions of the paper, not claims the author makes directly.

  • 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.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 6 minor

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)
  1. [§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.
  2. [§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.
  3. [§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.
  4. [§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)
  1. [§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.
  2. [§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.
  3. [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.
  4. [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. [§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.
  6. [§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

0 steps flagged · score 0.0 of 10

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 3 free parameters · 6 assumptions · 0 invented entities

The benchmarks add no invented entities and fit no parameters to the headline result, but the measurement depends on several modeling choices: strict concavity of output functions, fixed activation gas, a four-pool universe, simultaneous-state evaluation, and heuristic sandwich tagging. The simultaneous-state assumption is the most consequential because it affects the attainability of the 'optimal' benchmark and therefore the size of the reported shortfall.

free parameters (3)
  • Per-pool activation gas cost \bar g_j(\omega_j) = not reported in text
    Entered in the G-FVO benchmark; the paper does not state how these gas costs are estimated from on-chain data.
  • Candidate pool universe = Uniswap v2 30bp + v3 1/5/30bp WETH-USDC pools
    FVO and G-FVO headroom is defined relative to this hand-selected set; other venues, chains, and multi-hop routes are excluded.
  • Minimum trade-size filter = $100 USDC side
    Trades below $100 are dropped; this affects small-trade bps statistics and the outlier distribution.
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.
    Needed to guarantee marginal-price equalization and bisection convergence; satisfied approximately by CPMM and concentrated-liquidity pools, but empty-liquidity edge cases are excluded by footnote.
  • domain assumption Gas is a fixed per-activation cost, independent of swap quantity.
    The G-FVO benchmark treats gas as \bar g_j on activation; tick-crossing variability is acknowledged as a limitation but not modeled.
  • ad hoc to paper All allocations are evaluated against a single fixed pool-state snapshot, as if all pool legs execute simultaneously.
    Section 4 benchmarks and Section 5.1 evaluate at 'execution state' without modeling sequential within-transaction state changes; this makes the theoretical optimum not strictly implementable.
  • domain assumption Only same-pair, same-token routing is considered; no multi-hop or intermediate-token routes.
    Section 3.1 restricts to pools for the same token pair; authors acknowledge this in the limitations.
  • domain assumption Pool states and realized outputs can be accurately reconstructed from on-chain swap events at the transaction's execution position.
    Appendix B describes parsing, but no independent validation of the reconstructed states is provided.
  • domain assumption Sandwich victims are identified by same-block front-run/back-run brackets from the same counterparty cluster.
    Section 5.4 uses this heuristic; the clustering method is not described or validated.

how reviews work

0 comments
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 reproduced from arXiv: 2607.20762 by the authors.

Figure 1
Figure 1. Suboptimality relative to different optima. The box plot indicates the 25th, 50th, and 75th percentiles, while the triangle indicates the mean of each sample. To put these magnitudes in perspective, one naturally asks: Where do such losses originate? Losses from mis–splitting within the activated set. Even conditional on the set of pools that were actually activated, realized splits are not fully [PITH_FULL_IMAGE:f… view at source ↗
Figure 2
Figure 2. Suboptimality vs. trade size (relative to FVO). Heterogeneity by trade size. Suboptimality is size–dependent [PITH_FULL_IMAGE:figures/full_fig_p010_2.png] view at source ↗
Figure 3
Figure 3. Effect of delayed state on performance (relative to FVO and G-FVO). The gap between N = 0 and N = 1 quantifies the cost of one-block staleness (oracle vs. implementable planning), while the monotone drift as N increases captures the growing loss from routing on progressively older snapshots. (A) Evaluation at the planning state ωN . This isolates the role of tim￾ing mismatch versus allocation inefficiency and the me… view at source ↗
Figures from the paper (3 more)
Figure 4
Figure 4. Figure 4: Suboptimality of realized routes against optima at ω N , evaluated also at ω N . 0 1 2 0.0 0.5 1.0 1.5 2.0 Mean suboptimality (bps) FVO (all pools, no gas) 1inch v4 1inch v5 CoWSwap Odos v2 Universal router 0 1 2 0.0 0.5 1.0 1.5 2.0 Mean suboptimality (bps) G-FVO (all …
Figure 5
Figure 5. Figure 5: Suboptimality of realized routes against optima at ω N , evaluated at execution. 5.4 Sandwiching Effect We assess how sandwich attacks shift routing shortfalls at the router level, keep￾ing the evaluation identical to Section 5.1. For each pool in our universe (Sec￾tio…
Figure 6
Figure 6. Figure 6: Router-level suboptimality relative to SCO/ FVO/ G-FVO, evaluated at exe￾cution snapshots. Rows show the full sample (top), non-sandwiched subset (middle), and sandwiched subset (bottom). Boxes indicate the 25th/50th/75th percentiles; tri￾angles indicate means. Level s…

Discussion (0). Continue with ORCID to comment.

Reference graph

Works this paper leans on

12 extracted references · 1 canonical work pages

  1. [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. [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

  3. [3]

    CoW Protocol: CoW protocol documentation: Batch auctions, solvers, and archi- tecture.https://docs.cow.fi/(2023)

  4. [4]

    CoW Protocol Team: CoW protocol: A trustless meta-DEX aggregator using batch auctions and ring trades.https://docs.cow.fi/(2023)

  5. [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

  6. [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)

  7. [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)

  8. [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

Show all 12 references
  1. [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...

  2. [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)

  3. [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

  4. [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...

Pith tools

Reviewed August 1, 2026 · model on record in the stance chip above.