🦄 How Uniswap Actually Works

A comprehensive interactive deep dive into the protocol that pioneered decentralized trading. Seven chapters — from the math behind AMMs to concentrated liquidity and MEV.

Chapter 1
The AMM Concept
Animated pool visualization with flowing tokens, the x·y=k curve in action, and a side-by-side comparison of order books vs automated market makers.
x·y=kAnimated PoolsOrder Book vs AMM
Chapter 2
How Swaps Work
Step-by-step transaction walkthrough with real Solidity code, animated contract call chains, and multi-hop routing you can drag to build.
Router → PairSolidityMulti-hop
Chapter 3
Price Impact & MEV
Simulated mempool, sandwich attack animation, adjustable slippage tolerance, and profit/loss tracking for you vs the bot.
Sandwich AttackSlippageMEV Bots
Chapter 4
Liquidity & Impermanent Loss
LP position simulator with time-lapse trading, real-time P&L, fees vs IL tracker, and strategy comparison (V2 vs V3 vs HODL).
Impermanent LossLP SimulatorTime-lapse
Chapter 5
Concentrated Liquidity
Interactive tick visualization, click-to-add positions, price sweep animation, capital efficiency calculator, and JIT liquidity demo.
TicksRangesJIT Liquidity
Chapter 6
TWAP & Oracles
Try to manipulate the TWAP with a whale wallet, see why it's expensive, and compare spot vs TWAP vs Chainlink feeds in real-time.
TWAPManipulationChainlink
Chapter 7
Architecture & Code
Interactive contract explorer, animated transaction flow from user to pair, CREATE2 demo, and flash swap walkthrough.
ContractsCREATE2Flash Swaps