uniswap-pool-analysis
SKILL.md
Uniswap Pool Analysis
Overview
This skill covers querying and analyzing Uniswap v3/v4 pool state on-chain using viem.
Key Concepts
- sqrtPriceX96: Encoded price format used by Uniswap v3/v4. Convert with
price = (sqrtPriceX96 / 2^96)^2 - Ticks: Discrete price points defining liquidity ranges. Tick spacing depends on fee tier.
- Liquidity: The
Lvalue representing active liquidity at the current tick.
Fee Tiers (v3)
| Fee (bps) | Tick Spacing | Typical Use |
|---|---|---|
| 1 (0.01%) | 1 | Stablecoin pairs |
| 5 (0.05%) | 10 | Correlated pairs |
| 30 (0.30%) | 60 | Standard pairs |