DEV Community

Jack Ridersor
Jack Ridersor

Posted on

Estimate Impermanent Loss in a Base V2 Pool

In a V2 pool, if one token doubles in price, the pool’s value can end up about 5.7% below the value of simply holding the same tokens, before trading fees. That difference is called impermanent loss, and it matters when you decide whether a pool’s potential fees justify its price risk.

Price changes rebalance the tokens you own

A V2 pool holds two tokens and follows the constant-product rule: the quantities in the pool multiply to a roughly fixed number, written as x × y = k. Traders buy the token that is cheap in the pool and sell the one that is expensive, shifting the pool’s token mix as outside prices change.

When you add liquidity, you receive pool shares that represent your fraction of the reserves. Your share is based on how much liquidity you contribute relative to the pool’s total. As trades move the price, your share gradually contains less of the token that has risen and more of the other token. The Uniswap V2 whitepaper describes this constant-product mechanism; it applies to V2-style pools generally.

For example, suppose you deposit 1 ETH and 2,000 USDC when ETH is worth $2,000. Your $4,000 position starts with equal value in each token. If ETH rises to $4,000, the pool rebalances: ignoring fees, your share would be about 0.707 ETH and 2,828 USDC, worth about $5,657. Holding the original tokens would be worth $6,000, so the pool position trails by about $343, or 5.7%.

Compare the pool with simply holding

That comparison is impermanent loss: the shortfall against holding the original amounts, not a fee charged by the pool. It is “impermanent” because the gap can shrink if the relative price returns to where you entered. If you withdraw while prices differ, the shortfall becomes part of your realized result.

For a V2 pool, a useful estimate depends on the price ratio between entry and withdrawal. If that ratio is r, the percentage difference before fees is 2√r ÷ (1 + r) − 1. A twofold rise or fall gives a loss relative to holding of about 5.7%; a fourfold rise or fall gives about 20%. The calculation is symmetrical for rises and falls, and assumes a standard V2 pool without fees or other incentives.

Fees can offset that gap, but they are not guaranteed income. They depend on trading volume, the pool’s fee design, and your share of total liquidity; a busy pool can still underperform if its token prices move sharply. Uniswap’s developer documentation explains that liquidity providers earn a portion of trading fees, but the amount depends on pool activity and position size. BaseSwap is one way to supply liquidity to Base pools, including V2 pools, when you understand the tokens and accept the price exposure.

Check the pool before adding liquidity

Before depositing, compare the pair’s recent trading activity with its total liquidity: fees come from trades, while your share depends on how much liquidity you contribute. Check the token contract addresses with BaseScan, confirm the pool is the pair you intend to use, and work out whether you can tolerate receiving more of the weaker-performing token after a price move. Keep some ETH on Base for transaction gas.

If the pair’s price swings would make you uncomfortable holding both tokens, skip the pool or use a smaller amount. A token’s ticker or name alone does not prove its identity; verify its contract address through a reliable source before approving a transaction. When you choose to proceed, BaseSwap can be a way to handle liquidity on Base; review each transaction’s token amounts before confirming it.

Before you deposit:

  • Check both token addresses and the pool’s trading activity.
  • Estimate how a 2× or 4× price move would change your position.
  • Compare possible fees with that exposure, and keep ETH for gas.

Top comments (0)