AMM Liquidity Provision and Impermanent Loss
Providing liquidity to an automated market maker (AMM) is an inventory-management strategy disguised as yield farming. A liquidity provider deposits two assets and earns fees from swaps, but the pool mechanically sells the asset that rises and buys the asset that falls. The fee income is compensation for adverse selection, volatility, smart-contract risk, and potentially costly rebalancing—not a risk-free annual percentage yield.
Constant-product inventory
In a simple constant-product pool, reserves satisfy \(x y = k\). A trader who buys one token shifts reserves and changes the marginal price. The LP owns a pro-rata claim on the new inventory mix. If the external price rises, arbitrageurs buy the appreciating asset from the pool until its price aligns, leaving the LP underweight the winner relative to holding both assets.
pool_price = y / x
value_LP(P) = x(P) × P + y(P)
For a 50/50 full-range pool with relative price ratio \(r=P1/P0\), impermanent loss relative to passive holding is
IL(r) = 2 × sqrt(r) / (1 + r) - 1
It is called “impermanent” only because a price reversal can reverse the comparison. If the position is withdrawn after the move, the loss versus holding is realized. Fees can offset it, but only if volume and fee share exceed the adverse-selection cost.
| Source of LP P&L | Effect | Quant question |
|---|---|---|
| Swap fees | Positive gross revenue | Is volume informed or noise-driven? |
| Price divergence | Negative versus HODL | How much realized variance occurs? |
| Range management | Can improve capital efficiency | What are rebalance costs and timing? |
| Token incentives | Additional reward | Is reward price correlated with pool risk? |
| Gas and MEV | Execution cost | Can position changes be protected? |
Concentrated liquidity changes the payoff
Concentrated-liquidity AMMs let an LP choose a price range. Within the range, capital earns fees more efficiently; outside it, the position becomes almost entirely one token and stops earning fees. The payoff resembles a short-volatility position with range-dependent gamma. A narrow range increases fee density but requires active management and can create violent inventory transitions.
import numpy as np
def impermanent_loss(price_ratio):
return 2 * np.sqrt(price_ratio) / (1 + price_ratio) - 1
def net_lp_edge(fees, gas, il, incentive_value=0.0):
return fees + incentive_value - gas + il # IL is non-positive
The formula is an attribution identity, not a forecast. Estimate fees from actual share of active liquidity and swap flow; total-volume APR is not your revenue if liquidity is concentrated elsewhere or your range is inactive.
Adverse selection and toxic flow
AMMs quote continuously without distinguishing informed traders from retail flow. When an external market moves, arbitrageurs trade the stale pool price. This is the on-chain analogue of inventory adverse selection in inventory risk market making. The LP earns spread-like fees in normal flow and loses to fast information in volatile flow.
Pool selection should therefore use flow composition, volatility, oracle quality, asset correlation, and competitive liquidity—not just historical APR. A stablecoin pool may have low directional IL but substantial depeg and smart-contract tail risk. A correlated ETH-staking pair may still diverge during redemption or oracle stress.
Execution and MEV
Minting, collecting, and rebalancing liquidity are on-chain transactions. Public transactions can be sandwiched or back-run, and a rebalance after a price move often competes with better-informed searchers. Use protected order flow where supported, set bounds carefully, and include gas in the decision rule. MEV and on-chain execution describes the relevant execution risks.
A backtest must reconstruct pool state at each block, including liquidity distribution by tick, fees, protocol-fee changes, and gas. Applying daily pool volume times a static fee share will materially overstate returns. It ignores intra-block movement, active-range time, and the fact that an LP cannot rebalance at an ideal historical price.
Risk and sizing
Treat an LP position as an inventory book. Report delta to each asset, gamma/convexity profile, out-of-range probability, fee forecast, and smart-contract/bridge concentration. Diversifying across pools that share the same collateral or oracle is not genuine diversification. Stress a 30–50% spot move, gas spike, stablecoin impairment, and inability to exit.
Do not finance LP positions with fragile leverage. A price-driven inventory shift can increase the very asset used as collateral or debt at the worst time. DeFi borrowing introduces a second liquidation layer, explored in DeFi lending and liquidation risk.
Key takeaways
- AMM fee income compensates a dynamic inventory position, not idle capital.
- Impermanent loss is the relative cost of mechanically selling winners and buying losers.
- Concentrated ranges improve fee efficiency but add active-management and out-of-range risk.
- Model active liquidity, toxic flow, gas, and MEV at block level for credible results.
- Size LP positions using inventory and protocol-tail scenarios, not headline APR.
