HOME

TheInfoList



OR:

A constant-function market maker (CFMM) is a
market maker A market maker or liquidity provider is a company or an individual that quotes both a buy and a sell price in a tradable asset held in inventory, hoping to make a profit on the '' bid–ask spread'', or ''turn.'' The benefit to the firm is that ...
with the property that that the amount of any asset held in its inventory is completely described by a well-defined function of the amounts of the other assets in its inventory. As a result, both wealth and liquidity are known and fixed given relative prices. This has made these rules popular in
prediction markets Prediction markets (also known as betting markets, information markets, decision markets, idea futures or event derivatives) are open markets where specific outcomes can be predicted using financial incentives. Essentially, they are exchange-trad ...
(fixed cost of information) and
decentralized finance Decentralized finance (often stylized as DeFi) offers financial instruments without relying on intermediaries such as brokerages, exchanges, or banks by using smart contracts on a blockchain. DeFi platforms allow people to lend or borrow funds ...
(known price exposure).


History

An early description of a CFMM was published by economist
Robin Hanson Robin Dale Hanson (born August 28, 1959) is an associate professor of economics at George Mason University and a research associate at the Future of Humanity Institute of Oxford University. He is known for his work on idea futures and markets, a ...
in ''"Logarithmic Market Scoring Rules for Modular Combinatorial Information Aggregation"'' (2002). Early literature referred to the broader class of "automated market makers", including that of the
Hollywood Stock Exchange The Hollywood Stock Exchange, or HSX, is a web-based, multiplayer game in which players use simulated money to buy and sell "shares" of actors, film director, directors, upcoming films, and film-related options. The game uses Virtual Specialist tec ...
founded in 1999; the term "constant-function market maker" was introduced in ''"Improved Price Oracles: Constant Function Market Makers"'' (Angeris & Chitra 2020). Rumored to first be seen in production on a Minecraft server in 2012, CFMMs are a popular DEX architecture.


Definition


Trading function

A CFMM is described by a
continuous Continuity or continuous may refer to: Mathematics * Continuity (mathematics), the opposing concept to discreteness; common examples include ** Continuous probability distribution or random variable in probability and statistics ** Continuous g ...
trading function (also known as the invariant, AMM invariant, or CFMM invariant) :\varphi: \mathbb^n_+ \to \mathbb over the inventory amounts (commonly referred to as reserves), such that the market maker only accepts trades which leave \varphi unchanged. In order for the market maker to not give away assets for free, \varphi must be monotone (
intermediate value theorem In mathematical analysis, the intermediate value theorem states that if f is a continuous function whose domain contains the interval , then it takes on any given value between f(a) and f(b) at some point within the interval. This has two im ...
), and it can be assumed
WLOG ''Without loss of generality'' (often abbreviated to WOLOG, WLOG or w.l.o.g.; less commonly stated as ''without any loss of generality'' or ''with no loss of generality'') is a frequently used expression in mathematics. The term is used to indicat ...
that \varphi is increasing.


Portfolio Value

The portfolio value :V: \mathbb_+^n \to \mathbb of a CFMM as a function of the
market prices A price is the (usually not negative) quantity of payment or compensation given by one party to another in return for goods or services. In some situations, the price of production has a different name. If the product is a "good" in the ...
of the assets in its inventory, is the worst-case
market value Market value or OMV (Open Market Valuation) is the price at which an asset would trade in a competitive auction setting. Market value is often used interchangeably with ''open market value'', ''fair value'' or ''fair market value'', although the ...
of its inventory, which under assumptions of perfect competition is equal to the
infimum In mathematics, the infimum (abbreviated inf; plural infima) of a subset S of a partially ordered set P is a greatest element in P that is less than or equal to each element of S, if such an element exists. Consequently, the term ''greatest ...
of the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
of inventory amounts with prices, over all inventory amounts such that the CFMM quotes at market price. If V is a "consistent payoff function", that is, a payoff function which is
concave Concave or concavity may refer to: Science and technology * Concave lens * Concave mirror Mathematics * Concave function, the negative of a convex function * Concave polygon, a polygon which is not convex * Concave set In geometry, a subset ...
, nonnegative, nondecreasing, and 1-homogenous, it is possible to construct a trading function which achieves V. It has been noted that this includes the intrinsic value of any negative- gamma
derivative contract In finance, a derivative is a contract that ''derives'' its value from the performance of an underlying entity. This underlying entity can be an asset, index, or interest rate, and is often simply called the "underlying". Derivatives can be us ...
. Since the intrinsic value exceeds the fair value of an equivalent derivative contract with a positive
tenor A tenor is a type of classical male singing voice whose vocal range lies between the countertenor and baritone voice types. It is the highest male chest voice type. The tenor's vocal range extends up to C5. The low extreme for tenors i ...
, the CFMM bears an
opportunity cost In microeconomic theory, the opportunity cost of a particular activity is the value or benefit given up by engaging in that activity, relative to engaging in an alternative activity. More effective it means if you chose one activity (for exampl ...
which must be compensated by
volume Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). Th ...
across the bid-ask spread.


Crowdfunded CFMMs

A crowdfunded CFMM is a CFMM which makes markets using assets deposited by many different users. Users may contribute their assets to the CFMM's inventory, and receive in exchange a
pro rata ''Pro rata'' is an adverb or adjective meaning in equal portions or in proportion. The term is used in many legal and economic contexts. The hyphenated spelling ''pro-rata'' for the adjective form is common, as recommended for adjectives by some E ...
share of the inventory, claimable at any point for the assets in the inventory at that time the claim is made.


Fees

Adding a bid-ask spread on top of a CFMM breaks the constant-function invariant. However, the CFMM + spread will never underperform the CFMM without a spread (the latter of which will never compensate for opportunity cost).


Examples

*
Uniswap Uniswap is a decentralized cryptocurrency exchange that uses a set of smart contracts (liquidity pools) to execute trades on its exchange. It's an open source project and falls into the category of a DeFi product ( Decentralized finance) because ...
\varphi = R_1R_2 * RMM-01 \varphi = -K\Phi(\Phi^(1-R_1)-\sigma\sqrt) + R_2


References

{{reflist Financial markets