Replicating Market Makers

We present a method for constructing Constant Function Market Makers (CFMMs) whose portfolio value functions matches a desired payoff. More specifically, we show that the space of concave, nonnegative, nondecreasing, 1-homogeneous payoff functions and the space of convex CFMMs are equivalent; in other words, every CFMM has a concave, nonnegative, nondecreasing, 1-homogeneous payoff function, and every payoff function with these properties has a corresponding convex CFMM. We demonstrate a simple method for recovering a CFMM trading function that produces this desired payoff. This method uses only basic tools from convex analysis and is intimately related to Fenchel conjugacy. We demonstrate our result by constructing trading functions corresponding to basic payoffs, as well as standard financial derivatives such as options and swaps.

Read more

A Note on Privacy in Constant Function Market Makers

Constant function market makers (CFMMs) such as Uniswap, Balancer, Curve, and mStable, among many others, make up some of the largest decentralized exchanges on Ethereum and other blockchains. Because all transactions are public in current implementations, a natural next question is if there exist similar decentralized exchanges which are privacy-preserving; i.e., if a transaction’s quantities are hidden from the public view, then an adversary cannot correctly reconstruct the traded quantities from other public information. In this note, we show that privacy is impossible with the usual implementations of CFMMs under most reasonable models of an adversary and provide some mitigating strategies.

Read more

Optimal Fees for Geometric Mean Market Makers

Constant Function Market Makers (CFMMs) are a family of automated market makers that enable censorship-resistant decentralized exchange on public blockchains. Arbitrage trades have been shown to align the prices reported by CFMMs with those of external markets. These trades impose costs on Liquidity Providers (LPs) who supply reserves to CFMMs. Trading fees have been proposed as a mechanism for compensating LPs for arbitrage losses. However, large fees reduce the accuracy of the prices reported by CFMMs and can cause reserves to deviate from desirable asset compositions. CFMM designers are therefore faced with the problem of how to optimally select fees to attract liquidity. We develop a framework for determining the value to LPs of supplying liquidity to a CFMM with fees when the underlying process follows a general diffusion. Our approach also allows one to select optimal fees for maximizing LP value.

Read more

When Does the Tail Wag the Dog? Curvature and Market Making

CFMMs and associated protocols, which were historically very small markets, now constitute the most liquid trading venues for a large number of crypto assets. But what does it mean for a CFMM to be the most liquid market? In this paper, we propose a basic definition of price sensitivity and liquidity. We show that this definition is tightly related to the curvature of a CFMM's trading function and can be used to explain a number of heuristic results. For example, we show that low-curvature markets are good for coins whose market value is approximately fixed and that high-curvature markets are better for liquidity providers when traders have an informational edge. Additionally, the results can also be used to model interacting markets and explain the rise of incentivized liquidity provision, also known as 'yield farming.'

Read more

Can one hear the shape of a CFMM? (Part 1)

The rise of Uniswap in 2019 was a watershed moment for DeFi trading. Uniswap’s simplicity, gas efficiency, and expert-defying performance quickly made it the dominant venue for on-chain exchange. The launch of Curve in the early part of this year demonstrated that even small changes in the design of constant-function market makers (CFMMs) can lead to drastic improvements in capital efficiency and performance. In particular, Curve pioneered a locally flatter curve that offered lower slippage for stablecoin-to-stablecoin trading. This tweak allowed Curve to capture significant trading volumes while routinely outcompeting established exchanges and OTC desks. As a result of Curve’s success, curvature is increasingly recognized as an integral component of the design space of CFMMs. Nonetheless, the precise effects of the choice of curvature on the behavior of the market have not been studied in depth.

Read more

Balancer Thesis

Balancer is a new financial primitive that combines asset management and decentralized exchange. For investors, Balancer currently offers indexed management of cryptoassets. Instead of paying fees to portfolio managers, investors earn fees for contributing their assets to Balancer pools. For traders, Balancer is a permissionless and non-custodial trading venue with competitive prices where the fees from trading increase returns for the asset depositors. In conventional finance, this would be akin to smashing Fidelity asset management together with NASDAQ’s exchange, funneling NASDAQ’s trading profits to Fidelity’s asset holders.

Read more

Why Stake When You Can Borrow?

As smart contract platforms autonomously manage billions of dollars of capital, quantifying the portfolio risk that investors engender in these systems is increasingly important. Recent work illustrates that Proof of Stake (PoS) is vulnerable to financial attacks arising from on-chain lending and has worse capital efficiency than Proof of Work (PoW). Numerous methods for improving capital efficiency have been proposed that allow stakers to create fungible derivative claims on their staked assets. In this paper, we construct a unifying model for studying the security risks of these proposals.

Read more

Liquidity Provider Returns in Geometric Mean Markets

Geometric mean market makers (G3Ms), such as Uniswap and Balancer, comprise a popular class of automated market makers (AMMs) defined by the following rule: the reserves of the AMM before and after each trade must have the same (weighted) geometric mean. This paper extends several results known for constant-weight G3Ms to the general case of G3Ms with time-varying and potentially stochastic weights. These results include the returns and no-arbitrage prices of liquidity pool (LP) shares that investors receive for supplying liquidity to G3Ms. Using these expressions, we show how to create G3Ms whose LP shares replicate the payoffs of financial derivatives.

Read more