Abstract
Miner Extractable Value (MEV) refers to excess value captured by miners (or validators) from users in a cryptocurrency network. This excess value often comes from reordering users’ transactions to maximize fees or from inserting new transactions that front-run users’ transactions. One of the most common types of MEV involves a ‘sandwich attack’ against a user trading on a constant function market maker (CFMM), which is a popular class of decentralized exchange. We analyze game theoretic properties of MEV in CFMMs that we call routing MEV, where an aggregate user trade is routed over a network and potentially sandwich attacked. We present examples where the existence of routing MEV both degrades and, counterintuitively, improves the quality of routing. We construct an analogue of the price of anarchy for this setting and demonstrate that if the impact of a sandwich attack is localized in a suitable sense, then the price of anarchy is constant (The code for all the numerical experiments in this paper can be found at this link: https://github.com/tjdiamandis/mev-cfmm).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Angeris, G., Agrawal, A., Evans, A., Chitra, T., Boyd, S.: Constant function market makers: multi-asset trades via convex optimization. In: Tran, D.A., Thai, M.T., Krishnamachari, B. (eds.) Handbook on Blockchain. SOIA, vol. 194, pp. 415–444. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-07535-3_13
Angeris, G., Chitra, T., Evans, A.: When does the tail wag the dog? Curvature and market making. Cryptoeconomic Syst. 2(1) (2022)
Angeris, G., Evans, A., Chitra, T.: A note on bundle profit maximization (2021)
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 2022, pp. 115–128. Association for Computing Machinery, New York (2022). https://doi.org/10.1145/3490486.3538336. ISBN 9781450391504
Babel, K., Daian, P., Kelkar, M., Juels, A.: Clockwork finance: automated analysis of economic security in smart contracts. arXiv preprint arXiv:2109.04347 (2021)
Bartoletti, M., Chiang, J.H., Lluch-Lafuente, A.: A theory of automated market makers in DeFi. In: Damiani, F., Dardha, O. (eds.) COORDINATION 2021. LNCS, vol. 12717, pp. 168–187. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-78142-2_11
Bartoletti, M., Chiang, J.H., Lluch-Lafuente, A.: Maximizing extractable value from automated market makers. arXiv preprint arXiv:2106.01870 (2021)
Daian, P., et al.: Flash boys 2.0: frontrunning, transaction reordering, and consensus instability in decentralized exchanges. arXiv:1904.05234 [cs] (2019)
Diamandis, T., Resnick, M., Chitra, T., Angeris, G.: An efficient algorithm for optimal routing through constant function market makers. arXiv preprint arXiv:2302.04938 (2023)
Flashbots Team. MEV explore (2022)
Goyal, M., Ramseyer, G., Goel, A., Mazières, D.: Finding the right curve: optimal design of constant function market makers. In: Proceedings of the 24th ACM Conference on Economics and Computation, pp. 783–812 (2023)
Heimbach, L., Wattenhofer, R.: Eliminating sandwich attacks with the help of game theory. arXiv preprint arXiv:2202.03762 (2022)
Kulkarni, K., Diamandis, T., Chitra, T.: Towards a theory of maximal extractable value I: constant function market makers. arXiv preprint arXiv:2207.11835 (2022)
CoW Protocol. Cow protocol overview (2022). https://docs.cow.fi/
Qin, K., Zhou, L., Gervais, A.: Quantifying blockchain extractable value: how dark is the forest? arXiv preprint arXiv:2101.05511 (2021)
Qin, K., Zhou, L., Livshits, B., Gervais, A.: Attacking the DeFi ecosystem with flash loans for fun and profit. arXiv preprint arXiv:2003.03810 (2020)
Roughgarden, T.: Intrinsic robustness of the price of anarchy. J. ACM (JACM) 62(5), 1–42 (2015)
Roughgarden, T.: Selfish Routing and the Price of Anarchy. MIT Press, Cambridge (2005)
Roughgarden, T.: Selfish routing with atomic players. In: Proceedings of the 16th Symposium on Discrete Algorithms (SODA), pp. 1184–1185. Citeseer (2004)
Roughgarden, T., Syrgkanis, V., Tardos, E.: The price of anarchy in auctions. J. Artif. Intell. Res. 59, 59–101 (2017)
Schlegel, J.C., Kwaśnicki, M., Mamageishvili, A.: Axioms for constant function market makers. Available at SSRN (2022)
Zhou, L., Qin, K., Gervais, A.: A2MM: mitigating frontrunning, transaction reordering and consensus instability in decentralized exchanges. arXiv preprint arXiv:2106.07371 (2021)
Züst, P., Nadahalli, T., Wattenhofer, Y.W.R.: Analyzing and preventing sandwich attacks in Ethereum. ETH Zürich (2021)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Kulkarni, K., Diamandis, T., Chitra, T. (2024). Routing MEV in Constant Function Market Makers. In: Garg, J., Klimm, M., Kong, Y. (eds) Web and Internet Economics. WINE 2023. Lecture Notes in Computer Science, vol 14413. Springer, Cham. https://doi.org/10.1007/978-3-031-48974-7_26
Download citation
DOI: https://doi.org/10.1007/978-3-031-48974-7_26
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-48973-0
Online ISBN: 978-3-031-48974-7
eBook Packages: Computer ScienceComputer Science (R0)