Home / How to Calculate Impermanent Loss in DeFi Liquidity Pools

How to Calculate Impermanent Loss in DeFi Liquidity Pools

How to Calculate Impermanent Loss in DeFi Liquidity Pools

When you provide liquidity to a DeFi pool, you’re not just earning trading fees-you’re also taking on a hidden risk called impermanent loss. It’s not a loss you can see in your wallet right away. It’s the gap between what your liquidity position is worth and what you’d have if you’d just held the tokens in your pocket. This gap opens up when the price of one token in the pair moves significantly compared to the other. And if you withdraw your funds while that gap exists, it becomes real.

Why Impermanent Loss Happens

Impermanent loss isn’t caused by hackers or smart contract bugs. It’s built into the math of automated market makers (AMMs) like Uniswap, Sushiswap, and Curve. These platforms use a simple rule: the product of the two token amounts in a pool must stay constant (x * y = k). So if the price of ETH rises, the pool automatically sells some ETH and buys USDC to keep that product balanced. That’s how arbitrage traders make money-and how liquidity providers lose out.

Imagine you deposit 1 ETH and 1,600 USDC into a pool when ETH is $1,600. Your total value is $3,200. Now ETH goes to $2,000. A trader notices the pool still has ETH priced at $1,600 (because it hasn’t adjusted yet), so they buy ETH from the pool at the lower price. The pool gives them ETH and gets USDC in return. By the time the price settles at $2,000, the pool has less ETH and more USDC than when you deposited. Your share of the pool is now worth less than if you’d just held both tokens.

The Basic Formula for 50/50 Pools

For the most common type of liquidity pool-50% token A, 50% token B-the formula is straightforward:

Impermanent Loss = 2 × √d / (1 + d) - 1

Where d is the price ratio change. You calculate d by dividing the initial price by the current price.

Let’s say ETH was $1,600 when you deposited and is now $2,000.

  • d = 1600 / 2000 = 0.8
  • √0.8 = 0.8944
  • 2 × 0.8944 = 1.7888
  • 1 + 0.8 = 1.8
  • 1.7888 / 1.8 = 0.9938
  • 0.9938 - 1 = -0.0062

That’s a -0.62% impermanent loss. You didn’t lose money in absolute terms-you still have more USDC than before. But you’re 0.62% worse off than if you’d just held ETH and USDC separately.

What Happens at Bigger Price Moves?

The bigger the price swing, the worse the loss. Here’s what you can expect with a 50/50 pool:

  • 1.25x price change → 0.6% loss
  • 2x price change → 5.7% loss
  • 3x price change → 13.4% loss
  • 4x price change → 20.0% loss
  • 5x price change → 25.5% loss

That’s why providing liquidity to pairs like ETH/USDC during a bull run can be risky. If ETH goes from $2,000 to $10,000, you’re looking at over 25% impermanent loss. But here’s the catch: you’re also earning trading fees. If ETH trades heavily during that rise, those fees can cover-or even exceed-the loss.

Farmer holds USDC carrots as an ETH rabbit escapes over a collapsed pool fence labeled '25.5% Loss'.

What About Non-50/50 Pools?

Not all pools are equal. Some are weighted 80/20, 90/10, or even 99/1. These are common in stablecoin pools or when a token is highly volatile. The formula changes:

Impermanent Loss = (2 × √(d^w × (1-w)^(1-w))) - (d^w + (1-w)^(1-w))

Where w is the weight of the first asset (e.g., 0.8 for an 80/20 pool).

For example, in an 80/20 ETH/USDC pool where ETH goes from $1,600 to $2,000 (d = 0.8):

  • d^w = 0.8^0.8 = 0.8365
  • (1-w)^(1-w) = 0.2^0.2 = 0.7248
  • √(0.8365 × 0.7248) = √0.6063 = 0.7787
  • 2 × 0.7787 = 1.5574
  • 0.8365 + 0.7248 = 1.5613
  • 1.5574 - 1.5613 = -0.0039 → -0.39% loss

