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

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

Risk Management in MakerDAO

A core function of the financial system is to transfer risk to the parties most willing to bear it. It should therefore be no surprise that two of the most successful products in DeFi, stablecoins and DEXs, address the key risks of using and holding cryptoassets. But these systems face uncertainties of their own. While limited counter-party risk and full transaction auditability have been rallying cries for DeFi, history reminds us that risk isn’t eliminated, but transposed. In fact, increasing complexity of products and complacency of market participants can magnify rather than reduce systemic risks.

Read more

DeFi Liquidity Models

As the potential of open financial protocols becomes clearer, some applications are gaining adoption faster than others. Maker dominates in terms of value locked and volume transacted. Compound and Uniswap trail, but are well ahead of 0x, Dharma, Augur, and dydx when it comes to liquidity. The rest have yet to show up on the radar. Looking at the three dominant protocols reveals a design advantage with respect to liquidity: none of them require users to find a specific peer to take the opposite side of a trade.

Read more

Maker Network Overview

Since launching Single-Collateral Dai (SCD) in December 2017, Maker has become one of the most widely used protocols on Ethereum. A diverse ecosystem of borrowers, currency users, keepers, and speculators continues to drive rapid growth of the system. This report presents Maker as a network of heterogenous actors, examining the activity of each of its key stakeholders in an attempt to isolate the key economic drivers of the system. The focus will be on analyzing SCD’s first fourteen months of operation, while providing a few projections on the network’s future. The analysis is broken down by stakeholder group: CDP Creators, Keepers, MKR holders, and dai users.

This is not intended as an introduction to the inner workings of the Maker system. Readers unfamiliar with the Maker system should consult the MakerDAO Whitepaper and Placeholder’s Maker Investment Thesis prior to reading this report.

Read more