RFP: Dynamic CFMMs
Many of the most popular decentralized exchanges, including Uniswap, Curve, and Balancer are implemented as constant function market makers (CFMMs), and history suggests that CFMMs work quite well in practice. CFMMS are mathematically simple to model and practically easy to implement: a CFMM is simply a contract that checks that a certain (fixed) function, called the trading function, is not decreasing after a trade is made. While this framework is surprisingly flexible, it does not include some important special cases.
One possible direct extension is to, instead, allow the trading function itself to change with respect to time. For example, a Replicating Market Maker for a Black–Scholes covered call, has a trading function that changes as the call gets closer to expiry. Alternatively, the trading function could also change based on the trades that have been made. Either case greatly expands the space of possible mechanisms, but with a caveat: while CFMMs seem to universally work well in practice, we know of no consistent framework to evaluate these dynamic CFMMs, except on a case-by-case basis. This RFP seeks researchers who are interested in building and validating such a framework.
Background
We assume familiarity with CFMMs, or constant function market makers and the effect of fees on these. In particular, we assume some familiarity with the basic results and definitions given in the papers below.
General references for CFMMs are the following three papers:
- Constant Function Market Makers: Multi-Asset Trades via Convex Optimization
- Replicating Market Makers
- The Geometry of Constant Function Market Makers
On arbitrage profits in CFMMs in the presence of fees:
- Optimal Fees for Geometric Mean Market Makers
- Automated Market Making and Arbitrage Profits in the Presence of Fees
- An arbitrage driven price dynamics of Automated Market Makers in the presence of fees
Problem statement
In the most general setting, we allow the trading function of a CFMM to change (arbitrarily, potentially in a way that depends on the current state and trade) at some, say, fixed time periods. The question: what conditions on this change must hold so that (a) liquidity providers do not lose money (or, lose very little) to arbitrageurs and (b) these markets not easily-manipulated by external players.
For example, one might be able to prove these properties under a smoothness condition. Under a certain continuous price process, if the trading function changes from f to f’ in such a way that ||f - f’|| ≤ C, for some constant C and norm || ||, then the amount of arbitrage available is always very small. (Equivalently, this condition might be phrased in terms of the reachable set of reserves.) We note that usually answering question (a) will at least lead to a partial answer on question (b), though the latter might require stronger assumptions.
We would expect a parsimonious framework to be able to easily answer the following questions:
- What mechanisms for changing the trading function in time are “acceptable” in that they cause only (very) small losses for LPs, potentially in some limit? (Clearly, we know that a constant is acceptable, so this set is nonempty.)
- What mechanisms are not acceptable? Is there a gap between the two? Under what limits (on the price process, smoothness, frequency of updates, etc.) does this gap make sense?
- How does the LP position evolve with respect to time (under potentially some assumptions on the price process and/or the frequency of arbitrage)? How does it compare to the ‘naive’ version where arbitrage profits approach zero as the arbitrage becomes continuous?
Any paper explaining and showing this framework should probably include a few of the following points:
- simulations showing the results hold in certain limits;
- certain constructions of achievable mechanisms that were previously not known (but are, ideally, practically useful) (e.g., certain convex payoffs or mechanisms that are “sharper” than the Black–Scholes payoff for a covered call);
- an explanation of how this might be replicated via a trading strategy and how the payoff compares (i.e., is it a rebalancing portfolio of some form?).
Places to start
The above papers and their frameworks for analysis are both good starting places: we suspect a basic modification of these frameworks to the dynamic setting probably suffices. Additionally, we suspect simulations under a variety of settings probably yield very good intuitions for what conditions we might expect to need from the functions, their update rules, and the price process.‘