Notice something? The loss is smaller than in a 50/50 pool. That’s because you’re exposed to less of the volatile asset. But here’s the trade-off: your potential fee earnings are also lower, since you’re providing less of the token traders are buying and selling.

Uniswap v3 and Concentrated Liquidity

Uniswap v3 changed everything. Instead of spreading your liquidity across all price ranges, you pick a range-say, $1,800 to $2,200 for ETH. Your capital is only active within that range. That means:

  • If ETH stays inside your range, you earn more fees per dollar than in v2.
  • If ETH moves outside your range, you stop earning fees and your entire position turns into just one token (e.g., all USDC if ETH drops below $1,800).

That makes impermanent loss more extreme. If ETH surges past $2,200, your entire position becomes USDC. You’re no longer participating in ETH’s upside. Your impermanent loss isn’t just a percentage-it’s a complete loss of exposure.

Studies show that narrow-range positions in v3 can suffer 38% more impermanent loss than equivalent v2 positions during price moves outside the range. But within the range, you can earn 2-5x more fees. It’s a high-risk, high-reward trade-off.

Stablecoin Pools Are Different

Curve and other stablecoin AMMs use a different math. Instead of x*y=k, they use x+y=k. This keeps the price of stablecoins tightly pegged. Even if USDC moves from $1.00 to $1.01, the pool adjusts without triggering large impermanent loss.

For price changes under 10%, Curve pools often show less than 0.1% impermanent loss. That’s why most professional liquidity providers put their stablecoins in Curve, and their volatile assets in Uniswap v3 with carefully chosen ranges.

Uniswap v3 hero stranded on a narrow price bridge as ETH zooms past, while Curve pool glows peacefully below.

Are Fees Enough to Cover the Loss?

This is the real question. A pool might offer 50% APY in fees. Sounds great-until you realize ETH jumped 4x and your impermanent loss is 20%. You’re still down.

Here’s what real users saw:

  • One user deposited $1,000 in ETH/USDC at $2,000 ETH. When ETH hit $3,000, their impermanent loss was 10.2%. But after six months of fees, they ended up with a net 3.7% gain.
  • Another user provided liquidity to a new token pair. ETH went from $1,500 to $6,000. Impermanent loss: 38.7%. Fees earned: 12.3%. Net loss: $4,200.

There’s no universal answer. You need to estimate:

  1. How big the price move might be
  2. How often the pair trades
  3. How much fee income you’ll earn over time

Use tools like the CoinGecko Impermanent Loss Calculator or Zapper.fi to simulate scenarios. But always remember: these tools don’t include fees. You have to add them manually.

How to Avoid Getting Hurt

Here’s what works in practice:

  • Stick to stablecoin pairs if you want low risk. Curve, Balancer stable pools.
  • Use Uniswap v3 with wide ranges if you’re bullish on ETH or BTC. Don’t pick tight ranges unless you’re actively managing.
  • Avoid new, low-volume tokens. They’re volatile and trade little. Fees won’t save you.
  • Track your position with DeBank or Zapper. They show real-time impermanent loss vs. holding.
  • Use the 10% rule: If one token moves more than 10% in a week, consider rebalancing or withdrawing.

And here’s a quick mental shortcut for 50/50 pools: if a token goes up by x%, your impermanent loss is roughly (1 - √(x/100 + 1)) × 100. So if ETH goes up 100% (doubles), plug in 100: (1 - √2) × 100 ≈ (1 - 1.414) × 100 = -41.4%. Wait-that’s wrong. The correct shortcut is: if a token doubles, loss ≈ 5.7%. The formula above doesn’t work for percentage increases-it’s for price ratios. Stick to the real formula or use a calculator.

Final Reality Check

Impermanent loss isn’t a bug. It’s a feature. It’s how AMMs keep prices aligned with the market. The real risk isn’t the math-it’s misunderstanding it. Many people panic when they see a 10% impermanent loss and pull out, only to watch the token go up 50% afterward.

As Vitalik Buterin said, it’s better to think of it as a divergence loss. You’re not losing money-you’re missing out on the opportunity to hold both assets as they move apart.

