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.
翻译:恒定函数做市商(CFMMs)是创建交易市场的工具,已在预测市场中得到有效部署,目前在去中心化金融生态系统中尤为突出。我们证明,对于任何关于未来资产价格的信念集合,存在一个最优的CFMM交易函数,能够最大化CFMM可结算的交易比例。我们构建了一个凸规划来计算这一最优交易函数。因此,该规划为做市商提供了一种可行的框架,将其对基础资产未来价格的信念函数整合到资本效率最大化的CFMM交易函数中。我们的凸优化框架进一步扩展,以捕捉费用收入、套利损失和流动性提供者机会成本之间的权衡。对规划的分析表明,利润与亏损的考量如何导致性质不同的最优交易函数。我们的模型还解释了实践中出现的CFMM设计的多样性。我们证明,对凸规划进行仔细分析能够推断做市商对未来资产价格的信念,并且这些信念反映了几种广泛使用的CFMM的普遍直觉。开发该规划需要定义CFMM流动性这一新概念,其核心技术挑战在于分析无限维Banach空间上优化的KKT条件。