Uniswap V4 PoolManager

Explain Uniswap V4 PoolManager unlock patterns, hooks, and delta accounting.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This section describes how to understand and implement the Uniswap V4 PoolManager, including its unlock pattern, pool state management, and hook callbacks.

Core Features & Use Cases

  • Provides insight into the PoolManager architecture, unlock flow, and key interfaces (IPoolManager, IUnlockCallback, hooks).
  • Covers common operations such as Initialize Pool, Modify Liquidity, Swap, Donate, and ERC6909 mint/burn flows.
  • Example: Use this to audit a deployment or to integrate PoolManager into a DApp with hooks and delta accounting.

Quick Start

Ask how to initialize, unlock, and manage pool state using PoolManager in a Uniswap V4 deployment.

Frequently Asked Questions about Uniswap V4 PoolManager

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

FAQPage Schema
How does the Uniswap V4 PoolManager unlock pattern work?

The Uniswap V4 PoolManager unlock pattern requires callers to trigger an unlock and execute operations inside an unlockCallback, allowing the contract to reconcile delta accounting before settling pool state.

How do I initialize a pool and manage liquidity in Uniswap V4?

To initialize a pool and manage liquidity in Uniswap V4, you call Initialize Pool to set parameters, then use Modify Liquidity operations to adjust pool state while tracking delta accounting.

How do hooks integrate with Uniswap V4 pool operations?

Hooks integrate with Uniswap V4 pool operations by executing custom logic through callbacks triggered during core operations like Swap and Modify Liquidity, coordinating directly with the PoolManager state.

How does delta accounting function during a Uniswap V4 swap?

Delta accounting in a Uniswap V4 swap tracks net changes in token balances throughout the unlockCallback flow, ensuring all pool modifications settle correctly before the transaction completes.

Can I use ERC6909 mint and burn flows with Uniswap V4 liquidity pools?

Yes, Uniswap V4 PoolManager uses ERC6909 mint and burn flows to represent liquidity positions, allowing users to mint tokens when adding liquidity and burn them upon withdrawal.

What is the best way to audit a Uniswap V4 PoolManager deployment?

Auditing a Uniswap V4 PoolManager deployment requires verifying the unlockCallback flows, validating delta accounting reconciliation, and checking hook integration paths for correct pool state management.