IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2502.08258.html
   My bibliography  Save this paper

Marginal Price Optimization

Author

Listed:
  • 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.

Suggested Citation

  • Stefan Loesch & Mark Bentley Richardson, 2025. "Marginal Price Optimization," Papers 2502.08258, arXiv.org.
  • Handle: RePEc:arx:papers:2502.08258
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2502.08258
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Stefan Loesch, 2022. "The Quantitative Finance Aspects of Automated Market Markers in DeFi," Papers 2212.10974, arXiv.org.
    2. Guillermo Angeris & Tarun Chitra & Alex Evans & Stephen Boyd, 2022. "Optimal Routing for Constant Function Market Makers," Papers 2204.05238, arXiv.org.
    3. Stefan Loesch & Nate Hindman & Mark B Richardson & Nicholas Welch, 2021. "Impermanent Loss in Uniswap v3," Papers 2111.09192, arXiv.org.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Philippe Bergault & Louis Bertucci & David Bouba & Olivier Gu'eant, 2022. "Automated Market Makers: Mean-Variance Analysis of LPs Payoffs and Design of Pricing Functions," Papers 2212.00336, arXiv.org, revised Nov 2023.
    2. Viraj Nadkarni & Sanjeev Kulkarni & Pramod Viswanath, 2024. "Adaptive Curves for Optimally Efficient Market Making," Papers 2406.13794, arXiv.org.
    3. Matteo Aquilina & Sean Foley & Leonardo Gambacorta & William Krekel, 2024. "Decentralised dealers? examining liquidity provision in decentralised exchanges," BIS Working Papers 1227, Bank for International Settlements.
    4. Arman Abgaryan & Utkarsh Sharma, 2023. "Dynamic Function Market Maker," Papers 2307.13624, arXiv.org.
    5. Lioba Heimbach & Eric Schertenleib & Roger Wattenhofer, 2022. "Exploring Price Accuracy on Uniswap V3 in Times of Distress," Papers 2208.09642, arXiv.org, revised Nov 2022.
    6. Matheus V. X. Ferreira & David C. Parkes, 2022. "Credible Decentralized Exchange Design via Verifiable Sequencing Rules," Papers 2209.15569, arXiv.org, revised Apr 2023.
    7. Estelle Sterrett & Waylon Jepsen & Evan Kim, 2022. "Replicating Portfolios: Constructing Permissionless Derivatives," Papers 2205.09890, arXiv.org, revised Jun 2022.
    8. Sebastian Jaimungal & Yuri F. Saporito & Max O. Souza & Yuri Thamsten, 2023. "Optimal Trading in Automatic Market Makers with Deep Learning," Papers 2304.02180, arXiv.org.
    9. Samuel Cohen & Marc Sabat'e Vidales & David v{S}iv{s}ka & {L}ukasz Szpruch, 2023. "Inefficiency of CFMs: hedging perspective and agent-based simulations," Papers 2302.04345, arXiv.org.
    10. Kshitij Kulkarni & Theo Diamandis & Tarun Chitra, 2022. "Towards a Theory of Maximal Extractable Value I: Constant Function Market Makers," Papers 2207.11835, arXiv.org, revised Apr 2023.
    11. Srisht Fateh Singh & Panagiotis Michalopoulos & Andreas Veneris, 2024. "Deeper: A shared liquidity decentralized exchange design for low trading volume tokens to enhance average liquidity," International Journal of Network Management, John Wiley & Sons, vol. 34(4), July.
    12. Marcello Monga, 2024. "Automated Market Making and Decentralized Finance," Papers 2407.16885, arXiv.org.
    13. Haonan Xu & Alessio Brini, 2025. "Improving DeFi Accessibility through Efficient Liquidity Provisioning with Deep Reinforcement Learning," Papers 2501.07508, arXiv.org.
    14. Agostino Capponi & Ruizhe Jia & Brian Zhu, 2023. "The Paradox Of Just-in-Time Liquidity in Decentralized Exchanges: More Providers Can Sometimes Mean Less Liquidity," Papers 2311.18164, arXiv.org, revised Feb 2024.
    15. Maxim Bichuch & Zachary Feinstein, 2024. "DeFi Arbitrage in Hedged Liquidity Tokens," Papers 2409.11339, arXiv.org, revised Dec 2024.
    16. Shen-Ning Tung & Tai-Ho Wang, 2024. "A mathematical framework for modelling CLMM dynamics in continuous time," Papers 2412.18580, arXiv.org.
    17. Matthew Willetts & Christian Harrington, 2024. "Rebalancing-versus-Rebalancing: Improving the fidelity of Loss-versus-Rebalancing," Papers 2410.23404, arXiv.org.
    18. Robin Fritsch & Samuel Kaser & Roger Wattenhofer, 2022. "The Economics of Automated Market Makers," Papers 2206.04634, arXiv.org.
    19. Guillermo Angeris & Tarun Chitra & Theo Diamandis & Alex Evans & Kshitij Kulkarni, 2023. "The Geometry of Constant Function Market Makers," Papers 2308.08066, arXiv.org.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2502.08258. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.