uniswap avatar

V4 Security Foundations

If you're building Uniswap v4 hooks, start here before writing any code. This covers the security fundamentals that can make the difference between a safe hook and one that drains user funds. It walks through the threat model (caller verification, sender identity traps), explains the 14 permission flags with their risk levels, and dedicates serious attention to the NoOp rug pull attack via beforeSwapReturnDelta. You also get delta accounting basics, access control patterns, and router verification examples. The tone is appropriately paranoid because hook vulnerabilities have direct fund loss implications. Good for anyone touching PoolManager integration or reviewing hook code for the first time.

skills.sh installs
1.2K
GitHub stars
236
last updated
Aug 21, 2026

Install

$ npx -y skills add uniswap/uniswap-ai --skill v4-security-foundations --agent claude-code

Installs into .claude/skills of the current project.

Files

v4 Hook Security Foundations

Security-first guide for building Uniswap v4 hooks. Hook vulnerabilities can drain user funds—understand these concepts before writing any hook code.

Threat Model

Before writing code, understand the v4 security context:

Sponsors

Details

Repository
github.com/uniswap/uniswap-ai
Categories
Frontend Development, Security
First seen
May 16, 2026

More from uniswap/uniswap-ai

All 10
1yeachan-heo avatarhudyeachan-heo/oh-my-claudecodeConfigure HUD display options (layout, presets, display elements)1.2Kskills.sh installs
2wshuyi avatartranslate-pdfwshuyi/translate-pdf-skillTranslate PDF documents to any language while preserving original structure, layout, and styling (colors, backgrounds, positions). Use when user wants to: (1) t1.2Kskills.sh installs
3zsyggg avatarpaper-analyzerzsyggg/paper-craft-skills将学术论文转化为深度HTML长文。6轮强制工作流、代码仓库搜索、公式渲染、Mermaid图表。 3种写作风格,输出可直接分享的精美HTML页面。1.2Kskills.sh installs
4index-how avatarvocabularyindex-how/vocabularyThe precise design and UI vocabulary used on index.how/to/articulate — covering typography, color, iconography, layout, interaction, motion, accessibility, info1.2Kskills.sh installs
5mcollina avatarlinting-neostandard-eslint9mcollina/skillsConfigures ESLint v9 flat config and neostandard for JavaScript and TypeScript projects, including migrating from legacy `.eslintrc*` files or the `standard` pa1.2Kskills.sh installs
6vtex avatarvtex-io-session-appsvtex/skillsApply when building or debugging a VTEX IO session transform app (vtex.session integration). Covers namespace ownership, input-vs-output fields, transform order1.2Kskills.sh installs