---
title: "What Is Impermanent Loss? The Math Behind DeFi Liquidity"
description: "Impermanent loss occurs when deposited assets in a decentralized exchange change in price. Here is the math behind automated market makers, how arbitrageurs extract value, and when providing liquidity beats holding."
url: https://basisdesk.news/learn/impermanent-loss-explained
published: 2026-10-03T10:30:13.068Z
modified: 2026-10-03T10:30:13.068Z
section: DeFi
author: Basis Desk Newsroom (AI-generated, source-verified)
sentiment: neutral
tickers: [ETH, USDC, USDT]
tags: [Impermanent Loss, Automated Market Makers, Liquidity Pools, Decentralized Exchanges, Yield Farming, DeFi Mechanics]
license: Quote with attribution to Basis Desk (basisdesk.news). Not financial advice.
---

# What Is Impermanent Loss? The Math Behind DeFi Liquidity

Impermanent loss occurs when deposited assets in a decentralized exchange change in price. Here is the math behind automated market makers, how arbitrageurs extract value, and when providing liquidity beats holding.

## Key points

- Impermanent loss is the difference in value between holding assets in a wallet and depositing them into an automated market maker.
- The loss occurs because arbitrageurs extract value from the pool to keep its internal prices aligned with external markets.
- Providing liquidity is only profitable if the trading fees earned exceed the impermanent loss incurred by price changes.
- Concentrated liquidity increases capital efficiency but significantly amplifies the risk of impermanent loss.
- The loss only reverses if the assets return to the exact price ratio they were at when initially deposited.

Impermanent loss is the difference in value between depositing assets into a decentralized finance liquidity pool and simply holding those same assets in a digital wallet. It occurs because decentralized exchanges rebalance deposited assets as external market prices change, mathematically forcing depositors to sell their winning assets and buy their losing assets. Understanding this mechanic is necessary for evaluating whether the trading fees earned from providing liquidity outweigh the opportunity cost of holding.

## The Shift From Order Books to Automated Market Makers

Traditional financial markets and centralized cryptocurrency exchanges rely on order books. In an order book model, buyers and sellers submit bids and asks, and a centralized matching engine pairs them. This requires high-speed infrastructure and constant updates, which is difficult to replicate on base-layer blockchains due to block times and transaction fees.

Decentralized finance (DeFi) solved this problem by replacing order books with an **automated market maker** (AMM). According to the Ethereum Foundation's documentation, an AMM is a smart contract that holds reserves of two or more tokens and allows anyone to trade against those reserves at prices determined by a mathematical formula [1]. 

Users who deposit their tokens into these smart contracts are known as a **liquidity provider** (LP). In exchange for locking up their capital to facilitate trading, LPs earn a percentage of the trading fees generated by the pool.

## The Constant Product Formula

The most common mathematical model used by AMMs is the **constant product formula**, popularized by the decentralized exchange Uniswap. The formula is expressed as `x * y = k`, according to the Uniswap V2 whitepaper [2].

In this equation:
* `x` represents the total quantity of the first token in the pool.
* `y` represents the total quantity of the second token in the pool.
* `k` is a fixed constant that must remain unchanged after a trade is executed (excluding the addition of trading fees).

Because `k` must remain constant, any trade that removes some of token `x` from the pool must add a proportional amount of token `y`. This mathematical relationship creates a pricing curve. As the supply of one token in the pool decreases, its price relative to the other token increases exponentially.

## How Arbitrageurs Rebalance Pools

An AMM has no internal concept of the outside world's prices. It does not check external data feeds or centralized exchanges to determine the current market rate of an asset. Instead, it relies entirely on arbitrageurs to keep its internal prices aligned with the broader market.

If the price of an asset rises on a centralized exchange, that asset becomes temporarily underpriced inside the AMM liquidity pool. Arbitrageurs recognize this discrepancy. They buy the underpriced asset from the AMM, removing it from the pool, and pay for it using the other asset, adding to the pool's reserves.

This process continues until the ratio of assets in the pool reflects the new external market price. Because the AMM mathematically scales the price up as the asset becomes scarcer in the pool, the arbitrageur eventually pushes the pool's price into equilibrium with the broader market. 

