RediSwap: MEV Redistribution Mechanism for CFMMs (2410.18434v1)
Abstract: Automated Market Makers (AMMs) are essential to decentralized finance, offering continuous liquidity and enabling intermediary-free trading on blockchains. However, participants in AMMs are vulnerable to Maximal Extractable Value (MEV) exploitation. Users face threats such as front-running, back-running, and sandwich attacks, while liquidity providers (LPs) incur the loss-versus-rebalancing (LVR). In this paper, we introduce RediSwap, a novel AMM designed to capture MEV at the application level and refund it fairly among users and liquidity providers. At its core, RediSwap features an MEV-redistribution mechanism that manages arbitrage opportunities within the AMM pool. We formalize the mechanism design problem and the desired game-theoretical properties. A central insight underpinning our mechanism is the interpretation of the maximal MEV value as the sum of LVR and individual user losses. We prove that our mechanism is incentive-compatible and Sybil-proof, and demonstrate that it is easy for arbitrageurs to participate. We empirically compared RediSwap with existing solutions by replaying historical AMM trades. Our results suggest that RediSwap can achieve better execution than UniswapX in 89% of trades and reduce LPs' loss to under 0.5% of the original LVR in most cases.
- P. Daian, S. Goldfeder, T. Kell, Y. Li, X. Zhao, I. Bentov, L. Breidenbach, and A. Juels, “Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability,” in 2020 IEEE symposium on security and privacy (SP ’20). IEEE, 2020, pp. 910–927.
- K. Qin, L. Zhou, and A. Gervais, “Quantifying Blockchain Extractable Value: How dark is the forest?” in 2022 IEEE Symposium on Security and Privacy (SP ’22). IEEE, 2022, pp. 198–214.
- C. F. Torres, R. Camino et al., “Frontrunner Jones and the Raiders of the Dark Forest: An Empirical Study of Frontrunning on the Ethereum Blockchain,” in 30th USENIX Security Symposium (USENIX Security ’21), 2021, pp. 1343–1359.
- L. Zhou, K. Qin, C. F. Torres, D. V. Le, and A. Gervais, “High-Frequency Trading on Decentralized On-Chain Exchanges,” in 2021 IEEE Symposium on Security and Privacy (SP ’21). IEEE, 2021, pp. 428–445.
- J. Milionis, C. C. Moallemi, T. Roughgarden, and A. L. Zhang, “Automated Market Making and Loss-Versus-Rebalancing,” arXiv preprint arXiv:2208.06046, 2022.
- Flashbots, “MEV-Share,” https://docs.flashbots.net/flashbots-protect/mev-share/, 2024, accessed: 2024-10-08.
- MEV Blocker, “MEV Blocker,” https://mevblocker.io/, 2023, accessed: 2024-10-08.
- CoW DAO, “CoW Protocol Documentation,” https://docs.cow.fi/cow-protocol, 2022, accessed: 2024-10-05.
- C. Protocol, “MEV Blocker,” https://dune.com/cowprotocol/mev-blocker, 2023, accessed: 2024-10-10.
- Uniswap, “UniswapX Overview,” https://docs.uniswap.org/contracts/uniswapx/overview, 2023, accessed: 2024-10-05.
- A. Adams, C. Moallemi, S. Reynolds, and D. Robinson, “am-AMM: An Auction-Managed Automated Market Maker,” arXiv preprint arXiv:2403.03367, 2024.
- Josojo, “MEV capturing AMM (McAMM),” 2022, accessed: 2024-10-08. [Online]. Available: https://ethresear.ch/t/mev-capturing-amm-mcamm/13336
- R. Fritsch and A. Canidio, “Measuring Arbitrage Losses and Profitability of AMM Liquidity,” in Companion Proceedings of the ACM on Web Conference (WWW ’24), 2024, pp. 1761–1767.
- J. Milionis, C. C. Moallemi, and T. Roughgarden, “The Effect of Trading Fees on Arbitrage Profits in Automated Market Makers,” in International Conference on Financial Cryptography and Data Security (FC ’23). Springer, 2023, pp. 262–265.
- G. Angeris and T. Chitra, “Improved Price Oracles: Constant Function Market Makers,” in Proceedings of the 2nd ACM Conference on Advances in Financial Technologies (AFT ’20), 2020, pp. 80–91.
- L. Heimbach, V. Pahari, and E. Schertenleib, “Non-Atomic Arbitrage in Decentralized Finance,” in 2024 IEEE Symposium on Security and Privacy (SP ’24). IEEE Computer Society, 2024, pp. 224–224.
- Ethereum Foundation, “The Merge — ethereum.org,” 2024, accessed: 2024-10-10. [Online]. Available: https://ethereum.org/en/roadmap/merge/
- Sorella, “Sorella dashboard,” 2024, accessed: 2024-10-07. [Online]. Available: https://sorellalabs.xyz/dashboard
- G. Angeris, A. Evans, T. Chitra, and S. Boyd, “Optimal Routing for Constant Function Market Makers,” in Proceedings of the 23rd ACM Conference on Economics and Computation (EC ’22), 2022, pp. 115–128.
- D. Engel and M. Herlihy, “Composing Networks of Automated Market Makers,” in Proceedings of the 3rd ACM Conference on Advances in Financial Technologies (AFT ’23), 2021, pp. 15–28.
- L. Zhou, K. Qin, and A. Gervais, “A2MM: Mitigating Frontrunning, Transaction Reordering and Consensus Instability in Decentralized Exchanges,” arXiv preprint arXiv:2106.07371, 2021.
- G. Ramseyer, A. Goel, and D. Mazières, “SPEEDEX: A Scalable, Parallelizable, and Economically Efficient Decentralized EXchange,” in 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’23), 2023, pp. 849–875.
- M. Zhang, Y. Li, X. Sun, E. Chen, and X. Chen, “Computation of Optimal MEV in Decentralized Exchanges,” Working paper-https://mengqian-zhang.github.io/papers/batch.pdf, Tech. Rep., 2024.
- A. Canidio and R. Fritsch, “Batching Trades on Automated Market Makers,” in 5th Conference on Advances in Financial Technologies (AFT ’23). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2023.
- G. Ramseyer, M. Goyal, A. Goel, and D. Mazières, “Augmenting Batch Exchanges with Constant Function Market Makers,” arXiv preprint arXiv:2210.04929, 2022.
- M. V. Xavier Ferreira and D. C. Parkes, “Credible Decentralized Exchange Design via Verifiable Sequencing Rules,” in Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC ’23), 2023, pp. 723–736.
- T. Chan, K. Wu, and E. Shi, “Mechanism Design for Automated Market Makers,” arXiv preprint arXiv:2402.09357, 2024.
- S. Wadhwa, L. Zanolini, F. D’Amato, A. Asgaonkar, C. Fang, F. Zhang, and K. Nayak, “Data Independent Order Policy Enforcement: Limitations and Solutions,” Cryptology ePrint Archive, 2023.
- C. McMenamin and V. Daza, “An AMM minimizing user-level extractable value and loss-versus-rebalancing,” arXiv preprint arXiv:2301.13599, 2023.
- Flashbots, “Flashbots Protect Overview,” https://docs.flashbots.net/flashbots-protect/overview, 2024, accessed: 2024-10-20.
- M. Kelkar, F. Zhang, S. Goldfeder, and A. Juels, “Order-Fairness for Byzantine Consensus,” in 40th Annual International Cryptology Conference, (CRYPTO ’20). Springer, 2020, pp. 451–480.
- M. Kelkar, S. Deb, S. Long, A. Juels, and S. Kannan, “Themis: Fast, Strong Order-Fairness in Byzantine Consensus,” in Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security (CCS ’23), 2023, pp. 475–489.
- Y. Zhang, S. Setty, Q. Chen, L. Zhou, and L. Alvisi, “Byzantine Ordered Consensus without Byzantine Oligarchy,” in 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI ’20), 2020, pp. 633–649.
- C. Cachin, J. Mićić, N. Steinhauer, and L. Zanolini, “Quick Order Fairness,” in International Conference on Financial Cryptography and Data Security (FC ’22). Springer, 2022, pp. 316–333.
- S. Yang, F. Zhang, K. Huang, X. Chen, Y. Yang, and F. Zhu, “SoK: MEV Countermeasures: Theory and Practice,” arXiv preprint arXiv:2212.05111, 2022.
- T. Roughgarden, “Transaction Fee Mechanism Design,” in Proceedings of the 22nd ACM Conference on Economics and Computation (EC ’21), P. Biró, S. Chawla, and F. Echenique, Eds. ACM, 2021, p. 792. [Online]. Available: https://doi.org/10.1145/3465456.3467591
- M. Bahrani, P. Garimidi, and T. Roughgarden, “Transaction Fee Mechanism Design in a Post-MEV World,” in 6th Conference on Advances in Financial Technologies (AFT ’24), September 23-25, 2024, Vienna, Austria, ser. LIPIcs, R. Böhme and L. Kiffer, Eds., vol. 316. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024, pp. 29:1–29:24. [Online]. Available: https://doi.org/10.4230/LIPIcs.AFT.2024.29
- H. Chung, T. Roughgarden, and E. Shi, “Collusion-Resilience in Transaction Fee Mechanism Design,” arXiv preprint arXiv:2402.09321, 2024.
- Y. Gafni and A. Yaish, “Barriers to Collusion-resistant Transaction Fee Mechanisms,” arXiv preprint arXiv:2402.08564, 2024.
- J. Lenzi, “An Efficient and Sybil Attack Resistant Voting Mechanism,” arXiv preprint arXiv:2407.01844, 2024.
- W. Wang, L. Zhou, A. Yaish, F. Zhang, B. Fisch, and B. Livshits, “Mechanism Design for ZK-Rollup Prover Markets,” arXiv preprint arXiv:2404.06495, 2024.
- B. Mazorra and N. Della Penna, “Towards Optimal Prior-Free Permissionless Rebate Mechanisms, with applications to Automated Market Makers & Combinatorial Orderflow Auctions,” arXiv preprint arXiv:2306.17024, 2023.
- M. Bartoletti, J. H.-y. Chiang, and A. Lluch Lafuente, “Maximizing Extractable Value from Automated Market Makers,” in International Conference on Financial Cryptography and Data Security (FC ’22). Springer, 2022, pp. 3–19.
- Binance, “ETH Price,” 2024, accessed: 2024-10-05. [Online]. Available: https://www.binance.com/en/price/ethereum
- Binance, “Historical market data,” 2024, accessed: 2024-10-05. [Online]. Available: https://www.binance.com/en/landing/data
- D. Analytics, “DEX Trades Dataset,” https://dexanalytics.org/schemas/dex-trades, 2024, accessed: 2024-10-05.
- Dune Analytics. (2024) Dune. [Online]. Available: https://dune.com/
- B. C. Arnold, “Pareto distribution,” Wiley StatsRef: Statistics Reference Online, pp. 1–10, 2014.
- Etherscan, “Etherscan DEX,” https://etherscan.io/dex, 2024, accessed: 2024-10-17.
- V. Costan, “Intel SGX explained,” IACR Cryptol, EPrint Arch, 2016.
- Intel, “Intel Trust Domain Extensions (TDX) Documentation,” https://www.intel.com/content/www/us/en/developer/tools/trust-domain-extensions/documentation.html, 2023, accessed: 2024-10-23.
- Oracles and the new frontier for application-owned orderflow auctions - multicoin capital. [Online]. Available: https://multicoin.capital/2023/12/14/oracles-and-the-new-frontier-for-application-owned-orderflow-auctions/
- C. Protocol, “CowSwap Dashboard,” https://dune.com/cowprotocol/cowswap, 2024, accessed: 2024-10-08.