How Swaps Work
Walk through a Uniswap swap step-by-step โ see the Solidity code executing, the contract call chain, and how multi-hop routing finds the best path.
๐ฌ Transaction Walkthrough
Click "Next Step" to advance through each stage of a swap. Watch the state change and see the actual code being executed.
๐ก Router โ Factory โ Pair Call Chain
Follow the animated call chain as your swap travels through Uniswap's contracts.
๐ Multi-Hop Routing
Sometimes there's no direct pool. The router chains swaps through intermediate tokens. Watch how a multi-hop swap executes.
Why multi-hop? Swapping LINK โ DAI through LINK/ETH + ETH/USDC + USDC/DAI might give a better rate than a thin LINK/DAI pool. The router calculates the optimal path.