v4-security-foundations
CommunitySecure Uniswap v4 hooks from day one.
AuthorLennyDevX
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Security-first guide for building Uniswap v4 hooks. Hook vulnerabilities can drain user funds—understand these concepts before writing any hook code.
Core Features & Use Cases
- Threat Model: Understand who can trigger hooks, how data flows, and where to enforce verification.
- Permission Flags Risk Matrix: Learn risk levels for each hook point and prove correct guardrails.
- Delta Accounting & Safety: Ensure funds balance and safe settlement patterns to prevent losses.
- Access Controls & Verification: Patterns to verify PoolManager and router vs user identity.
- Router Verification Patterns: Examples to allowlist routers and safely decode hookData.
- Token Handling Hazards: Manage fee-on-transfer tokens and reentrancy hazards safely.
- Base Hook Template: Reference structure for secure hooks with safe defaults.
- Security Checklist: Steps to validate security before deployment.
- External Resources: Links to Uniswap v4 docs and audit references.
Quick Start
Follow this guide to implement secure v4 hooks by validating PoolManager access and avoiding tx.origin.
Dependency Matrix
Required Modules
None requiredComponents
Standard packageđź’» Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: v4-security-foundations Download link: https://github.com/LennyDevX/nuxchain-app/archive/main.zip#v4-security-foundations Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.