Contents
Curve (CRV): Optimizing Automated Market Makers (AMMs)
We explore how Curve’s liquidity pools pair similar assets in order to address common problems facing AMMs.
By Michael Egorov, CEO, Curve Finance
Updated November 1, 2023 • 5 min read
Summary
Most automated market makers (AMMs) face three main challenges: high fees, high slippage, and impermanent loss. Curve Finance’s approach to AMMs addresses these problems by building liquidity pools that pair similar assets like stablecoins. Curve also creates incentives for users to provide liquidity and includes mechanisms not available in other AMMs.
Contents
AMM Overview
To understand the innovation that Curve brings to decentralized finance (DeFi), it’s helpful to know the basics of automated market makers (AMMs). Here’s a quick recap:
AMMs consist of three main prongs:
liquidity providers who supply tokens to liquidity pools,
liquidity pools comprised of token pairs, and
a constant mathematical formula to determine pricing of tokens in liquidity pools.
And, while not technically part of the protocol, AMMs rely heavily on cryptocurrency traders to buy and sell tokens into and out of liquidity pools; this helps to align the prices of tokens within those pools to the broader cryptocurrency market.
Many AMMs face problems like impermanent loss, high fees, and high slippage. Let’s take a moment to explore these issues and then we can discuss how Curve is optimizing AMMs.
Impermanent Loss
The most basic AMM model maintains a constant-product formula to manage a pool containing two different assets of equal monetary value. For example, let’s say an AMM liquidity pool holds ether (ETH) and bitcoin (BTC), two assets with a history of significant price fluctuation. When the liquidity pool is first created, 50% of the pool’s total value is in BTC and 50% is in ETH, but as traders interact with the pool, the balance of value between BTC and ETH shifts. The pool constantly attempts to rebalance itself back to an equal monetary value of BTC and ETH by changing the price of the assets.
When there is a significant change in the price of ETH or BTC on other exchanges, but not in the liquidity pool, arbitrageurs come in to take advantage of the price discrepancy. For example, if the price of BTC has dropped dramatically in other markets, but not yet in a liquidity pool, an arbitrageur can enter and begin selling BTC to the pool at higher-than-market prices. This arbitrage process plays a vital role for AMMs by resolving major price discrepancies between liquidity pools and other exchanges.
When arbitrageurs benefit from price discrepancies, liquidity providers lose out. If the prices in the pool diverge too far from where they were when the pool launched, then liquidity providers would have been more profitable by staying out of the pool entirely. This situation where diverging prices cause liquidity providers to be worse off is called “impermanent loss.” If the liquidity provider had maintained the same balanced portfolio, but kept their tokens outside of the liquidity pool, they would have been more profitable. The “loss” is deemed “impermanent” because the value of the token balance in the liquidity pool could eventually recover or even rise.
Let’s go through a high-level scenario where you are a liquidity provider supplying 5 ETH and 1 BTC to a liquidity pool with an equal value of ETH and BTC:
At the time you enter the liquidity pool, 1 BTC = 5 ETH but shortly thereafter, on other exchanges outside of your AMM, the price of BTC drops so that 1 BTC = 4 ETH.
Arbitrageurs see an opportunity to profit from the high price of BTC in the pool you just entered. So, to keep things simple, they will buy 1 BTC for 4 ETH on the outside exchange, then sell 1 BTC to your liquidity pool for 5 ETH, making a profit of 1 ETH, and repeat.
As they sell BTC into your liquidity pool, the price of BTC in your liquidity pool will start to come down because the number of BTC tokens goes up and the constant formula is continually adjusting the price of those tokens to keep the value of all BTC equal to the value of all ETH. Arbitrageurs will continue selling BTC into your pool until the BTC in your pool matches the market value of BTC, which is of course 4 ETH. So, while arbitrageurs are making 1 ETH on their trade, you just lost 1 ETH’s worth of value.
The value of your tokens in the pool is now worth:
1 BTC (4 ETH) + 4 ETH = 8 ETH
If you had kept the 1 BTC and 5 ETH outside the pool, your tokens would be worth:
1 BTC (4 ETH) + 5 ETH = 9 ETH
In this example, you would have been better off not being a liquidity provider.
If there were no fees and no rewards for being a liquidity provider, you would almost always be better off holding a balanced portfolio outside of an AMM. However, fees and project token rewards can make being a liquidity provider profitable and can cover impermanent loss to a point. However, the more the prices diverge from the point where you originally entered as a liquidity provider, the more your theoretical loss would have been. Impermanent loss does not always happen. In fact, liquidity providers can also earn large profits through fees if prices bounce around then return to where they started. Overcoming impermanent loss becomes a question of timing: when to enter and when to leave a pool.
Fees
To compensate AMM liquidity providers for the potential loss of value, the pools pay fees to liquidity providers. These fees are paid by every user who trades with the liquidity pool. When you place assets in an AMM liquidity pool, you receive a proportional piece of the fee. With Curve Finance, liquidity providers not only earn fees, but also a yield from other protocols, which we will get into later.
Slippage
Liquidity pool trading also creates slippage where the actual price during a trade slips from its originally intended level. The price you expected and the price you get can be different, and that variation is called slippage. Slippage is exacerbated by price volatility as traders affect the price in different directions at the same time. Larger trades can also exacerbate slippage.
How Curve Optimizes AMMs
By designing an AMM that focuses on similarly priced assets like stablecoins or tokenized bitcoin, Curve aims to minimize impermanent loss, fees, and slippage. Whereas an AMM like Uniswap features liquidity pools made of completely different assets like ETH and BTC, a Curve liquidity pool is comprised only of stablecoins like DAI, USDC, and USDT, or is made only of wrapped bitcoin tokens like wBTC and renBTC.
By focusing its design on pools of like-assets, several potential advantages emerge for Curve users. First, the risk of impermanent loss is greatly reduced (but not completely eliminated). Because the assets in the pool are all basically trending toward the same price, it is very unlikely that the price of any token in the pool will slide too far off balance.
Because fluctuations of stablecoin assets or like assets are much smaller, the optimal fee need not be as high as for crypto-to-crypto pairs. On Uniswap, the fees are 0.3% per trade while on Curve they are merely 0.04% — nearly a 10-time difference. If you imagine prices fluctuating within (plus or minus) 0.1% for example, then a 0.3% fee would appear unattractive. Another benefit of using similarly priced assets in a single pool is that price volatility remains low, even with heavy trading. We know that high volatility creates high slippage, and so the low volatility on Curve typically results in minimal slippage.
These advantages, however, do come with trade-offs. By focusing on pools of similar assets, Curve can be seen to be less dynamic or flexible than other AMMs such as Uniswap that allow anyone to create a liquidity pool with any pair of tokens.
Curve Finance in the DeFi Stack
If fees are comparatively low on Curve, how are users incentivized to become liquidity providers? The answer is composability — the superpower of the DeFi ecosystem.
Curve pools attract liquidity by incorporating incentives from other protocols. The assets dropped into Curve pools don’t just sit idle. They are put to work earning interest on various other DeFi protocols. The DAI, USDC, and USDT in Curve are automatically lent to interest-paying borrowers on other platforms such as Compound, Aave, and Synthetix. Instead of relying solely on fees to entice users to provide liquidity, Curve utilizes interest rates and rewards from other protocols. Traders are drawn to Curve by low slippage and fees and liquidity providers are attracted by high yields and minimal impermanent loss.
What is the optimal way to engage with the decentralized finance ecosystem? The answer, at least for now, is that there isn’t just one best approach, but a good one is likely a combination of different protocols all working together in a composable DeFi stack. Curve seeks to minimize fees, slippage, and impermanent loss through a focused pool of assets, while other AMMs aim to maximize liquidity for a variety of tokens. Users can decide which protocols to use and in what configuration, depending on their needs.
Cryptopedia does not guarantee the reliability of the Site content and shall not be held liable for any errors, omissions, or inaccuracies. The opinions and views expressed in any Cryptopedia article are solely those of the author(s) and do not reflect the opinions of Gemini or its management. The information provided on the Site is for informational purposes only, and it does not constitute an endorsement of any of the products and services discussed or investment, financial, or trading advice. A qualified professional should be consulted prior to making financial decisions. Please visit our Cryptopedia Site Policy to learn more.
Author
Michael Egorov
CEO, Curve Finance
Michael Egorov is the CEO at Curve Finance. Before starting Curve, Michael worked on infrastructure tools at LinkedIn and co-founded NuCypher. He has experience as a scientist and physicist, and was a bronze medalist in the 2003 International Physics Olympiad. He graduated from the Moscow Institute of Physics and Technology. Michael was introduced to cryptocurrency in late 2013 and later became a DeFi user starting with Maker in 2018. He began researching liquid staking, which later led him to develop an algorithm for creating deep markets for similarly priced assets. This algorithm became the foundation for Curve, which Michael created in early 2020.
Is this article helpful?