English

An Efficient Algorithm for Optimal Routing Through Constant Function Market Makers

Optimization and Control 2023-02-13 v1 Trading and Market Microstructure

Abstract

Constant function market makers (CFMMs) such as Uniswap have facilitated trillions of dollars of digital asset trades and have billions of dollars of liquidity. One natural question is how to optimally route trades across a network of CFMMs in order to ensure the largest possible utility (as specified by a user). We present an efficient algorithm, based on a decomposition method, to solve the problem of optimally executing an order across a network of decentralized exchanges. The decomposition method, as a side effect, makes it simple to incorporate more complicated CFMMs, or even include 'aggregate CFMMs' (such as Uniswap v3), into the routing problem. Numerical results show significant performance improvements of this method, tested on realistic networks of CFMMs, when compared against an off-the-shelf commercial solver.

Keywords

Cite

@article{arxiv.2302.04938,
  title  = {An Efficient Algorithm for Optimal Routing Through Constant Function Market Makers},
  author = {Theo Diamandis and Max Resnick and Tarun Chitra and Guillermo Angeris},
  journal= {arXiv preprint arXiv:2302.04938},
  year   = {2023}
}

Comments

To be presented at Financial Cryptography 2023

R2 v1 2026-06-28T08:36:27.741Z