The best liquidity providers don’t chase high APYs. They pick pairs with steady trading volume, avoid extreme volatility, and let fees compound over time. They know that in DeFi, patience beats speculation.

Is impermanent loss real money I lose?

No-not until you withdraw. Impermanent loss is the difference between your liquidity position’s value and what you’d have if you held the tokens outside the pool. If prices return to their original ratio, the loss disappears. But if you pull out while prices are apart, it becomes permanent.

Can I avoid impermanent loss entirely?

Not if you’re providing liquidity to volatile token pairs. But you can minimize it. Use stablecoin pools (like USDC/USDT on Curve), choose wide price ranges on Uniswap v3, or avoid pools with tokens that have high price swings. Some new tools even auto-rebalance your position to reduce exposure.

Do fees always offset impermanent loss?

No. Fees only offset loss if trading volume is high enough. In 2023, CoinGecko found only 27% of DeFi liquidity pools generated enough fees to cover typical impermanent loss. For volatile pairs with low volume, fees are often too small to matter.

Why does Uniswap v3 have higher impermanent loss risk?

Because you concentrate your liquidity into a narrow price range. If the price moves outside that range, your entire position turns into one token. You lose exposure to the asset’s upside, and your loss becomes much larger than in Uniswap v2, where your funds are spread across all prices.

Should I use a calculator or do the math myself?

Use a calculator for quick estimates-tools like CoinGecko’s or Zapper.fi are reliable. But if you’re managing large positions, build a spreadsheet that includes both impermanent loss and projected fees. Real decisions need both numbers.

Is impermanent loss the same as slippage?

No. Slippage is the difference between the price you expect and the price you get when you trade. Impermanent loss is the opportunity cost you face as a liquidity provider when token prices change relative to each other. They’re related but different concepts.

What happens if both tokens go up?

If both tokens rise equally, there’s no impermanent loss. The ratio stays the same, so the pool doesn’t need to rebalance. But if one rises faster than the other, you get loss-even if both are going up.

Can I get taxed on impermanent loss?

In most jurisdictions, you’re not taxed on impermanent loss because no actual sale has occurred. But if you withdraw and sell tokens, you may owe capital gains tax on the profit or loss from that sale. Always check your local tax rules.

23 comment

george haris

george haris

Man, I just got into DeFi last month and this post broke it down so simply. I thought impermanent loss was some scammy term they made up to scare people. Turns out it’s just math being weird. I’m now using Zapper to track my LP positions and it’s a game changer. No more guessing.

Paru Somashekar

Paru Somashekar

Thank you for this comprehensive exposition on the mechanics of impermanent loss. The mathematical derivations presented are both precise and pedagogically sound. I would further recommend incorporating a sensitivity analysis for varying fee tiers and token volatility profiles to enhance the predictive utility of the model.

David Zinger

David Zinger

LOL americans think they invented finance. In India we’ve been doing this since the 1990s with mutual funds and arbitrage. You guys are just now learning that price changes affect your portfolio?? 🤦‍♂️💸

Heather Crane

Heather Crane

This is such a helpful breakdown! I used to panic every time my LP showed a negative percentage, but now I see it’s just part of the game. I’ve been sticking to stablecoin pairs and it’s been so peaceful. No more sleepless nights 😌✨

Catherine Hays

Catherine Hays

Of course you lost money. You trusted a decentralized protocol. You should’ve held BTC and waited for the next halving. This whole DeFi thing is a Ponzi scheme dressed up as finance. You’re being played.

Kevin Pivko

Kevin Pivko

Impermanent loss? More like permanent stupidity. If you don’t understand the math, don’t put money in. You’re not a trader, you’re a tourist with a wallet. Stop pretending you’re Warren Buffett.

Mathew Finch

Mathew Finch

Anyone who uses Uniswap v3 without a PhD in financial engineering is asking for trouble. I’ve seen 30-year-olds lose their life savings because they thought ‘wide range’ meant ‘anywhere between 1 and 10k’. Pathetic.

