Uniswap V4 Pools

Explain PoolKey fields and PoolId computation in Uniswap V4.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/cyotee/crane --skill uniswap-v4-pools
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Uniswap V4 Pools
Source: https://github.com/cyotee/crane/tree/main/.claude/skills/uniswap-v4-pools
Command: npx skills add https://github.com/cyotee/crane --skill uniswap-v4-pools

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PoolKey, PoolId, and related Uniswap V4 state concepts can be complex to reason about; this skill consolidates definitions and relationships to help you quickly identify pools and understand their state.

Core Features & Use Cases

  • Clarifies PoolKey fields (currency0, currency1, fee, tickSpacing, hooks) and PoolId derivation.
  • Explains Pool State layout including Slot0, tick data, and positions.
  • Use Case: When modeling or auditing Uniswap V4 pools, retrieve PoolKey to PoolId mappings and inspect pool state quickly.

Quick Start

Use Uniswap V4 Pools to map a PoolKey to its PoolId and inspect its Slot0 and balance data.

Frequently Asked Questions about Uniswap V4 Pools

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

FAQPage Schema
What is a PoolKey in Uniswap V4 and how does it identify a pool?

A PoolKey in Uniswap V4 identifies a pool using currency0, currency1, fee, tickSpacing, and hooks fields. These PoolKey parameters distinguish individual pools and serve as the base input for deriving a pool's unique identifier.

How is PoolId derived from a Uniswap V4 PoolKey?

The PoolId is derived by hashing the PoolKey struct fields in Uniswap V4. This computation maps the currency pair, fee, tickSpacing, and hooks configuration into a unique identifier used to track and retrieve pool state.

How do I inspect Uniswap V4 pool state and Slot0 data?

To inspect Uniswap V4 pool state, you retrieve the Slot0 data and balance information using the pool's PoolId. Slot0 contains the core state variables, while the pool state layout tracks tick data and active positions for the currency pair.

Does Uniswap V4 pool state track tick data and positions?

Yes, Uniswap V4 pool state tracks tick data and positions alongside Slot0. The pool state layout organizes these components to monitor the current price, liquidity bounds, and individual position details for the specified currency pair.

Can I map a Uniswap V4 PoolKey to its PoolId for contract auditing?

Yes, you can map a Uniswap V4 PoolKey to its PoolId to audit or model pools. This mapping clarifies the relationship between pool initialization parameters and the resulting identifier, allowing you to quickly inspect Slot0 and balance data.