Axioms for Constant Function Market Makers

One of the first and so far most successful applications of Decentralized Finance (DeFi) are so called Automated Market Makers (AMMs). They are used to trade a pair of cryptocurrencies algorithmically without relying on a custodian or trusted third party. The mechanics of AMMs are simple. The state of an AMM consists of the current inventories of the traded pairs of tokens. Trades are made such that some invariant of these inventory sizes is kept constant. Traders who want to exchange tokens of type A for tokens of another type B, add A tokens to the inventory and in return obtain an amount of B tokens from the inventory so that the invariant is maintained. The simplicity of these so called constant function AMMs stems from the limited storage and computation capabilities of smart contract blockchains.

While maintaining a traditional order book is prohibitively expensive on smart contract blockchain such as Ethereum, updating a simple function and inventories is not. Moreover, the AMMs allow market participants to provide liquidity passively without having to trade themselves. This makes liquidity provision in AMMs a popular way of getting (negative) exposure to volatility while being compensated by a steady stream of fee income. In this paper, we want to fill this gap and provide a theoretical approach to constructing constant function AMMs that is inspired by axiomatic theories of measurement that play a role in economics, psychology and decision theory but also connect to the natural sciences. The approach is, as in any axiomatic theory, to formalize simple principles that are implicitly or explicitly used when constructing trading functions in practice and to check which classes of functions satisfy these principles, beyond those functions already used in practice. The axiomatic approach leads us to considerations and classes of functions familiar from other fields in economics, consumer theory and production theory in particular.

We particularly focus on two types of axioms, that each are satisfied by a large class of AMMs, but in conjunction restrict the space of trading functions immensely:

The first is scale invariance, or, in a stronger form, homogeneity of the trading function, and guarantees that liquidity positions are fungible. Geometrically this means that liquidity curves through different liquidity levels can be obtained from each other, by projection along rays through the origin, analogous to how homothetic preferences in consumer theory can be constructed.

The second is independence and requires that the terms of trade for trading a subset of token types should not depend on the inventory level of not-traded token types. In the case of smooth liquidity curves this is equivalent to requiring that the exchange rate for a token pair does not depend on the inventory levels of tokens not involved in the trade.

The combination of scale invariance and independence leads to constant inventory elasticity: the terms of trade are fully determined by the inventory ratio of the pair traded, and, at the margin, percentage changes in exchange rates are proportional to percentage changes in inventory ratio. Combining the axioms we obtain the class of constant inventory elasticity AMMs. This general class contains as special cases constant product AMMs, weighted geometric means as well as weighted means. We can combine the two axioms with other practically relevant axioms to further restrict the class: If we impose aversion to (im)permanent loss, which requires that the exchange rate for swapping two tokens should be increasing in the size of the trade (or geometrically that liquidity curves should be convex), then the elasticity in the above characterization is positive. Alternatively if we require the AMM to have unconcentrated liquidity then the elasticity in the above characterization is positive but smaller or equal 1. If we further add symmetry in market making, the AMMs in the class of scale invariant (or homogenuous), independent AMMs with unconcentrated liquidity can be ranked by how favorably the terms of trade are from the point of view of traders; the constant product rule is characterized by being trader optimal within this class. This gives a possible normative justification of this rule.

For the exact definitions and proofs see the paper: https://arxiv.org/pdf/2210.00048.pdf.

Any (extra) justification or criticism of the properties we listed? Any other properties we can use to characterize AMMs?

38 Likes