Some offers on this page are from advertisers who pay us, which may affect which products we write about, but not our recommendations. See our Advertiser Disclosure.
In a nutshell, the value of your tokens left in a liquidity pool will likely be lower than if you had just held those same tokens in your crypto wallet. This "loss" occurs when the token pair diverges in price due to how automated market makers (AMMs) calculate swap values. However, you'll also earn swap fees that offset your impermanent loss. Swap fees often cover the difference, leaving you with a net gain.
If you're new to providing liquidity in decentralized finance (DeFi), you've probably encountered the term impermanent loss (IL), accompanied by some confusing math. The good news is that IL is less complicated than it seems.
IL isn't the boogeyman it's often portrayed as; it is better described as an opportunity cost rather than a loss. In some ways, it's like renting out a house for ongoing income rather than selling it in pristine condition at the market peak. Renting leaves some wear and tear, but you're getting paid along the way.
In this guide, we'll discuss the math behind impermanent loss as well as ways to reduce your risk by using correlated assets. IL isn't a reason to avoid liquidity provision, but it's a key element to understand before you start. Let's begin with some basics.
To understand impermanent loss, you first need to understand how your tokens are being used. In traditional finance, you buy and sell assets through an order book. A seller names their price, and the order goes to the order book. A buyer agrees, and a trade happens. Decentralized exchanges (DEXs) often use a different model called an automated market maker.
An AMM replaces the order book with a liquidity pool. In most cases, the pool holds a pair of tokens people can trade against. For example, let's say the pool holds ether (ETH-USD) and USDC (USDC-USD), a stablecoin token pegged to $1. Rather than matching buyers and sellers, the AMM uses a formula to set the price of each token based on the ratio of tokens in the pool.
The most common formula is the constant product formula, which ensures the total value of both tokens remains balanced as trades occur.
In the constant product formula (x * y = k), x and y represent the quantity of each token in the liquidity pool. K is the constant product. The rule is simple: no matter how many trades happen, k must remain the same. This formula drives prices and ratios in the pool.
Let's say your pool holds 10 ETH and 20,000 USDC. Your constant product (k) is 200,000.
If a trader wants to buy ETH from the pool, they must add USDC to keep the equation balanced.
As ETH becomes scarcer in the pool, it costs more USDC to acquire it. That's how the AMM sets the price. It's supply and demand, governed by math rather than an order book.
For this market to work, the pool needs inventory. That's where liquidity providers (LPs) come into play.
When you provide liquidity, you deposit your own tokens into the pool using your crypto wallet to approve the transaction.
In return, you receive LP tokens, which represent your share of the pool.