[Paper Review] Finding the Right Curve: Optimal Design of Constant Function Market Makers
This paper proposes a convex optimization framework that translates a liquidity provider's beliefs about future asset prices into an optimal Constant Function Market Maker (CFMM) trading function, maximizing trade settlement probability. The key contribution is a unified, tractable method to design capital-efficient CFMMs that balance fee revenue, divergence loss, and opportunity costs, explaining real-world CFMM designs through inferred market beliefs.
Constant Function Market Makers (CFMMs) are a tool for creating exchange markets, have been deployed effectively in prediction markets, and are now especially prominent in the Decentralized Finance ecosystem. We show that for any set of beliefs about future asset prices, an optimal CFMM trading function exists that maximizes the fraction of trades that a CFMM can settle. We formulate a convex program to compute this optimal trading function. This program, therefore, gives a tractable framework for market-makers to compile their belief function on the future prices of the underlying assets into the trading function of a maximally capital-efficient CFMM. Our convex optimization framework further extends to capture the tradeoffs between fee revenue, arbitrage loss, and opportunity costs of liquidity providers. Analyzing the program shows how the consideration of profit and loss leads to a qualitatively different optimal trading function. Our model additionally explains the diversity of CFMM designs that appear in practice. We show that careful analysis of our convex program enables inference of a market-maker's beliefs about future asset prices, and show that these beliefs mirror the folklore intuition for several widely used CFMMs. Developing the program requires a new notion of the liquidity of a CFMM, and the core technical challenge is in the analysis of the KKT conditions of an optimization over an infinite-dimensional Banach space.
Motivation & Objective
- To develop a systematic, mathematically rigorous method for designing CFMMs that optimally reflect a liquidity provider's beliefs about future asset prices.
- To unify the design of CFMMs under diverse objectives, including maximizing trade settlement, fee revenue, and minimizing divergence loss.
- To explain the diversity of existing CFMM designs (e.g., Uniswap, LMSR) by inferring the underlying market beliefs they encode.
- To provide a computable framework for liquidity providers to optimize both capital efficiency and profit, accounting for arbitrage risk and rebalancing costs.
- To formalize a new notion of CFMM liquidity in infinite-dimensional Banach space, enabling rigorous analysis of KKT conditions.
Proposed method
- Formulates a convex program that computes the optimal CFMM trading function based on a joint belief distribution over future asset prices.
- Introduces a novel definition of CFMM liquidity as a function over the exchange rate, enabling optimization in an infinite-dimensional space.
- Uses KKT conditions analysis to derive optimality conditions for the infinite-dimensional optimization problem.
- Models fee revenue and divergence loss as components of a composite objective function, allowing trade-off analysis.
- Applies the framework to derive optimal liquidity allocations that shift away from current exchange rates when divergence loss is considered.
- Employs a transformation of the trading function to express the problem in terms of the price ratio, simplifying the optimization.
Experimental results
Research questions
- RQ1What is the optimal CFMM trading function that maximizes the expected fraction of trades settled, given a liquidity provider’s beliefs about future asset prices?
- RQ2How can a CFMM design be optimized to balance fee revenue against divergence loss and opportunity cost?
- RQ3What beliefs about future price dynamics underlie widely used CFMMs such as Uniswap’s x*y and the LMSR?
- RQ4How does the inclusion of divergence loss alter the optimal liquidity allocation compared to a fee-only objective?
- RQ5Can the framework be used to infer a market-maker’s beliefs from observing a given CFMM’s trading function?
Key findings
- A unique optimal CFMM trading function exists for any given belief distribution over future asset prices, maximizing the expected fraction of trades that can be settled.
- The optimal liquidity allocation shifts away from the current exchange rate when divergence loss is accounted for, reducing exposure to large price movements.
- The framework can compute profit-maximizing liquidity allocations by balancing fee revenue against expected divergence loss through a convex optimization problem.
- The model explains real-world CFMM designs: Uniswap’s x*y function corresponds to a belief of log-normal price ratios, while LMSR corresponds to a belief of exponential price decay.
- The optimization framework reveals that practitioners’ informal intuitions about CFMM design align with formal belief structures derived from the model.
- The core technical contribution is a rigorous analysis of KKT conditions in an infinite-dimensional Banach space, enabling the derivation of optimal liquidity functions.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.