The State of Liquidity Provision: CFMMs & RMMs

The State of Liquidity Provision: CFMMs & RMMs

Written by
Kiernan Geoghegan
Date published
October 4, 2022

Impermanent Loss has the ability to destroy DeFi's Liquidity Providers. If you don't know what it is, how it works, and how to hedge against it, your positions WILL get rekt. Here's everything you need to know about the state of liquidity provision in DeFi ūüßĶūüĎá


1/ To understand Impermanent Loss (IL) there must first be a basic understanding of some concepts within DeFi.

The most popular Automated Market Maker (AMM) design within DeFi is that of a Constant Function Market Maker (CFMM).

Uniswap, Sushi, and other popular DEXs are CFMMs.

2/ CFMMs use the rather famous XYK model.

x * y = k

The above equation keeps every liquidity pool, which operates as a pair of two assets, in constant equilibrium

.Or more accurately, a CFMM fulfills the below equation, as it must adjust with every purchase or sale.


3/ In theory, this allows autonomous price discovery with constant rebalancing to k.In practice, it is slightly different, as a DEX like Uniswap charges a 0.3% fee which actually INCREASES k slightly with each trade. The graph below pictures the price movement of 2 assets.


4/ Although the design of a CFMM might lead one to believe there would be frequent pricing inefficiencies, due to the open nature of DeFi, there are heaps of arbitrageurs ready to exploit inefficiencies and bring pricing in line with the fair market rate.

5/ Now what is IL and where does it come in?

Whenever there are market movements in the asset pair that underlie the pool, they move back to equilibrium. This often corresponds to a loss in value for the LP, as they are only entitled to a portion of the pool, not their assets.

6/ Here is a useful table from Ryan Qian to describe a situation in which impermanent loss has occurred:


7/ In the above table, a party sells ETH for DAI, moving the price and causing some amount of IL for the LPs.Although in this situation, the LP only suffered a loss of $90.52, this could grow over time as the market grows volatile.

8/ When fees are incorporated into the equation (which most DEXs have), only a slightly different situation is shown.

In the below graph, you can see that when there are minor market movements, the LPs will experience some gain from fee accrual.


9/ However, due to the volatile nature of crypto, this is often not the case. Over the long run, LPs that have not properly hedged their positions have experienced a degree of IL that has exceeded their gains from fee accrual.

10/ This is fine and all, but a different lens can be used to examine the problem of Impermanent Loss, especially on a DEX like Uniswap:

Analyzing these protocols as an options market.

11/ In this graphic retrieved from an article by @guil_lambert, we can see the expected payoff for a Uniswap V3 LP.


12/ Some might notice that this is extremely similar to that of a covered call,with slight variations based on the LP's designated volatility tolerance.


13/ Although the payoff is comparable there are distinct differences between a "Uniswap V3" option and a normal option.

A Uniswap V3 option is perpetual, eliminating the risk of expiry, and also has both variable premiums and delta.

14/ With this information, it is easier to solve the mystery of IL and replace it with more familiar mental models.

By recognizing it as a problem of hedging the delta/gamma of existing positions, better strategies can be developed to do so.

15/ Currently a few solutions exist for providing traders exposure to delta-neutral market making, and they typically come in 3 forms:

1. Use of existing Defi instruments in combination w/ LP

2. Vaults

3. Experimental protocols focused on this problem

16/ The most common tips you'll see if you look for ways to hedge your impermanent loss typically revolve around the use of other Defi instruments.

Most commonly these are the purchase of Squeeth (long eth, or eth^2), and the sale of eth perpetual futures.

17/ The International Token Standard Association details a process to calculate the correct positions to fully hedge the IL of your Uniswap V3 LP position.

18/ Their process includes:

1. Buying an amount of Squeeth with gamma equal to half that of your Uniswap V3 position (as Squeeth has a gamma of 2).

The latter can be calculated using this formula:


19/ 2. The sale of a quantity of ETH perpetual futures equal to the delta of the former purchased Squeeth.

3. The additional sale of a quantity of ETH perpetual futures equal to the delta of your Uniswap V3 LP position.

20/ The delta of said Uniswap V3 LP position can be calculated using the following formula:


21/ With these steps in combination, the payoffs from LPing on Uniswap V3 can begin to look like this:


22/ Now this process is obviously a bit complicated, and although it can be automated, is not very easy for the average retail trader. Some solutions have been created to streamline this process under one protocol, but they still face the same accessibility problems.

23/ The most prominent of these so far has been the Replicated Market Maker, first proposed in 2021 by @GuilleAngeris, @alexhevans, and @tarunchitra; then later built out by @PrimitiveFi in the form of their RMM-01.

24/ As a short explanation, an RMM builds on top of a Constant Function Market Maker (CFMM), and allows LPs to replicate the convex payoffs of different types of options in order to achieve their desired payoff.

In addition, this would allow LPs to more effectively hedge IL!

25/ PrimitiveFi would later build out a protocol similar to this proposed idea, launching on mainnet earlier this year.

However, it would face some of the same accessibility problems, and those unfamiliar with the math required for hedging would often underperform.

26/ At the beginning of September a math approximation bug was uncovered in RMM-01 and the Primitive team decided to conduct an early sunset of the protocol, but the future for this type of innovative Defi protocol is still bright.

27/ The other mentioned common solution for hedging impermanent loss is the use of vaults.

Interestingly, (and in my opinion), the most innovative of these has not been constructed on Ethereum.

28/ Protocols like @deltafarming provide retail traders with the opportunity for delta-neutral market making on Solana.Or @AlpacaFinance on BNB chain and Fantum.

29/ So let's start to wrap it up.

What does the state of Impermanent Loss currently look like?

Well, depending on who you ask, it's not real.

30/ Impermanent Loss was a product of the option-like payoff curves that Uniswap LPs experienced, and people are catching on to that. It's more commonly understood now that providing liquidity isn't free yield. It's equivalent to active trading and should be treated as such.

31/ And many are trying to solve this problem, whether you see it as Impermanent Loss or the loss of value from unknown derivative payoffs.

Some of the most innovative projects in Defi are currently trying to tackle this problem:

Helping LPs hedge the delta of their positions.

32/ Although RMM-01 had a lack of adoption and is now facing an early sunset, there is still potential there.

An RMM-focused, rather than CFMM-focused future would allow all of Defi to become more efficient, and continue to allow our MMs to function without oracles.

33/ If you liked this look at liquidity or would like to read more similar pieces, check out the rest of the research coming out from @chapterone.