A practical catalog of Uniswap v4 hook patterns and production implementations.
Browse the catalog at v4hooks.com.
Each entry includes:
- a pinned GitHub source link
- a licensed Solidity excerpt
- the hook's permission flags
- the callbacks that define its behavior
- chain, category, deployment, audit, and license metadata when available
Warning
This catalog is not an audit. A confirmed source means the linked code exists; it does not mean the hook is safe to deploy with funds.
The catalog covers:
- dynamic fees and MEV protection
- limit orders, stop-losses, and take-profit orders
- liquidity management and launchpads
- TWAMMs, oracles, lending, and wrappers
- production hooks from projects such as Clanker, EulerSwap, Flaunch, and Zora
- first-party reference implementations maintained in this repository
Start with the full catalog, browse by category, or read the building guides.
| Path | Contents |
|---|---|
hooks/ |
Catalog records in YAML; the source of truth |
contracts/ |
First-party Solidity reference implementations |
test/ |
Foundry tests for first-party contracts |
src/ |
Astro site and Cloudflare Worker |
schema/ |
JSON Schema for catalog records |
scripts/ |
Validation, generation, and catalog sync tools |
Generated machine-readable files:
hooks.json— complete structured catalogllms.txt— compact index for agentsllm-full.txt— full catalog for agentsSKILLS.md— agent workflow for using the repository
Copy the template, fill in the required metadata, and validate it:
cp hooks/_template.yml hooks/{slug}.yml
npm install
npm run validateThe filename must match slug, and source.url must point to a pinned public GitHub file. See CONTRIBUTING.md for the schema rules and review checklist.
Requirements:
- Node.js 22.12 or newer
- npm 10.8 or newer
- Foundry for Solidity builds and tests
nvm use
npm install
npm run validate
npm run build
forge build
forge testUse npm run dev for the local site. Pushes to main deploy through Cloudflare Workers Builds; GitHub Actions validates the catalog and runs the Foundry suite.
For local ad API development, copy .dev.vars.example to .dev.vars. Production requires the HELIO_PAYLINK_ID and HELIO_WEBHOOK_SECRET Worker secrets.
Astro, TypeScript, Solidity, Foundry, Cloudflare Workers, and D1.
Catalog excerpts retain the licenses declared by their upstream sources. First-party code in this repository is covered by LICENSE.
Report vulnerabilities according to SECURITY.md.