For the liquidity provider, this mechanism is the direct cause of impermanent loss. The arbitrageur's profit is extracted directly from the value of the LP's deposited assets. The LP ends up holding less of the asset that appreciated in value and more of the asset that depreciated in relative value.

## A Worked Example: Calculating Impermanent Loss

To understand the exact financial impact, it is necessary to calculate the constant product formula step-by-step. 

Assume a liquidity provider, Alice, decides to deposit funds into an $ETH and $USDC liquidity pool. The current market price is 1 ETH = 2,000 USDC.

Alice deposits 1 ETH and 2,000 USDC. The total value of her deposit is $4,000. 

For this example, assume Alice's deposit represents exactly 1% of the total liquidity pool. Therefore, the entire pool contains 100 ETH and 200,000 USDC. 

First, the AMM calculates the constant `k` for the entire pool:
* `x` (ETH) = 100
* `y` (USDC) = 200,000
* `x * y = k`
* 100 * 200,000 = 20,000,000

The constant `k` is 20,000,000. The current price ratio is `y / x`, which equals 2,000 USDC per ETH.

Now, assume the external market price of ETH doubles to 4,000 USDC. 

Arbitrageurs immediately buy ETH from the pool until the pool's internal ratio matches the new external price of 4,000 USDC per ETH. To find the new token balances in the pool, we must solve for `x` and `y` given the new price ratio and the unchanged constant `k`.

We know two things:
1. `x * y = 20,000,000`
2. `y / x = 4,000` (The new price)

From the second equation, we can determine that `y = 4,000 * x`. We substitute this into the first equation:
* `x * (4,000 * x) = 20,000,000`
* `4,000 * x^2 = 20,000,000`
* `x^2 = 5,000`
* `x = 70.71`

The pool now holds 70.71 ETH. To find the new USDC balance (`y`), we multiply the new ETH balance by the new price:
* `70.71 * 4,000 = 282,842`

The pool now holds 70.71 ETH and 282,842 USDC. 

Alice owns 1% of this pool. She can withdraw her share at any time. Her 1% share is now:
* 0.7071 ETH
* 2,828.42 USDC

To calculate the current value of Alice's withdrawn assets, we multiply her ETH by the current market price ($4,000) and add her USDC:
* (0.7071 * $4,000) + $2,828.42 = $2,828.40 + $2,828.42 = $5,656.82.

Alice's total value is now $5,656.82. She has made a profit compared to her initial $4,000 deposit. However, impermanent loss is not measured against the initial deposit; it is measured against the opportunity cost of simply holding the assets in a wallet.

If Alice had never deposited her 1 ETH and 2,000 USDC into the pool, and simply held them in her wallet, their value today would be:
* (1 ETH * $4,000) + $2,000 = $6,000.

The difference between holding ($6,000) and providing liquidity ($5,656.82) is $343.18. This $343.18 is the impermanent loss. By providing liquidity, Alice underperformed a simple holding strategy by 5.7%.

## The Role of Trading Fees

If automated market makers mathematically guarantee that liquidity providers will underperform holding whenever prices change, the logical question is why anyone provides liquidity at all. The answer is trading fees.

Every time a user or arbitrageur trades against the pool, the smart contract deducts a small fee (historically 0.3%, though modern protocols offer multiple fee tiers). These fees are added directly to the pool's reserves, slowly increasing the value of the LP tokens over time. For more on how these yields are generated, see [Yield Farming: Where the Yield Comes From](https://basisdesk.news/learn/yield-farming-explained).

Providing liquidity becomes profitable when the accumulated trading fees exceed the impermanent loss. In Alice's example, if her 1% share of the pool generated $400 in trading fees during the time it took for ETH to double in price, her total position value would be $6,056.82. In this scenario, providing liquidity beats holding by $56.82.

## Concentrated Liquidity and Amplified Risk

The constant product formula distributes liquidity evenly across all possible prices, from zero to infinity. This is highly inefficient, as most assets trade within a specific price range. 

In 2021, Uniswap V3 introduced **concentrated liquidity**, allowing LPs to choose the exact price range where their capital is deployed [3]. If an LP believes ETH will trade between $1,900 and $2,100, they can concentrate all their capital in that narrow band.

This drastically increases capital efficiency. An LP using concentrated liquidity can earn the same trading fees as a traditional LP while depositing a fraction of the capital. However, it also acts as leverage on impermanent loss. 

