Papers
Topics
Authors
Recent
Search
2000 character limit reached

Concave Continuation: Linking Routing to Arbitrage

Published 3 Apr 2026 in math.OC and q-fin.TR | (2604.02909v1)

Abstract: We extend AMM trade functions to negative inputs via the \textit{concave continuation}, derived from the invariance of the local conservation law under allocation direction flips. This unifies routing and arbitrage into a single problem. We extend the one-hop transfer algorithm proposed in \cite{jiang} to this setting.

Authors (2)

Summary

  • The paper presents concave continuation to extend AMM trade functions into negative input domains, thereby unifying routing and arbitrage under a single optimization framework.
  • It develops an extended transfer algorithm that ensures unique and robust on-chain computations with optimal convergence rates and prevents allocation sign-crossing.
  • Empirical evaluations via simulations and on-chain tests demonstrate significant runtime improvements and effective arbitrage capture in real-world DeFi environments.

Concave Continuation and the Unified Routing-Arbitrage Problem in AMMs

Introduction

The paper "Concave Continuation: Linking Routing to Arbitrage" (2604.02909) establishes a principled framework for extending Automated Market Maker (AMM) trade functions to negative input domains, formalizing this extension as "concave continuation." This analytic construction enables a unification of routing and arbitrage problems, treating arbitrage as a special case of routing where the net input size is zero. The work rigorously derives this result from the invariance of the local conservation law under directional flips in trade allocation, enabling efficient on-chain computation and algorithmic resolution using extended transfer algorithms.

Preliminaries and Trade Function Extension

AMMs in decentralized exchanges (DEXs) are characterized by concave trade functions mapping inputs of one token to outputs of another. The transfer algorithm for routing—initially restricted to non-negative allocations—iteratively equalizes pool prices to maximize output, leveraging marginal price alignment across AMMs. The foundational assumption includes first-order differentiability, strict monotonicity, strict concavity, no-free-lunch at zero input, and a change-of-numeraire condition.

Concave continuation analytically extends the trade function to negative inputs. For a given AMM trade function EX,Y(x)E_{X,Y}(x) (mapping input xx of token XX to output YY), the concave continuation for x<0x < 0 is defined as:

EX,Y(x)=(EY,X)1(x)E_{X,Y}(x) = -(E_{Y,X})^{-1}(-x)

where EY,X()E_{Y,X}(\cdot) is the reverse trade function. This extension is uniquely determined by the requirement that the local conservation law remains form-invariant under allocation direction flips. The analytic properties (monotonicity, concavity, and C1C^1 continuity at zero) guarantee the well-posedness of the extended trade function.

Routing-Arbitrage Unification

Standard AMM routing optimizes the allocation of given token input across pools to maximize output, subject to non-negativity constraints. With concave continuation, the optimization domain expands: allocations can now be negative up to the reserve size, allowing pools to both produce and consume output tokens. Formally, the routing-arbitrage problem is given by:

maxxF(x)=i=1NEX,Yi(xi)\max_{\mathbf{x}} F(\mathbf{x}) = \sum_{i=1}^N E_{X,Y}^i(x_i)

subject to xiRix_i \geq -R_i, xx0

where xx1 is the reserve of token xx2 in pool xx3 and xx4 corresponds to pure arbitrage.

The strictly concave objective ensures uniqueness of the solution, and the allocation domain and conservation law are linear, yielding a tractable optimization problem that generalizes both routing and arbitrage.

Extended Transfer Algorithm

The paper introduces an extended transfer algorithm tailored for routing-arbitrage. Initialization distributes token input greedily, maintaining legitimacy by allocating only to pools with minimum price, thereby avoiding "sign-crossing" that would preclude optimal convergence. The halving rule is adapted to respect the domain: for positive allocations, bisection occurs over xx5; for negative allocations, over xx6.

The runtime analysis proves several strong invariance properties:

  • Allocations once positive (or negative) remain so throughout the algorithm, preventing sign-crossing.
  • Pools with strictly positive or negative optimal allocation will never be assigned the opposite sign during execution.
  • The algorithm converges to the unique optimum and inherits optimal convergence rate xx7 from prior work, where xx8 is the number of pools and xx9 a liquidity-dependent parameter.

Empirical Evaluation

Comprehensive experiments validate the extended algorithm in simulated and real-world environments:

  • Python Simulation on Uniswap V2 Pools: The extended transfer algorithm matches convex optimization (CVXPY) outputs [angeris-routing], while consistently outperforming it in runtime (up to 22x faster for XX0).
  • Julia Simulation on Uniswap V3 Pools: The extended algorithm matches CFMMRouter.jl [diamandis-routing] in allocation and output across various pool sizes, again demonstrating superior execution speed.
  • On-chain Validation (Base Network): The algorithm is implemented on-chain using Uniswap V3 APIs, incurring reasonable gas costs. In equilibrium scenarios on heavily traded USDC/WETH pools, MEV and fees remove arbitrage, so concave continuation yields identical output to original routing. When induced price discrepancies are present, the algorithm captures significant arbitrage (XX149bps improvement, XX2 \$560), with lower gas usage.

Theoretical and Practical Implications

The formulation of concave continuation as a domain extension for trade functions provides an elegant, physically motivated analytic foundation for unified routing-arbitrage optimization in AMMs. By constraining the allocation process to avoid sign reversal, the extended transfer algorithm ensures robustness and optimality of allocation, even under repeated directional flips or arbitrage scenarios.

Practically, the algorithm's compatibility with on-chain computations (e.g., via Uniswap V3 APIs) allows for efficient exploitation of arbitrage and better routing in fragmented liquidity environments. The implementation demonstrates high efficiency, scalability, and applicability to real-world DeFi venues.

Theoretically, concave continuation enables a straightforward extension to multi-hop routing scenarios, although the correct assignment of trade direction and sign-flipping between intermediate tokens remains an open problem. Future research might generalize the algorithm to handle multi-token routing and dynamic liquidity, further improving capital efficiency and arbitrage detection in decentralized finance.

Conclusion

The paper rigorously constructs the concave continuation of AMM trade functions, unifying routing and arbitrage into a single concave optimization problem. The extended transfer algorithm is efficient, robust against allocation sign-crossing, and empirically validated both in simulation and on-chain contexts. The approach lays foundational groundwork for advanced routing protocols in DeFi, with direct implications for both practical arbitrage exploitation and theoretical optimization, and opens avenues for future multi-hop routing research in AMMs.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 1 like about this paper.