Koinlytics

Uniswap V2 vs V3 vs V4

DeFi Protocolsintermediate8 min read
The evolution of the AMM. Constant product, concentrated liquidity, and hooks. What each version fixed and what it broke.

Uniswap is the most-used DEX in DeFi and has now shipped four versions. Each version answered a specific pain the previous had.

V2 (2020)

The classic x*y=k constant product AMM. LPs deposit equal value of two tokens, get LP tokens back, earn 0.30% of every trade. Simple, uncensorable, unstoppable. Weakness: liquidity is spread evenly across all prices from zero to infinity, so most of the deposit sits idle at prices nobody trades at.

V3 (2021)

Concentrated liquidity. LPs pick a price range. Their capital only earns fees when the price is inside that range, but capital efficiency jumps 100-4000x within the range. Multiple fee tiers (0.01%, 0.05%, 0.30%, 1.00%). Great for stablecoin pairs (tight range), tough for volatile pairs (constant rebalancing).

V4 (2024)

Hooks. Every pool can have custom logic attached: dynamic fees, TWAMM (time-weighted average market maker), MEV-resistant designs, limit orders, on-chain price oracles, KYC gating. Singleton architecture puts all pools in one contract, so gas costs drop.

The trade-offs across versions

Where you meet each

V2 forks (Sushiswap, Pancakeswap) dominate long-tail meme tokens because they are simplest to fork. V3 dominates deep stable pairs (USDC/DAI, WBTC/ETH). V4 pools are launching for stable-optimal, MEV-mitigated, and custom-fee use cases.

Liquidity provider math

V2: 50/50 by value, IL according to the classic curve.

V3: within your range, you experience amplified IL. Outside your range, you hold only one of the two tokens (you were fully rebalanced into the loser). Fee earnings only accrue in-range.

V4: same as V3 for basic pools; hooks can change everything.

NextCurve and the StableSwap Invariant
Powered by Koinlytics · Free crypto education.

Ready to try what you just learned?

Open the Koinlytics dashboard and see the concepts live on your real portfolio.

Launch App