Skip to content

Arbitrage

This page covers the necessary concepts for the reader to understand arbitrage and impermanent loss in Uniswap V2.

For a specific token pair there are multiple markets (CEXs, DEXs, etc.) with their own local exchange price.

Arbitrage means profiting from a price difference between two or multiple markets, by buying where the asset is cheaper and selling where it is more expensive.

Arbitrage traders help push a specific market price toward the broader market price.

Arbitrage is a double-edged sword:

  • It is essential for maintaining market price (stale price kills pools),
  • It might drain a pool (if it goes beyond its tolerance),
    • Draining means significant pool value loss and inability to trade.
  • Drainage resistant: one side cannot be cleanly drained to zero by a finite trade under the ideal CPMM curve, because marginal price rises sharply as a reserve shrinks.
  • Passive rebalancing: the pool does not observe external prices directly; arbitrage is what updates it after outside prices move.

We will showcase a basic arbitrage scenario to reveal important info:

StepDescriptionReserve ratioPrice
1Pool1: has 10 ETH and 0.25 WBTC10 ETH : 0.25 WBTC0.025 WBTC per ETH
2Market2: ETH is priced at 0.03 WBTC0.03 WBTC per ETH
3Pool1: Arbitrageurs buy ETH from Pool1 using WBTCETH down, WBTC up0.03 WBTC per ETH
4Market2: Arbitrageurs sell the ETH bought from Pool1 in Market2 for WBTC

A Uniswap V2 pool, when it is arbitraged, its tokens are balanced 50/50 by token value, not by token counts.

It means that at the current pool price, the two sides have equal market value.

LPs do not change the ratio (therefore, the balance), they add/remove liquidity proportionally to the current price.

Example

Pool has 10 ETH and 0.25 WBTC, then the pool-implied price is 0.025 WBTC per ETH,

SideAmountValue at pool price
ETH10 ETH0.25 WBTC
WBTC0.25 WBTC0.25 WBTC

Therefore, when arbitraged, the pool value in terms of tokenY or tokenX is:

PoolValuey=2yPoolValuex=2x\begin{aligned} PoolValue_{y} &= 2y \\ PoolValue_{x} &= 2x \end{aligned}

50:50 token value balance is not a hard guarantee from the contract itself, it’s the result of arbitrage

Internal token ratio does not determine USD value;

  • it determines relative token pricing inside the pool
  • you still need an outside USD reference to convert that into dollars

The UniswapV2 pool value in terms of dollars is:

PoolValue$=2yPy,$PoolValue$=2xPx,$\begin{aligned} PoolValue_{\$} &= 2y P_{y,\$} \\ PoolValue_{\$} &= 2x P_{x,\$} \end{aligned}

Impermanent loss is the difference in value between holding your deposited assets versus providing them as liquidity in a pool when token prices change.

When the AMM rebalances, it exchanges some of the outperforming tokens with underperforming tokens in local price, not market price.

The difference goes into the arbitrageur as an incentive to keep the pool at market price, therefore, active.

Impermanent loss depends on

  • the entry price ratio at which you added liquidity
  • how far the later market price ratio drifts from that entry ratio (one-time snapshot, does not compound)
    • the direction does not matter for IL magnitude in the symmetric 50/50 formula
    • a 2x increase and a 50% decrease produce the same impermanent loss percentage
    • if the price ratio returns to where it started, the gap can disappear
    • if you withdraw while the price ratio is still different, the loss becomes realized in practice
IL(r)=2r1+r1,r=PfinalPinitialIL(r)=\frac{2\sqrt{r}}{1+r}-1,\qquad r=\frac{P_\text{final}}{P_\text{initial}}xy=k,P=yx,x1=kPfinal,y1=kPfinalxy=k,\quad P=\frac{y}{x},\quad x_1=\sqrt{\frac{k}{P_\text{final}}},\quad y_1=\sqrt{kP_\text{final}}VLP=y1+Pfinalx1=2kPfinalV_\text{LP}=y_1+P_\text{final}x_1=2\sqrt{kP_\text{final}}VHODL=y0+Pfinalx0,y0=Pinitialx0V_\text{HODL}=y_0+P_\text{final}x_0,\quad y_0=P_\text{initial}x_0VHODL=kPinitial(1+r)V_\text{HODL}=\sqrt{kP_\text{initial}}(1+r)IL(r)=VLPVHODL1=2r1+r1IL(r)=\frac{V_\text{LP}}{V_\text{HODL}}-1=\frac{2\sqrt{r}}{1+r}-1
Price ChangerrrIL(r)
0%1.00.00%
+10%1.1-0.47%
+25%1.25-0.53%
+50%1.5-2.04%
+100%2.0-5.72%
+200%3.0-13.40%
+400%5.0-25.48%

Trading (including arbitrage) in Uniswap does not reduce the total token reserves; it only changes their composition.

  • Reserves (quantities): Tokens are swapped in a zero‑sum way between traders and the pool, following the CPMM rule
  • Dollar‑value composition: Liquidity providers lose dollar‑value exposure to the more appreciating token and gain exposure to the more depreciating one, which can reduce the dollar value of their LP position relative to simply holding the two tokens.

Below there is a basic example (no fees) that shows that arbitrageur’s monetary profit is the impermanent loss

Arbitrage

StepEventETH ReserveUSDC ReserveValue @ $2,200Notes
0Deposit100.00000000200,000.00000$400,000.00k = 20,000,000
1Market → $2,200100.00000000200,000.00000$400,000.00Hold value = $420,000
2Arb adds 10,000 USDC100.00000000210,000.00000$422,000.00temp k = 21,000,000
3CPMM: k/210,00095.23809524210,000.00000$419,523.81IL = -$476.19
4Arb output4.76190476 ETH-10,000.00+$476.19 profit10k/4.76190476 = $2,100 avg

Holding

StepEventETHUSDCValue @ $2,200Notes
0Deposit100.00000000200,000.00000$400,000.00Same start
1Market → $2,200100.00000000200,000.00000$420,000.00+5.00%
2No trades100.00000000200,000.00000$420,000.00Perfect

Arbitrage profit = LP impermanent loss exactly.

Hypothetical arbitrage with market prices

StepEventETH ReserveUSDC ReserveValue @ $2,200Notes
0Deposit100.00000000200,000.00000$400,000.00Same
1Market → $2,200100.00000000200,000.00000$400,000.00Stale
2Arb adds 10,000 USDC100.00000000210,000.00000$422,000.00Same input
3Market: 210k/2,20095.45454545210,000.00000$420,000.00IL = $0
4Arb output4.54545455 ETH-10,000.00$0 profitFair price

Market-price rebalancing keeps the $476.19 in the pool instead of transferring it to arbitrageurs.