uniswap-v4-hooks

Develop permissioned Uniswap v4 hooks for on-chain liquidity management.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill uniswap-v4-hooks-ccashwell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: uniswap-v4-hooks
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/uniswap-v4-hooks
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill uniswap-v4-hooks-ccashwell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables developers to design and implement external hooks for Uniswap v4 pools with granular permission controls and lifecycle callbacks, unlocking custom liquidity logic, fees, and pricing strategies.

Core Features & Use Cases

  • Architectural overview of PoolManager hooks and per-pool hooks.
  • Define permission flags for all callbacks (beforeInitialize, afterSwap, etc.).
  • Access to complete callback signatures and a reusable hook template.
  • Pattern examples: dynamic fees, custom curves, TWAMM, limit orders, and oracle/twap integrations.
  • Testing and mining deployment guidance using Foundry.

Quick Start

Create a MyHook contract implementing getHookPermissions(), deploy it with the PoolManager, and verify callback execution in tests.

Frequently Asked Questions about uniswap-v4-hooks

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

FAQPage Schema
How do I implement permissioned Uniswap v4 hooks for custom liquidity logic?

To implement permissioned Uniswap v4 hooks, define permission flags for lifecycle callbacks like beforeInitialize and afterSwap, then deploy your contract with the PoolManager. This enables custom liquidity logic, dynamic fees, and specific pricing strategies across pools.

What are Uniswap v4 hook permission flags and how do they work?

Uniswap v4 hook permission flags are boolean settings that dictate which lifecycle callbacks a hook executes. Defining these flags for callbacks like beforeInitialize or afterSwap ensures the PoolManager correctly triggers your custom dynamic fee or oracle logic.

How do I test Uniswap v4 hooks and callback selectors using Foundry?

You test Uniswap v4 hooks using Foundry by deploying your hook contract with the PoolManager and verifying callback execution in test scripts. This validates correct selectors, per-pool state, and safe integration before production deployment.

Can I build dynamic fee strategies and price oracles with Uniswap v4 hooks?

Yes, you can build dynamic fee strategies and price oracles with Uniswap v4 hooks. The hook architecture supports custom curves, TWAMM, limit orders, and oracle integrations by utilizing explicit callback signatures and per-pool state management.

Does this Skill provide templates for Uniswap v4 hook deployment and mining?

This Skill provides a reusable hook template, complete callback signatures, and deployment guidance for mining. It ensures correct selector implementation and safe integration when deploying custom execution logic to Uniswap v4 pools.