DEX AMM Impermanent Loss & Concentrated Liquidity Workbench
A deterministic quantitative modeling engine for Constant Product ($x \cdot y = k$) and Concentrated Liquidity ($[P_a, P_b]$) automated market makers. Calculate impermanent loss, fee accrual velocity, capital efficiency multipliers, and the breakeven race against 100% HODL strategies.
| Price Move | New Price | Impermanent Loss | Fee Accrual | Net Return vs HODL |
|---|
Deterministic AMM Mathematics & Derivations
Automated market makers eliminate centralized order books by enabling programmatic token swaps along deterministic invariant curves. The divergence in asset valuation between pooled liquidity and static holding is mathematically proved below.
1. Constant-Product Impermanent Loss Formula (Uniswap v2)
Because the geometric mean of token reserves is conserved ($x \cdot y = k$), arbitrageurs trade against the pool whenever external market prices diverge, forcing the pool to buy depreciating assets and sell appreciating assets. This produces a strictly negative divergence loss $IL(k) \le 0$ for all $k \ne 1$.
2. Uniswap v3 Concentrated Liquidity Capital Efficiency Multiplier
By bounding liquidity within $[P_a, P_b]$, virtual reserves simulate a much larger full-range pool, providing $\eta$ times greater fee earnings per dollar of capital. Within the active tick range $[P_a, P_b]$, the position value $V_{LP}(P)$ evolves non-linearly:
If $P \ge P_b$, the LP position holds $100\%$ Token B (the quote asset, having sold off all Token A). If $P \le P_a$, the position holds $100\%$ Token A.
3. Fee Accrual Break-Even Calculus
Providing concentrated liquidity is a race between fee collection velocity and price divergence. If price volatility outpaces the daily fee burn rate, the LP suffers net economic underperformance compared to passive buy-and-hold.
Executive Strategic Brief: The Microeconomics of Decentralized Liquidity
Providing liquidity to concentrated automated market makers is functionally equivalent to writing short gamma volatility straddles:
The Short Volatility Profile: Like an options seller collecting option premium (Theta) while taking on unlimited downside tail risk (Gamma), a Uniswap v3 LP collects continuous trading fees in exchange for accepting convex adverse selection. When price moves smoothly within range, the LP earns outsized annualized yields. But when a sharp macro catalyst occurs, arbitrageurs extract profit via toxic order flow, leaving the LP with 100% of the declining asset.
Just-In-Time (JIT) MEV Liquidity Extraction: In public mempools, sophisticated MEV searchers detect large upcoming swaps, mint ultra-tight concentrated liquidity right in front of the trade (within 1 tick), capture 99% of the transaction fee, and immediately burn the liquidity within the exact same Ethereum block. This MEV phenomenon dilutes organic passive LP fee yield, making off-chain automated position management imperative.