If the market price exits the LP's chosen range, their position is entirely converted into the underperforming asset, and they stop earning trading fees until the price returns to the range. Concentrated liquidity requires active management and carries a significantly higher risk of severe impermanent loss compared to traditional full-range pools.

## Tax Implications of Liquidity Provision

The tax treatment of impermanent loss and liquidity provision is complex and varies by jurisdiction. According to general guidance from the US Internal Revenue Service (IRS), cryptocurrency transactions are treated as property, and disposing of one asset for another triggers a taxable event [4].

When a user deposits two tokens into a liquidity pool and receives an LP token in return, some tax authorities may classify this as a crypto-to-crypto trade, triggering capital gains tax on the deposited assets. Furthermore, the continuous rebalancing of the pool by arbitrageurs is not typically viewed as a series of taxable trades for the LP, but the final withdrawal and realization of the impermanent loss may be treated as a capital disposition. Specifics vary and change frequently; tax professionals must evaluate individual LP activities against current local regulations.

## Common Misconceptions

**The name implies the loss is temporary.** The term "impermanent" is widely considered a misnomer within the industry; many quantitative researchers prefer the term **divergence loss**. The loss only reverses if the price ratio of the two assets returns exactly to the ratio at which the LP deposited them. If the LP withdraws their assets at any other price ratio, the loss becomes permanent.

**Stablecoin pools have no impermanent loss.** Pools pairing two fiat-pegged stablecoins (such as USDC and $USDT) generally experience near-zero impermanent loss because their price ratio rarely deviates from 1:1. However, if one stablecoin loses its peg, the AMM math forces the pool to buy the failing asset. The LP will be left holding entirely the depegged, worthless token. For more on this risk, see [Stablecoin Depegs: Why They Happen and How Pegs Break](https://basisdesk.news/learn/stablecoin-depegs-explained).

**High APY guarantees profit.** Decentralized exchanges often advertise triple-digit Annual Percentage Yields (APY) for highly volatile token pairs. These high yields are necessary to compensate LPs for the extreme impermanent loss associated with volatile assets. A 100% APY is irrelevant if the underlying tokens lose 90% of their value against a holding strategy.

## How This Connects to the Market

Impermanent loss dictates the behavior of institutional and professional liquidity providers. LPs are effectively shorting volatility. They thrive in sideways, ranging markets where trading volume is high but directional price movement is low. 

In strong trending markets—whether aggressive bull markets or steep bear markets—impermanent loss accelerates. During these periods, simple holding strategies almost always outperform liquidity provision. Professional LPs must constantly model expected volatility against expected fee generation, adjusting their positions to ensure the yield justifies the mathematical drag of the constant product formula. For broader strategies on managing these exposures, see [Risk Management for Crypto: Position Sizing and Drawdowns](https://basisdesk.news/learn/risk-management-basics).

## FAQ

**Why is it called impermanent loss?**

It is called impermanent because the loss is only realized if you withdraw your assets. If the price ratio of the tokens returns to the exact level it was when you deposited them, the loss disappears. However, if you withdraw at any other price, the loss becomes permanent.

**Can impermanent loss happen if prices go up?**

Yes. Impermanent loss happens regardless of whether prices go up or down. It is caused by a divergence in the price ratio between the two assets. If one asset doubles in price, you will have less of it than if you had simply held it in a wallet.

**Do stablecoin pools have impermanent loss?**

Generally no, because stablecoins are designed to stay at a 1:1 ratio. However, if one stablecoin loses its peg and drops in value, the automated market maker will automatically buy the failing asset, leaving liquidity providers with the depegged token.

**How do liquidity providers make money if impermanent loss is guaranteed?**

Liquidity providers earn a percentage of every trade executed in their pool. If the pool has high trading volume and the assets do not change in price too drastically, the accumulated fees will exceed the impermanent loss, resulting in a net profit.

## Sources

1. [Uniswap v3 Core](https://app.uniswap.org/whitepaper-v3.pdf) — Uniswap
2. [Uniswap v2 Core](https://app.uniswap.org/whitepaper.pdf) — Uniswap
3. [Frequently Asked Questions on Virtual Currency Transactions](https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions) — Internal Revenue Service

---
Basis Desk Newsroom · AI-generated, source-verified · https://basisdesk.news/about/how-we-use-ai
