V3 Factory & Pool
V3 Factory
The V3 Factory creates and indexes V3 pools. Unlike V2, the same token pair can have multiple pools with different fee tiers.Key Functions
getPool
Returns the pool address for a token pair and fee tier.| Parameter | Description |
|---|---|
tokenA, tokenB | Token addresses (order doesn’t matter) |
fee | Fee tier: 100, 500, 3000, or 10000 |
ABI
V3 Pool
Each V3 Pool contract manages concentrated liquidity positions and swap execution for a specific token pair and fee tier.Key Functions
slot0
Returns the current pool state.| Return | Description |
|---|---|
sqrtPriceX96 | Current price as sqrt(price) * 2^96 |
tick | Current tick index |
feeProtocol | Protocol fee setting |
unlocked | Reentrancy guard state |
liquidity
Returns the total active (in-range) liquidity.fee / tickSpacing
token0 / token1
ABI
Example: Read Pool Price
Price Conversion
The pool stores price assqrtPriceX96. To convert:
@uniswap/v3-sdk library or the formulas in Ticks and Ranges.