Recommended resources
The freely available resources this lesson will direct you to.
Hello! Welcome back.
In our last lesson, you accomplished a major milestone: you created a live market for your token by setting up a liquidity pool on Uniswap. This is the crucial step that allows anyone to trade your token and establishes its initial price.
However, being a liquidity provider (LP) isn't just about earning fees; it involves a unique risk that is fundamental to how Automated Market Makers (AMMs) work. This risk is called impermanent loss.
Today, we will dive deep into this concept. You'll learn what impermanent loss is, the mechanics that cause it, how to calculate it, and why it's called "impermanent." Understanding this concept is essential for anyone who wants to provide liquidity or design tokenomics that incentivize others to do so.
1. What is Impermanent Loss?
At its core, impermanent loss is an opportunity cost. It's the difference between the value of your assets while they are in a liquidity pool versus the value they would have had if you had simply held them in your wallet (a strategy often called "HODLing").
This "loss" occurs when the prices of the two assets in the pool diverge from the ratio they had when you deposited them. The greater the divergence, the greater the impermanent loss.
To get a clear initial definition and a high-level overview, let's start with a short, focused video.
What is Impermanent Loss in Crypto? (Animated + Examples)
The video 'What is Impermanent Loss in Crypto?' from Whiteboard Crypto provides a fantastic animated introduction to the topic. We'll start by watching the first part, which defines the concept.
Watch the video from the beginning until 00:20. This will give you a concise definition that we will build upon.
An important point is in the name itself: "impermanent." The loss is only theoretical or "unrealized" while your funds remain in the pool. If the asset prices return to the original ratio you deposited them at, the impermanent loss disappears. It only becomes a permanent, realized loss when you withdraw your liquidity at a different price ratio.
What is Impermanent Loss in Crypto? (Animated + Examples)
Let's quickly hear the explanation for why the loss is considered 'impermanent'.
Watch the segment from 04:13 to 04:33. This clarifies when the loss is realized.
2. Why Does Impermanent Loss Happen? The Role of Arbitrage
Impermanent loss is not a bug or a flaw; it's an inherent characteristic of the constant product AMM design () that we discussed previously. It's the direct result of the pool being rebalanced by arbitrageurs.
Here’s the mechanism:
- You Deposit Assets: You deposit a 50/50 value split of two tokens, say Token A and Token B, into a liquidity pool.
- Price Divergence: The price of Token A increases on external markets (like Binance or another DEX). The price inside your pool now lags behind.
- Arbitrage Opportunity: An arbitrageur sees that Token A is cheaper in your pool than elsewhere. They buy the "cheap" Token A from your pool, and in exchange, they sell Token B to your pool.
- Pool Rebalancing: This continues until the price of Token A in your pool matches the external market price. The arbitrageur pockets a risk-free profit.
- The Result for You (the LP): Your share of the pool now contains less of the appreciated Token A and more of the less-appreciated Token B. You effectively sold off your appreciating asset on its way up. This rebalancing is the source of impermanent loss.
The following resource provides an excellent, detailed walkthrough of this process with clear examples for both a price increase and a price decrease.
What is Impermanent Loss in Crypto? (Animated + Examples)
Let's watch two detailed examples from the Whiteboard Crypto video. This will walk you through the numbers and show exactly how arbitrage affects the composition of a liquidity provider's assets.
Watch the two main examples in the video: Price Increase (00:53 - 03:52): This section shows what happens when one asset's price goes up. Price Decrease (04:33 - 06:42): This section shows the opposite scenario. Pay close attention to the comparison between the final value in the pool and the value if the assets were just held.
3. Calculating Impermanent Loss
Now that you understand the mechanism, let's look at the numbers. We'll compare the value of the assets in the pool after a price change with what their value would have been if you had simply held them.

As you can see, even though the total value of the LP's position increased, it increased by less than if they had just held the assets. That difference is the impermanent loss.
The Formula
For those with a developer background, understanding the underlying math can provide deeper insight. The impermanent loss for a standard 50/50 constant product pool can be calculated with a simple formula that depends only on the price ratio change.
Impermanent Loss Explained: The Math Behind DeFi's Hidden Risk
The article 'Impermanent Loss Explained' from Speedrun Ethereum does an excellent job of deriving and explaining the formula. We'll focus on the result.
Read the sections '2. How is Impermanent Loss Calculated? The Formula Explained' and '3. Impermanent Loss Examples: Seeing the Impact'. You don't need to memorize the derivation, but focus on the final formula and the table that shows the IL for different price changes.
The key formula is:
Where is the price ratio change (e.g., if the price doubles, ; if it halves, ).
This formula leads to a predictable loss curve. The more the price diverges from your entry point (in either direction), the greater the impermanent loss.

Test your understanding!
You provide liquidity to a pool with your MYT token and ETH. The initial price is 1 ETH = 10,000 MYT. Later, due to high demand, the price of MYT doubles, meaning 1 ETH now equals 5,000 MYT.
- What is the price ratio change () for MYT relative to ETH?
- Using the table from the Speedrun Ethereum article or the chart above, what is your approximate impermanent loss?
- Does this mean you have lost money overall?
Show answer
- The price of
MYThas doubled relative toETH, so the price ratio change is 2x. - A 2x price change corresponds to an impermanent loss of approximately 5.7%.
- Not necessarily. Your
MYThas doubled in value! You have an opportunity cost of 5.7%, meaning you would have been 5.7% richer if you had just held the tokens. However, the value of your underlying assets has likely increased significantly, and you have also earned trading fees. As long as the price appreciation and fees are greater than the 5.7% IL, you are in profit.
4. So, Is Providing Liquidity Worth It?
This is the crucial question. If you risk losing out on potential gains, why provide liquidity at all?
The answer is that impermanent loss is only one side of the equation. Liquidity providers are compensated for taking this risk in two main ways:
- Trading Fees: LPs earn a percentage of all trades that pass through their pool. For a popular token pair, these fees can be substantial.
- Liquidity Mining Rewards: Many projects (including the one you're building!) will offer additional token rewards to incentivize users to provide liquidity. This is often called "yield farming."
A liquidity provider is profitable if:
Trading Fees Earned + Liquidity Rewards > Impermanent Loss
Choosing the right token pair is also a key strategy for mitigating IL. Pairs of assets that are expected to have a stable price relationship (e.g., two stablecoins like USDC/DAI, or highly correlated assets like ETH/wETH) will experience very little impermanent loss.
Conclusion
In this lesson, you've unpacked one of the most important and often misunderstood concepts in DeFi. You now have a solid grasp of the risks associated with providing liquidity.
Key Takeaways:
- Impermanent Loss (IL) is the opportunity cost an LP experiences when the price of the assets in a pool diverges.
- It is caused by the AMM's rebalancing mechanism, which is driven by arbitrageurs who align the pool's price with external markets.
- The loss is "impermanent" because it is only realized upon withdrawal. If prices revert, the loss disappears.
- The magnitude of IL depends only on the price ratio change and can be calculated with a specific formula.
- Providing liquidity can still be profitable if the trading fees and other rewards earned are greater than the impermanent loss incurred.
Preview of the Next Lesson:
Now that you understand the risks, we can talk more about the rewards. To attract liquidity to your token, you'll want to offer incentives. In the next lesson, we will explore liquidity mining, learn about the function of LP tokens, and design a staking contract that allows users to deposit their LP tokens to earn rewards from your project. This is a core component of building a healthy and sustainable token economy.