New advertisers: 50% off your first month with code FIRSTMONTHSee slots
uniswap avatar

V4 Security Foundations

Security-first guide for Uniswap v4 hooks covering threat models, permission risks, and the NoOp rug pull attack.

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

What it does

  • Covers the v4 hook threat model, a risk matrix for all 14 hook permission flags, and delta accounting fundamentals
  • Includes a CRITICAL walkthrough of the NoOp rug pull via beforeSwapReturnDelta, with detection steps before interacting with hooks
  • Enforces PoolManager caller verification (msg.sender == address(poolManager)) and router allowlisting for user identity checks
  • Designed for developers building or auditing v4 hooks before writing hook code or seeking audit requirements

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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:

Details

Repository
github.com/uniswap/uniswap-ai
Categories
Web3 & Crypto, Security
First seen
May 16, 2026

More from uniswap/uniswap-ai

All 10

Similar to V4 Security Foundations

More Web3 & Crypto