Uniswap V3 Pool

Explain Uniswap V3 pool mechanics, including initialization, swaps, and liquidity operations.

Updated Jan 28, 2026
One-click install
npx skills add https://github.com/cyotee/uniswap-V3-skill --skill uniswap-v3-pool
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Uniswap V3 Pool
Source: https://github.com/cyotee/uniswap-V3-skill/tree/main/.opencode/skills/uniswap-v3-pool
Command: npx skills add https://github.com/cyotee/uniswap-V3-skill --skill uniswap-v3-pool

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers understand the core mechanics of the Uniswap V3 pool, including how price and liquidity are tracked, how pool state transitions occur, and how liquidity is minted, swapped, and collected.

Core Features & Use Cases

  • Pool Initialization and State: Explain how the pool is initialized, how slot0 stores price, tick, and observations, and how the per-tick state updates during operations.
  • Liquidity Lifecycle: Describe minting and burning liquidity across price ranges, and how fees accrue per-position.
  • Trade, Observations, and Oracle: Show swap behavior, how observations enable price oracles, and how to interpret events.
  • Use Case: If debugging a pool at a given tick, analyze how slots and ticks reflect price and liquidity.

Quick Start

Use the skill to explain how the UniswapV3Pool initializes the initial sqrtPriceX96 and tick and how a pool's slot0 and observations evolve during the first trades.

Frequently Asked Questions about Uniswap V3 Pool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Uniswap V3 track price and liquidity in a pool?

Uniswap V3 stores price and liquidity state in slot0, which holds the current sqrtPriceX96, active tick, and observation pointer. Per-tick state tracks cumulative liquidity at each tick boundary, enabling concentrated liquidity ranges and efficient price discovery without iterating all positions.

How do I understand swap mechanics and state transitions in Uniswap V3?

Swaps move the active tick across liquidity boundaries, consuming liquidity from positions and updating slot0. Reading the Solidity implementation and event logs reveals how tick crossings trigger liquidity additions and removals, how fees accumulate, and how the pool state evolves between trades.

What happens when I mint or burn liquidity across a price range in Uniswap V3?

Minting adds liquidity between two ticks and updates per-tick state to track boundaries. Burning removes liquidity and calculates accrued fees proportional to swap volume at those ticks. Both operations emit events that validate state consistency and fee collection.

How do Uniswap V3 observations enable price oracles?

Observations record cumulative tick and liquidity data at each block, storing snapshots in slot0's observation array. Historical observations allow downstream contracts to compute time-weighted average prices (TWAP) without external price feeds.

Can I debug a Uniswap V3 pool by analyzing its slot0 and tick state?

Yes. Slot0 reveals the current price, active tick, and fee growth, while per-tick state shows liquidity boundaries and accrued fees. Cross-referencing event flows and state snapshots identifies liquidity gaps, price anomalies, and fee distribution errors.

What's the relationship between tick spacing and fee tier in Uniswap V3 pools?

Each fee tier (0.01%, 0.05%, 0.30%, 1%) defines a pool variant with a corresponding tick spacing. Smaller fee tiers use finer tick resolution, allowing more precise price ranges but increasing gas costs for liquidity management and tick crossings.