Margaret Roberts

Margaret Roberts

Did you know the government is using these liquidity pools to track your spending? The blockchain isn’t decentralized-it’s a surveillance tool. They’re waiting for you to make a mistake so they can freeze your assets. Don’t be fooled.

Adam Lewkovitz

Adam Lewkovitz

Just hold BTC and chill. Why are you even doing this? You think you’re smart because you know what d = 0.8 means? Bro, you’re not a wizard. You’re just a guy with a laptop.

Clark Dilworth

Clark Dilworth

The AMM pricing function under constant product market makers (CPMM) exhibits non-linear slippage sensitivity to price deviations, which fundamentally alters the risk-reward profile of LP positions relative to buy-and-hold strategies. This is non-trivial and requires dynamic rebalancing under stochastic volatility regimes.

Brenda Platt

Brenda Platt

Yesss!! I started with ETH/USDC and got scared by the 8% loss… then realized I made 15% in fees. Now I’m in Curve for stablecoins and v3 for ETH with a 1.5k-2.5k range. You got this!! 💪❤️

Barbara Rousseau-Osborn

Barbara Rousseau-Osborn

Anyone who doesn’t use a 99/1 pool for volatile assets is literally throwing money away. And if you’re using v3 with ranges wider than 10%, you’re not serious. I’ve seen people lose 50k because they didn’t listen to me. You’re welcome.

Arnaud Landry

Arnaud Landry

Interesting analysis. Though I must say, the assumption that fee income can reliably offset impermanent loss is overly optimistic. In practice, most low-cap pairs suffer from low volume and high slippage, rendering fee projections speculative at best.

Steve Fennell

Steve Fennell

Great guide. One thing I’d add: always check the 24h volume on DeFiLlama before depositing. If it’s under $10M, you’re probably just funding a rug pull. And if the token name has ‘dog’ or ‘moon’ in it… just walk away.

Ryan Depew

Ryan Depew

bro i just put in 1000 usdc into some new coin pair and now my position is worth 300. i think i got impermanent loss? lol

Shamari Harrison

Shamari Harrison

One thing people forget: impermanent loss isn’t the enemy. Fear is. If you understand the math and stick to your plan, you’ll outperform 90% of LPs. Start small. Track it. Learn. You don’t need to be a genius-just consistent.

Nadia Silva

Nadia Silva

Why are you even on Reddit? This is basic finance. You should be reading academic papers, not watching YouTube tutorials. I’m embarrassed for you.

tim ang

tim ang

Just started with Uniswap v3 last week and I’m already making more fees than my job. I set my range at 1800-2200 for ETH and it’s been smooth sailing. I’m not smart, I just followed the guide. Thanks OP!

Julene Soria Marqués

Julene Soria Marqués

Wait, so if I’m in a 50/50 pool and ETH goes up, I’m losing? But I thought I was making money from fees? This sounds like a trap. Are you sure this isn’t just a way for devs to steal our money?

MOHAN KUMAR

MOHAN KUMAR

Impermanent loss is real. I lost 20% on a new token pair. But I learned. Now I only do stablecoins. And I don’t touch anything with less than 50M volume. Simple.

Jennifer Duke

Jennifer Duke

Anyone who says ‘just hold’ is a crypto noob. If you’re not actively managing your LP positions, you’re already losing. I rebalance weekly. I track everything. I’m the only one doing it right.

Chidimma Catherine

Chidimma Catherine

Thank you for this. I am from Nigeria and we have very little access to educational resources on DeFi. Your explanation has helped me understand why my liquidity position is not growing as fast as I expected. I will now use the formula you provided and track my positions more carefully. I am grateful for your clarity

Nathan Drake

Nathan Drake

Impermanent loss is not a loss at all-it is merely a reflection of the divergence between opportunity and participation. The real question is not whether you lost money, but whether you were willing to be part of the market’s evolution. To hold is to be passive. To provide liquidity is to be a participant in price discovery. The math is just the shadow of that deeper truth.

Write a comment