📘 UNISWAP V2
1. 🎯 Motivation: Why V2?
V1 was genius, but quirky:
- Only ETH ↔ Token pairs → all token-to-token trades needed two hops (DAI→ETH, then ETH→USDC).
- No reliable on-chain price oracles → easy to manipulate in a single block.
- Limited composability for other DeFi protocols.
- LP tokens were primitive, and liquidity efficiency was weak.
The mission of V2 was simple: make swaps more direct, composable, and secure while keeping the elegance of AMMs.
2. 🏗️ Key Architectural Changes
🔹 Direct ERC20 ↔ ERC20 Pairs
- V2 allows any ERC20 token to be paired directly with any other ERC20.
- Example: Instead of DAI→ETH→USDC, you get DAI↔USDC in one hop.
- Fees drop back to 0.3% (single hop) instead of 0.6%, and slippage is reduced.
- ETH is no longer the “forced middleman.”
💡 This was the single biggest fix to V1 inefficiency.
🔹 Price Oracles (Time-Weighted Average Price, TWAP)