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
- V2 is simplest, most censorship-resistant, and best for passive LPs.
- V3 is capital efficient but active LPing is nearly a job.
- V4 turns pools into a platform. Any developer can build a novel AMM as a hook.
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.
Koinlytics