Paper: arXiv 2502.08258

Authors: Stefan Loesch, Mark Bentley Richardson

Abstract

We introduce a new framework for optimal routing and arbitrage in AMM driven markets. This framework improves on the original best-practice convex optimization by restricting the search to the boundary of the optimal space. We can parameterize this boundary using a set of prices, and a potentially very high dimensional optimization problem (2 optimization variables per curve) gets reduced to a much lower dimensional root finding problem (1 optimization variable per token, regardless of the number of the curves). Our reformulation is similar to the dual problem of a reformulation of the original convex problem. We show our reformulation of the problem is equivalent to the original formulation except in the case of infinitely concentrated liquidity, where we provide a suitable approximation. Our formulation performs far better than the original one in terms of speed - we obtain an improvement of up to 200x against Clarabel, the new CVXPY default solver - and robustness, especially on levered curves.

Complexity vs Empirical Score

  • Math Complexity: 7.5/10
  • Empirical Rigor: 6.0/10
  • Quadrant: Holy Grail — high math complexity, high empirical rigor

Why this score: The paper provides a strong theoretical and mathematical foundation for Marginal Price Optimization in AMMs, proving equivalence to standard convex formulations while solving convergence issues on levered curves. The empirical section provides practical benchmarking against CVXPY/Clarabel showing massive speed improvements (up to 200x), though backtesting on historical market data is light.

Research Flowchart

  flowchart TD
    A[Goal: Optimize AMM Routing & Arbitrage] --> B[Input: Tokens & Curve Liquidity Parameters]
    B --> C[Method: Reformulate Convex Dual Problem via Marginal Prices]
    C --> D[Process: Reduce Variables from 2/Curve to 1/Token Root-Finding]
    D --> E[Outcome: Up to 200x Faster vs Clarabel & Improved Robustness]