REVIEW 2 major objections 1 minor 29 references
Cost of Manipulation in AMM-Based Oracles
T0 review · 2 major / 1 minor · reviewed 2026-06-28 · grok-4.3
Pith's one-line read Liquidity weights maximize the minimum cost of manipulation for weighted-median AMM oracles at any distortion level.
desk verdict The paper gives closed-form manipulation costs for AMM oracles and shows liquidity weights are optimal for medians under an EMH loss definition. 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
Cost of manipulation, defined as the minimal mark-to-market loss an attacker must incur to move the oracle output by a given multiplicative factor, with liquidity depth serving as the weight that maximizes this cost for median and small-distortion mean aggregators.
What would settle it
Observe, in a controlled CPMM environment with known external price, whether an attacker using liquidity weights can achieve a target oracle distortion at a lower realized loss than an attacker using any other fixed weights.
Extended reading notes
Core claim
Liquidity weights maximize the minimum cost of manipulation within the classes of weighted medians for any distortion level and within the classes of weighted means locally as the distortion tends to zero. For larger distortions optimal weights for means can depend on the target distortion and no single choice is uniformly best. In a frictionless CPMM model with cross-pool arbitrage the manipulation cost depends only on total quote depth and coincides across symmetric aggregators. The same liquidity-weight optimality carries over to multi-asset star architectures.
Load-bearing premise
The off-chain true price is such that any on-chain distortion forces the attacker to realize a mark-to-market loss.
Editorial extensions
If this is right
- Liquidity weights are optimal for weighted medians at every distortion level.
- For weighted means the same weights are optimal only in the small-distortion limit; larger distortions require distortion-dependent weights.
- With perfect cross-pool arbitrage the cost equals a function of aggregate depth alone and is independent of the aggregator.
- The optimality result extends unchanged to multi-asset star architectures.
- Dwell times and rate limits supply a concrete metric for sizing oracles against explicit attack budgets.
Reading between the lines
- Designers facing uncertain distortion targets may therefore prefer median aggregators over means.
- The independence result suggests that, once arbitrage is frictionless, further improvements must come from increasing total depth rather than from finer aggregation rules.
- Empirical measurement of dwell-time parameters in live deployments could turn the theoretical yardstick into an operational sizing rule.
- The single-pool closed forms could be used to benchmark manipulation resistance of oracles built on other constant-product variants.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript studies robustness of AMM-based oracles to manipulation by modeling attacker trades against CPMMs, arbitrageur restoration of consistency, and designer aggregation choices. Under an EMH view of the fixed off-chain true price, it defines manipulation cost as the minimal mark-to-market loss to achieve a given multiplicative oracle distortion. It derives closed-form single-pool formulas, solves the attacker-designer game for weighted means and medians (showing liquidity weights maximize min cost for medians at any distortion and for means locally as distortion tends to zero), shows that in frictionless cross-pool arbitrage the cost depends only on total quote depth and is identical across symmetric aggregators, extends the framework to multi-asset star architectures, and incorporates dwell times and rate limits for practical sizing.
Significance. If the closed-form derivations and game solutions hold, the work supplies an explicit economic yardstick for oracle robustness, with parameter-free optimality results inside the weighted-median and (local) weighted-mean classes and a clean reduction to total depth under arbitrage. These are concrete strengths that could inform oracle parameter choices.
major comments (2)
- [Abstract] Abstract and § on weighted medians/means: the optimality claim that liquidity weights maximize the minimum cost of manipulation (for medians at any distortion level; for means locally as distortion → 0) is derived after defining cost via the EMH assumption of an unchanged off-chain true price. If the true price can co-move with on-chain trades or the attacker can hedge, the loss function changes and the claimed optimality within the aggregator classes need not hold; the manuscript should state the result as conditional on this modeling choice and provide a concrete test or counter-scenario.
- [Section on weighted means] Section on larger distortions for weighted means: the text notes that for finite distortions optimal weights can depend on the target distortion level and no single choice is uniformly optimal. This directly limits the practical scope of the local optimality result; the manuscript should supply the explicit dependence (e.g., the functional form or numerical example) showing when liquidity weights cease to be optimal.
minor comments (1)
- [Abstract] Abstract: the phrase 'for any distortion level' for medians and 'locally as the distortion tends to zero' for means should be repeated verbatim in the introduction and conclusion for consistency.
Simulated Author's Rebuttal
We thank the referee for the constructive comments. We address each major point below and indicate the revisions we will make to strengthen the manuscript.
read point-by-point responses
-
Referee: [Abstract] Abstract and § on weighted medians/means: the optimality claim that liquidity weights maximize the minimum cost of manipulation (for medians at any distortion level; for means locally as distortion → 0) is derived after defining cost via the EMH assumption of an unchanged off-chain true price. If the true price can co-move with on-chain trades or the attacker can hedge, the loss function changes and the claimed optimality within the aggregator classes need not hold; the manuscript should state the result as conditional on this modeling choice and provide a concrete test or counter-scenario.
Authors: We agree that the optimality results are derived under the fixed off-chain price assumption of the EMH framework. In the revision we will explicitly condition the claims in the abstract and the weighted-median/mean sections on this modeling choice. For a concrete counter-scenario we will add a short discussion noting that if the off-chain price co-moves perfectly with the on-chain trade (e.g., via instantaneous cross-venue arbitrage that eliminates any mark-to-market loss), the effective manipulation cost drops to zero; this case requires a joint price-impact model outside the current scope and is flagged as a limitation for future work. revision: partial
-
Referee: [Section on weighted means] Section on larger distortions for weighted means: the text notes that for finite distortions optimal weights can depend on the target distortion level and no single choice is uniformly optimal. This directly limits the practical scope of the local optimality result; the manuscript should supply the explicit dependence (e.g., the functional form or numerical example) showing when liquidity weights cease to be optimal.
Authors: We will strengthen the section by adding a numerical example that tabulates optimal weights for target distortions of 5 %, 10 %, and 20 % under representative liquidity profiles. The example will show the distortion threshold at which liquidity weights cease to be optimal and will illustrate how the deviation grows with the target distortion, thereby clarifying the practical range of the local optimality result. revision: yes
Circularity Check
No circularity; derivations follow directly from CPMM mechanics and EMH definition without reduction to inputs
full rationale
The paper starts from explicit CPMM trading mechanics and defines manipulation cost as mark-to-market loss under a fixed off-chain EMH price, then solves the attacker-designer game to obtain closed-form single-pool formulas and optimality statements for liquidity weights in weighted means/medians. These are conditional theorems within the stated model, not tautological reductions where a result equals its input by construction, fitted parameters renamed as predictions, or load-bearing self-citations. No steps match the enumerated circularity patterns; the framework remains self-contained against its own equations and assumptions.
Assumptions & free parameters
assumptions (2)
- domain assumption Efficient market hypothesis view of the off-chain true price
- standard math Constant-product AMM trading mechanics
Cite this review
Pith. "Pith review of Cost of Manipulation in AMM-Based Oracles." pith.science (2026). https://pith.science/paper/Y3LW6FKN
@misc{pith2026260603548,
author = {Pith},
title = {Pith review of: Cost of Manipulation in AMM-Based Oracles},
year = {2026},
howpublished = {\url{https://pith.science/paper/Y3LW6FKN}},
note = {Machine review of arXiv:2606.03548}
}
read the original abstract
We study the robustness of AMM-based on-chain price oracles to strategic manipulation. An attacker trades against constant product automated market makers (CPMMs) to distort an on-chain oracle, arbitrageurs restore cross-pool and cross-venue consistency, and an oracle designer chooses how to aggregate pool quotes. Taking an efficient-market-hypothesis (EMH) view of the off-chain "true" price, we define the \emph{cost of manipulation} as the minimal mark-to-market loss that an attacker must incur to move the oracle by a given multiplicative factor. For independent CPMMs, we derive closed-form single-pool manipulation formulas and solve the attacker-designer game for weighted means and weighted medians, showing that liquidity weights maximize the minimum cost of manipulation within these classes for weighted medians (for any distortion level) and, for weighted means, locally as the distortion tends to zero. For larger distortions, weighted means become more fragile: optimal weights can depend on the target distortion and no single choice is uniformly optimal across distortion levels. In a frictionless CPMM model with cross-pool arbitrage, the manipulation cost depends only on the total quote depth and coincides across symmetric aggregators. We extend this framework to multi-asset star architectures, confirming that liquidity weights remain optimal in the same sense. Finally, we bridge theory and practice by incorporating dwell times and rate limits, providing a quantitative yardstick to size oracles against the explicit economic costs of attack.
Figures
Reference graph
Works this paper leans on
-
[1]
A. Adams. Uniswap v3 TWAP oracles in proof of stake.SSRN Working Paper 4384409, 2022
2022
-
[2]
Adams et al
H. Adams et al. Uniswap v2 core. Whitepaper, 2020
2020
-
[3]
Adams et al
H. Adams et al. Uniswap v3 core. Whitepaper, 2021
2021
-
[4]
Theimpactofmarketconditionsandfeealgorithms on the design of a competitive AMM
AlgebraFinanceResearchTeam. Theimpactofmarketconditionsandfeealgorithms on the design of a competitive AMM. Whitepaper, 2022
2022
-
[5]
Allouche, M
M. Allouche, M. Echenim, E. Gobet, and A.-C. Maurice. Statistical error bounds for weighted mean and median, with application to robust aggregation of cryptocurrency data. Preprint, 2024
2024
-
[6]
Angeris and T
G. Angeris and T. Chitra. Improved price oracles: Constant function market makers. InProceedings of the 2nd ACM Conference on Advances in Financial Technologies, pages 80–91. ACM, 2020
2020
-
[7]
Angeris, T
G. Angeris, T. Diamandis, M. Resnick, and T. Chitra. Optimal routing for constant function market makers. InProceedings of the 23rd ACM Conference on Economics and Computation. ACM, 2022
2022
-
[8]
A. T. Aspembitova et al. Oracles in decentralized finance: Attack costs, profits and mitigation.Applied Sciences, 12(24), 2022
2022
Show all 29 references
-
[9]
Bergault et al
P. Bergault et al. Automated market makers: Mean-variance analysis of LPs.arXiv preprint arXiv:2212.00336, 2022
2022
-
[10]
Boe et al
J. Boe et al. Safeguarding DeFi smart contracts against oracle deviations.Proceed- ings of the ACM on Programming Languages, 2024
2024
-
[11]
Cartea, F
Á. Cartea, F. Drissi, and M. Monga. Decentralised finance and automated market making.Journal of Economic Dynamics and Control, 2025
2025
-
[12]
Cartea, F
Á. Cartea, F. Drissi, and M. Monga. Decentralised finance and automated market making: Predictable loss and optimal liquidity provision.Journal of Economic Dynamics and Control, 2025. Forthcoming; see also arXiv:2309.08431
2025
-
[13]
Blockmanipulation:Marketriskofuniswapv3TWAPoracles
ChaosLabs. Blockmanipulation:Marketriskofuniswapv3TWAPoracles. Research report, 2023
2023
-
[14]
X. Deng, S. M. Beillahi, H. Du, P. Tiwari, and A. Veneris. Analysis of defi oracles. Staff Discussion Paper 2024-10, Bank of Canada, 2024
2024
-
[15]
Gansäuer et al
R. Gansäuer et al. Price oracle accuracy across blockchains. InProceedings of CAA W 2025, 2025
2025
-
[16]
F. R. Hampel. Robust statistics: A brief introduction and overview.Allgemeines Statistisches Archiv, 85(1):1–18, 2001
2001
-
[17]
P. J. Huber.Robust Statistics. John Wiley & Sons, New York, 1981
1981
-
[18]
Luu et al
Q. Luu et al. OVer: A framework for safeguarding DeFi smart contracts against oracle deviations. InProceedings of the Web Conference, 2024
2024
-
[19]
R. A. Maronna, R. D. Martin, and V. J. Yohai.Robust Statistics: Theory and Methods. John Wiley & Sons, Chichester, 2006
2006
-
[20]
M. Nadler. Blockchain price oracles: Accuracy and violation recovery.Finance Research Letters, 2025
2025
-
[21]
K. Qin, L. Zhou, B. Livshits, and A. Gervais. Attacking the DeFi ecosystem with flash loans for fun and profit. InProceedings of the 3rd ACM Conference on Advances in Financial Technologies, 2021
2021
-
[22]
SIXGroup.SIX Crypto Indices: Real-Time Median and Real-Time Volume-Weighted Median Methodology, 2020
2020
-
[23]
Sterrett and A
A. Sterrett and A. Adams. A microstructure analysis of coupling in CFMMs.arXiv preprint arXiv:2510.06095, 2025. Cost of Manipulation in AMM-Based Oracles 17
2025
-
[24]
Yang et al
W. Yang et al. Flash loan attack is more than just price oracle manipulation.arXiv preprint arXiv:2105.XXX, 2021
2021
-
[25]
Yang et al
X. Yang et al. Closed-form solutions for genericn-token AMM arbitrage.arXiv preprint arXiv:2402.06731, 2024
2024
-
[26]
Zhang, E
F. Zhang, E. Cecchetti, K. Croman, A. Juels, and E. Shi. A first look into DeFi oracles. InProceedings of the IEEE Security and Privacy Workshops, 2020
2020
-
[27]
Y. Zhao, X. Kang, T. Li, C.-K. Chu, and H. Wang. Towards trustworthy defi oracles: Past, present and future.arXiv preprint arXiv:2201.02358, 2022. A Sustained Manipulation and Protocol Constraints The one-step cost of manipulation considered above abstracts away from timing an...
2022
-
[28]
for each asset a, liquidity weights w⋆ a,i ∝y (0) a,i maximize the leading-order (second-order inεa) term ofCosta(1 + εa; wa,·)when Aa is a weighted mean, and
-
[29]
maximizeCost a(ra;w a,·)for anyr a ≥1whenA a is a weighted median Moreover, the star architecture decouples assets, so the minimal total cost to distort the vector(ˆpa)a̸=0 by factorsr a equalsPM a=1 Costa(ra;w ⋆ a,·). Proof. Throughout, assets are indexed by a∈ { 1, . . . , M...
Reviewed June 28, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.