Arbitrage
This page covers the necessary concepts for the reader to understand arbitrage and impermanent loss in Uniswap V2.
Definition
Section titled “Definition”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.
Trade-offs
Section titled “Trade-offs”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.
Uniswap V2
Section titled “Uniswap V2”- 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.
Arbitrage steps
Section titled “Arbitrage steps”We will showcase a basic arbitrage scenario to reveal important info:
| Step | Description | Reserve ratio | Price |
|---|---|---|---|
| 1 | Pool1: has 10 ETH and 0.25 WBTC | 10 ETH : 0.25 WBTC | 0.025 WBTC per ETH |
| 2 | Market2: ETH is priced at 0.03 WBTC | 0.03 WBTC per ETH | |
| 3 | Pool1: Arbitrageurs buy ETH from Pool1 using WBTC | ETH down, WBTC up | 0.03 WBTC per ETH |
| 4 | Market2: Arbitrageurs sell the ETH bought from Pool1 in Market2 for WBTC |
Pool Value
Section titled “Pool Value”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,
| Side | Amount | Value at pool price |
|---|---|---|
| ETH | 10 ETH | 0.25 WBTC |
| WBTC | 0.25 WBTC | 0.25 WBTC |
Therefore, when arbitraged, the pool value in terms of tokenY or tokenX is:
50:50 token value balance is not a hard guarantee from the contract itself, it’s the result of arbitrage
Pool USD Value
Section titled “Pool USD Value”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:
Impermanent loss
Section titled “Impermanent loss”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.
Formula
Section titled “Formula”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
| Price Change | rrr | IL(r) |
|---|---|---|
| 0% | 1.0 | 0.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% |
Pool value reduction
Section titled “Pool value reduction”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.
Example
Section titled “Example”Below there is a basic example (no fees) that shows that arbitrageur’s monetary profit is the impermanent loss
Arbitrage
| Step | Event | ETH Reserve | USDC Reserve | Value @ $2,200 | Notes |
|---|---|---|---|---|---|
| 0 | Deposit | 100.00000000 | 200,000.00000 | $400,000.00 | k = 20,000,000 |
| 1 | Market → $2,200 | 100.00000000 | 200,000.00000 | $400,000.00 | Hold value = $420,000 |
| 2 | Arb adds 10,000 USDC | 100.00000000 | 210,000.00000 | $422,000.00 | temp k = 21,000,000 |
| 3 | CPMM: k/210,000 | 95.23809524 | 210,000.00000 | $419,523.81 | IL = -$476.19 |
| 4 | Arb output | 4.76190476 ETH | -10,000.00 | +$476.19 profit | 10k/4.76190476 = $2,100 avg |
Holding
| Step | Event | ETH | USDC | Value @ $2,200 | Notes |
|---|---|---|---|---|---|
| 0 | Deposit | 100.00000000 | 200,000.00000 | $400,000.00 | Same start |
| 1 | Market → $2,200 | 100.00000000 | 200,000.00000 | $420,000.00 | +5.00% |
| 2 | No trades | 100.00000000 | 200,000.00000 | $420,000.00 | Perfect |
Arbitrage profit = LP impermanent loss exactly.
Hypothetical arbitrage with market prices
| Step | Event | ETH Reserve | USDC Reserve | Value @ $2,200 | Notes |
|---|---|---|---|---|---|
| 0 | Deposit | 100.00000000 | 200,000.00000 | $400,000.00 | Same |
| 1 | Market → $2,200 | 100.00000000 | 200,000.00000 | $400,000.00 | Stale |
| 2 | Arb adds 10,000 USDC | 100.00000000 | 210,000.00000 | $422,000.00 | Same input |
| 3 | Market: 210k/2,200 | 95.45454545 | 210,000.00000 | $420,000.00 | IL = $0 |
| 4 | Arb output | 4.54545455 ETH | -10,000.00 | $0 profit | Fair price |
Market-price rebalancing keeps the $476.19 in the pool instead of transferring it to arbitrageurs.