Uniswap v3 introduces concentrated liquidity, allowing liquidity providers to allocate capital within specific price ranges rather than across the full range. The post explains the tick system (price = 1.0001^tick), tick spacing for gas efficiency, and the sqrtPriceX96 fixed-point representation used in Solidity. Key smart contract functions are covered: initialize() sets the pool's starting price, mint() creates a liquidity position, burn() removes liquidity (accounting only), and collect() transfers tokens to the user. Design insights include discrete liquidity modeling, capital efficiency gains, gas optimization via slot0 packing, and separation of concerns across the three core functions.
Table of contents
What Makes Uniswap v3 Different?What is Tick Spacing?Why Does Tick Spacing Exist?What is a Tick?Why Do Ticks Exist?sqrtPriceX96 (Core Representation)Core Functions Explainedinitialize()mint()Get Kshitij Bhoite ’s stories in your inboxliquidityDelta_modifyPosition()_updatePosition()burn()collect()Key Design InsightsFinal Thoughts677 Impressions