Optimal Routing across Constant Function Market Makers with Gas Fees
Carlos Escudero, Felipe Lara, Miguel Sama

TL;DR
This paper develops a mathematical framework for optimal trade routing in decentralized exchanges with constant function market makers, accounting for fixed gas fees and heterogeneous pools, extending existing models to more realistic on-chain costs.
Contribution
It introduces a mixed-integer optimization model with necessary and sufficient optimality conditions, accommodating non-convex invariant functions and fixed gas fees in routing problems.
Findings
Derived explicit optimality conditions linking prices, fees, and activation thresholds.
Established bounds on utility loss due to model relaxation.
Extended mathematical theory for routing in fragmented markets with gas fees.
Abstract
We study the optimal routing problem in decentralized exchanges built on Constant Function Market Makers when trades can be split across multiple heterogeneous pools and execution incurs fixed on-chain costs (gas fees). While prior routing formulations typically abstract from fixed activation costs, real on-chain execution presents non-negligible gas fees. They also become convex under concavity/convexity assumptions on the invariant functions. We propose a general optimization framework that allows differentiable invariant functions beyond global convexity and incorporates fixed gas fees through a mixed-integer model that induces activation thresholds. Subsequently, we introduce a relaxed formulation of this model, whereby we deduce necessary optimality conditions, obtaining an explicit Karush-Kuhn-Tucker system that links prices, fees, and activation. We further establish sufficient…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsGame Theory and Applications · Process Optimization and Integration · Optimization and Variational Analysis
