Augmenting Batch Exchanges with Constant Function Market Makers

2025-05-02 0 0 889.04KB 31 页 10玖币
侵权投诉
Augmenting Batch Exchanges with Constant Function Market
Makers
GEOFFREY RAMSEYER*, Stanford University, USA
MOHAK GOYAL*, Stanford University, USA
ASHISH GOEL, Stanford University, USA
DAVID MAZIÈRES, Stanford University, USA
Batch auctions are a classical market microstructure, acclaimed for their fairness properties, and have received
renewed interest in the context of blockchain-based nancial systems. Constant function market makers
(CFMMs) are another market design innovation praised for their computational simplicity. Liquidity provision
in batch exchanges is an important problem, and CFMMs have recently shown promise in being useful within
batch exchanges. Dierent real-world implementations have used fundamentally dierent approaches towards
integrating CFMMs in batch exchanges, and there is a lack of formal understanding of the trade-os of dierent
design choices.
We rst provide a minimal set of axioms that capture the well-accepted rules of batch exchanges and
CFMMs. For batch exchanges, these are asset conservation, uniform prices, and a best response for limit
orders. For CFMMs, our axiom is that their trading function is non-decreasing. Many market solutions may
satisfy all our axioms. We then describe several economically desirable properties of market solutions. These
include Pareto optimality for limit orders, price coherence of CFMMs (as a defence against cyclic arbitrage),
joint price discovery for CFMMs (as a defence against parallel running), path independence, and a locally
computable trade response of the CFMMs (to provide them with a predictable trade size given a market price).
For market solutions satisfying all our axioms, we show fundamental conicts between some pairs of desirable
properties. Most notably, a batch exchange cannot simultaneously guarantee ‘Pareto optimality’ for the limit
orders and any of ‘price coherence’ or ‘locally computable response’ for the CFMMs. We then provide two
ways of integrating CFMMs in batch exchanges, which attain dierent subsets of these properties.
We further provide a convex program for computing Arrow-Debreu exchange market equilibria when
all agents have weak gross substitute (WGS) demand functions on two assets – this program extends the
literature on Arrow-Debreu exchange markets and may be of independent interest.
CCS Concepts: Theory of computation
Market equilibria;Applied computing
Electronic
commerce.
Additional Key Words and Phrases: Batch Exchanges, Automated Market Makers, Market Equilibria
ACM Reference Format:
Georey Ramseyer*, Mohak Goyal*, Ashish Goel, and David Mazières. 2024. Augmenting Batch Exchanges
with Constant Function Market Makers. In Conference on Economics and Computation (EC ’24), July 8–11, 2024,
New Haven, CT, USA. ACM, New York, NY, USA, 31 pages. https://doi.org/10.1145/3670865.3673569
* denotes equal contribution.
Authors’ Contact Information: Georey Ramseyer*, Stanford University, Stanford, California, USA, geo.ramseyer@cs.
stanford.edu; Mohak Goyal*, Stanford University, Stanford, California, USA, mohakg@stanford.edu; Ashish Goel, Stanford
University, Stanford, California, USA, ashishg@stanford.edu; David Mazières, Stanford University, Stanford, California,
USA, .
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee
provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the
full citation on the rst page. Copyrights for components of this work owned by others than the author(s) must be honored.
Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires
prior specic permission and/or a fee. Request permissions from permissions@acm.org.
EC ’24, July 8–11, 2024, New Haven, CT, USA
©2024 Copyright held by the owner/author(s). Publication rights licensed to ACM.
ACM ISBN 979-8-4007-0704-9/24/07
https://doi.org/10.1145/3670865.3673569
arXiv:2210.04929v7 [cs.GT] 21 Jun 2024
Augmenting Batch Exchanges with Constant Function Market Makers EC ’24, July 8–11, 2024, New Haven, CT, USA
1 INTRODUCTION
A crucial component of any economic system is a structure to facilitate the exchange of assets.
Batch auctions (sometimes referred to as call auctions or call markets) are a market mechanism
that accumulates trade orders over time. At some frequency, the exchange operator computes a
uniform clearing price (the “batch price”) and settles all trades that are possible at that price. Batch
auctions have been a prominent market mechanism in academic literature, with models suggesting
that they can lead to better price discovery and reduce intermediation costs by enabling traders
to trade with each other directly at the same time[Cohen and Schwartz, 2001, Economides and
Schwartz, 2001, Madhavan, 1992, Schwartz, 2012].
There has been renewed interest in batch auctions following the work of Budish et al
.
[2015], who
propose using batch auctions to address the problem of competition on speed rather than on price
in continuous double auctions (CDA). Making every trade in a batch at the same price eliminates a
large fraction of front-running
1
opportunities [Budish et al
.
, 2015]. Critics of batch auctions argue
that they increase price uncertainty and reduce market liquidity, as liquidity providers who gain a
“speed tax” in CDAs have no incentive to participate in batch auctions [Dorre, 2020, Lee et al
.
, 2020,
Mizuta and Izumi, 2016].
While the applicability of batch auctions to traditional exchanges is still the subject of debate
and regulatory considerations, batch exchanges are especially attractive for cryptocurrencies since
blockchains inherently register trades in discrete-time ‘blocks’. Such systems have already been
deployed [cow, 2022, Penumbra, 2023]. Some batch exchanges, e.g., [cow, 2022, Ramseyer et al
.
,
2023], process a large number of assets in one batch, instead of just two assets, by computing in
every batch a set of arbitrage-free prices between every asset pair. This reduces the problem of
liquidity fragmentation, which is especially dicult in modern blockchains [Lehar et al
.
, 2022].
Furthermore, this allows users to directly trade from any asset to any other without holding some
intermediate asset (such as USD), unlike the exchanges that facilitate trades only in pairs of assets.
However, the computation of market equilibrium is substantially more dicult when many assets
are traded in a batch rather than just two.
Another recently developed tool for improving exchange performance on blockchains are Con-
stant Function Market Makers, a class of automated market-makers. Liquidity providers deposit
capital into a CFMM, and the CFMM constantly oers trades according to a predened trading
strategy. This strategy is specied by a “trading function”
𝑓
(
𝑥
)of its asset reserves
𝑥
(henceforth its
“state”), and the CFMM accepts a trade if the trading function’s value does not decrease on making
the trade. We describe CFMMs in detail in §1.1.1. CFMM-based decentralized exchanges (DEX) such
as Uniswap [Adams et al
.
, 2020, 2021] and Curve [Egorov, 2019] are some of the largest on-chain
trading platforms.
Since CFMMs are widely used in practice as relatively simple yet eective liquidity provision
tools in DeFi, we investigate the possibility of designing batch exchanges which support CFMMs
for liquidity. Previous works have chosen fundamentally dierent methods for mediating the
interaction [cow, 2022, Canidio and Fritsch, 2023], and it continues to be a problem of great
interest for practitioners. We study the trade-os between dierent desirable properties of batch
exchanges that support CFMMs. Importantly, we show that many natural desirable properties are
not simultaneously satisable, and therefore, we study the trade-os of dierent mechanisms.
1
Front-running is the practice of making a trade based on advance knowledge of an upcoming order. For example, a trader
can front-run a buy order for an asset by buying some of that asset, driving up its price, and then reselling the asset to the
buy order at the higher price. Such practices are partly curtailed by regulation in several markets but are still observed in
stock trading [Manahov, 2016] and are rampant in blockchain-based exchanges [Daian et al., 2020].
EC ’24, July 8–11, 2024, New Haven, CT, USA Georey Ramseyer*, Mohak Goyal*, Ashish Goel, and David Mazières
xAxB= 1: Constant Product
x2
AxB= 1: Weighted Product
xA+xB= 3: Constant Sum
Fig. 1. Examples of level sets of commonly studied CFMM trading
functions. X-axis and Y-axis denote the amounts of assets A and B
in the liquidity pool of the CFMM, respectively. Examples of spot
prices are illustrated by dashed lines. Where the trading function
is dierentiable, the negative slope of the tangent at a point gives
the spot price (Definition 1.1).
1.1 Preliminaries
1.1.1 Constant Function Market Makers. A CFMM is a market-making strategy parameterized by a
trading function
𝑓
:
R𝑛
0R>0,
where
𝑛
is the number of assets it trades in. At any time, the CFMM
owns non-negative amounts of some assets (its “reserves”) provided by deposits from investors
participating in liquidity provision (so-called “liquidity providers”). A CFMM with reserves
𝑥
and
function 𝑓accepts any trade that results in reserves 𝑧so long as 𝑓(𝑧)𝑓(𝑥).
Assumption 1. CFMM trading functions are strictly quasi-concave, dierentiable, nonnegative,
and nondecreasing (in every coordinate) on the positive orthant. 2
This assumption is standard in the literature and is important for the CFMM to be not obviously
exploitable [Angeris and Chitra, 2020, Schlegel and Mamageishvili, 2022]. Quasi-concavity ensures
that the prices are monotonic in the asset amounts.
The gradient of the trading function gives the price for a trade of innitesimal size.
Definition 1.1 (Spot Price). The spot price from asset
𝐴
to asset
𝐵
for a CFMM with trading
function 𝑓at state ˆ
𝑥is 𝜕𝑓
𝜕𝑥𝐴(ˆ
𝑥)/𝜕𝑓
𝜕𝑥𝐵(ˆ
𝑥).
We illustrate some examples of widely used CFMM trading functions in Figure 1 and give more
examples in Appendix A.
1.1.2 Arrow Debreu Exchange Markets. An Arrow Debreu market [Arrow and Debreu, 1954] is
used to model a pure exchange market, i.e., a market where a set of assets
A
are traded without
a designated numeraire or “money”. Assets are fungible, divisible and freely disposable. Agents
have quasi-concave and non-satiating utilities for the bundle of assets they consume and have an
initial endowment of assets. All trades happen at the same prices
{𝑝𝐴>
0
}𝐴A
, and asset amounts
remain conserved.
The following are examples of order types that a batch exchange may support.
Definition 1.2 (Limit Sell Order). A limit sell order (
𝐴, 𝐵, 𝑘 R>0, 𝑟 R0
), is an order to sell
up to
𝑘
units of asset
𝐴
for as many units of asset
𝐵
as possible, subject to receiving a minimum price
(the “limit price”) of 𝑟 𝐵 per 𝐴.
As a convention in the literature, limit sell orders are thought of as corresponding to the utility
function:
𝑢
(
𝑥
) =
𝑟𝑥𝐴
+
𝑥𝐵
. We also adopt this convention in this paper. Observe that the bundle
received by the limit order in a batch maximizes this utility function.
2
We can relax strict quasi-concavity to quasi-concavity and dierentiability to continuity for many of our results. However,
we use the strong form of the assumption in §2 for ease of exposition.
Augmenting Batch Exchanges with Constant Function Market Makers EC ’24, July 8–11, 2024, New Haven, CT, USA
Definition 1.3 (Market Sell Order). Limit sell orders with limit price 0are market sell orders.
Definition 1.4 (Limit Buy Order). A limit buy order is an order to purchase up to
𝑘
units of asset
𝐴by selling as few units of asset 𝐵as possible, subject to a maximum price of 𝑟 𝐵 per unit 𝐴.
Limit buy order can be seen as corresponding to the utility function: 𝑢(𝑥) = 𝑟𝑥𝐴+ min(𝑘, 𝑥𝐵).
1.2 System Model
In this work, we design a batch trading system where multiple CFMMs can interoperate and provide
liquidity to limit sell orders. The design specications of our model are as follows:
(1) A limit sell order3can be submitted or removed any time before a cuto for each next batch.
(2)
A CFMM participating in the batch exchange must submit its “state and trading function” to
the exchange before a cuto time for each next batch.
(3)
Between consecutive batches, the CFMMs may also be available for their standalone operation,
but need to be unchanged after submitting their state and trading function to the batch exchange
till the batch is executed.
We do not model the fee that the batch exchange operator and the CFMM charge. While fees
are essential to incentivize the liquidity providers to participate, we believe that our axiomatic
framework is important also in the presence of trading fees.
1.3 Our Results
To our knowledge, this is the rst paper to do an axiomatic and computational study of the important
problem of augmenting batch exchanges with CFMMs. We rst give a minimal set of axioms for
batch exchanges incorporating CFMMs. The details are in §2.
1.3.1 Axioms.
We require that a batch exchange neither burn nor mint any asset – asset amounts must be
conserved (Axiom 1). We also impose the core fairness property of batch exchanges that asset prices
exist in equilibrium, and no market participant receives a better trade than that implied by these
prices (Axiom 2). Further, all limit orders receive a trade which is a “best response” to the batch
prices (Axiom 3). The axiom about CFMMs is their basic design principle that their trading function
should not decrease due to trade (Axiom 4).
Axioms 1, 2, and 3 are simply an articulation of the core properties of batch exchanges which
we believe are well-accepted rules for designing exchange markets. Axiom 4 is a basic guarantee
required by all CFMM deployments. These axioms are minimal and do not impose a particular
solution. They allow a rich set of solution concepts with dierent economically useful properties,
which is this paper’s core subject of study.
We dene a market equilibrium (Denition 2.1) as a solution which satises Axioms 1, 2, 3, and 4.
At least one market equilibrium always exists, for example, where the CFMMs do not make any
trade and the set of limit sell orders trade as per a standard Arrow Debreu market.
1.3.2 Desirable Properties of Batch Exchange Market Equilibria. We now dene some desirable
properties of market equilibria. These properties then guide us in designing algorithms for nding
economically useful market equilibria.
(1) The rst property is Pareto optimality for the limit sell orders.
3
Limit buy orders correspond to additively separable, piecewise-linear concave utility functions and lead to PPAD-hardness
of equilibrium computation, as shown by Chen et al. [Chen et al
.
, 2009] – therefore, we do not support it. This, however,
does not make any signicant restriction since a trader who wants to buy A in exchange for B can instead place an order to
sell B for A.
EC ’24, July 8–11, 2024, New Haven, CT, USA Georey Ramseyer*, Mohak Goyal*, Ashish Goel, and David Mazières
(2)
Another property is price coherence (PC) of a group of CFMMs post-batch (Denition 3.4). PC is
a necessary and sucient condition for the participating CFMMs to be in a cyclic arbitrage-free
state (Denition 3.3) after the batch executes.
A weaker condition than PC is preservation of price coherence (PPC), under which a group of
participating CFMMs must be price coherent post-batch if they were price coherent pre-batch.
(3)
We also consider joint price discovery (JPD) (Denition 3.9) – a property strictly stronger
than PC. JPD ensures that the post-batch spot prices are the same as the batch prices (that
is, the CFMM’s ‘learn’ the prices ‘discovered’ in the batch exchange they participate in). JPD
eradicates a form of arbitrage we call parallel running (Denition 3.8).
(4)
Another property is locally computable response (LCR) for the CFMMs (Denition 3.11). In LCR,
the trade made by a CFMM is a deterministic function of only its trading function, pre-batch
state, and batch prices. LCR provides predictability to the liquidity providers and can help
them do a better risk-prot analysis before committing to a market-making strategy.
We also discuss a property – path independence (Denition B.1) in Appendix § B motivated from
the standalone operation of CFMMs for batches with a single limit order.
1.3.3 Achievability of Desirable Properties of Batch Exchange Market Equilibria. We start with two
key impossibility results regarding the desirable properties of market solutions.
Theorem 1.5. A batch exchange cannot simultaneously guarantee Pareto optimality for limit orders
and preservation of price coherence (PPC) for CFMMs.
Theorem 1.6. A batch exchange cannot simultaneously guarantee Pareto optimality for limit orders
and a locally computable response (LCR) for CFMMs.
Both proofs are via carefully designed counter-examples and are given in § 3.
Recall that PPC is weaker than PC, which in turn is weaker than JPD, therefore Theorem 1.5 also
applies to PC and JPD. Also, recall that Pareto optimality is dened for the limit orders, whereas
PPC and LCR are intended to protect the CFMMs from arbitrage and trade uncertainty. These
results shed light on an inherent tension between the interests of the CFMM and those of the limit
orders. They also illustrate that the problem we study in this paper is non-trivial and nuanced.
We now turn to designing algorithms that nd market equilibria with some of the desirable
properties given above. Specically we mainly study two natural algorithms.
(1)
Once can view a CFMM’s trading function as a pseudo-utility function and give each CFMM
a bundle which maximizes this pseudo-utility. We call this “Trading Rule U” (U for utility)
(Denition 4.2), and discuss it in more detail in § 4.
(2)
The second approach is applicable only when each CFMM trades in two assets, which is the
most important case in theory and practice. Here we maximize the CFMM’s price-weighted
trade volume at the batch prices. We call this "Trading Rule S" (S for strict, since the CFMM’s
trading function is strictly preserved under this rule) (Denition 4.3).
Observe that both Trading Rules U and S satisfy LCR. These simple rules have further interesting
economic properties, which we briey mention here and discuss in detail in §4.
Proposition 1.7. A batch exchange has JPD if and only if it uses Trading Rule U for all CFMMs.
Trading Rule S, in general, does not satisfy PPC. However, this negative result is bypassed in
batches with only “Concentrated Liquidity Constant Product” (CLCP) CFMMs (Denition 4.5),
which is a class including the constant-sum and constant-product CFMMs.
Theorem 1.8. CLCP is the unique class of CFMMs such that if all CFMMs in a batch belong to this
class, then the market equilibria attained by implementing Trading Rule S for all CFMMs satisfy PPC.
摘要:

AugmentingBatchExchangeswithConstantFunctionMarketMakersGEOFFREYRAMSEYER*,StanfordUniversity,USAMOHAKGOYAL*,StanfordUniversity,USAASHISHGOEL,StanfordUniversity,USADAVIDMAZIÈRES,StanfordUniversity,USABatchauctionsareaclassicalmarketmicrostructure,acclaimedfortheirfairnessproperties,andhavereceivedren...

展开>> 收起<<
Augmenting Batch Exchanges with Constant Function Market Makers.pdf

共31页,预览5页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:31 页 大小:889.04KB 格式:PDF 时间:2025-05-02

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 31
客服
关注