v4-security-foundations

Guide Solidity developers in securing Uniswap v4 hooks against fund drain vulnerabilities.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/PSFREQUENCY/silopolis --skill v4-security-foundations-psfrequency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: v4-security-foundations
Source: https://github.com/PSFREQUENCY/silopolis/tree/main/.agents/skills/v4-security-foundations
Command: npx skills add https://github.com/PSFREQUENCY/silopolis --skill v4-security-foundations-psfrequency

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Uniswap v4 hooks introduce critical security risks including NoOp rug pulls, delta accounting errors, and fund drainage if implemented without specialized security guidance, leaving developers vulnerable to costly exploits.

Core Features & Use Cases

  • Comprehensive Threat Modeling: Detailed breakdown of all 14 v4 hook permission risk levels, caller verification requirements, and common attack vectors like NoOp rug pulls.
  • Vulnerability Mitigation Guides: Step-by-step fixes for high-severity issues including reentrancy, unbounded loop DoS, liquidity locks, and token handling hazards.
  • Pre-Deployment Resources: Complete security checklists, gas budget guidelines, risk scoring systems, and references to audited production hooks for real-world implementation.
  • Use Case: Solidity developers building Uniswap v4 hooks can use this skill to audit their code, validate delta accounting, and meet security requirements before mainnet deployment.

Quick Start

Use the v4-security-foundations skill to review your Uniswap v4 hook implementation for critical vulnerabilities and generate a tailored pre-deployment security checklist.

Frequently Asked Questions about v4-security-foundations

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

FAQPage Schema
How do I prevent NoOp rug pulls in Uniswap v4 hooks?

To prevent NoOp rug pulls in Uniswap v4 hooks, implement strict caller verification and validate delta accounting to ensure attackers cannot bypass liquidity settlement. This skill provides step-by-step mitigation guides for NoOp attacks and fund drainage vulnerabilities.

What are the 14 Uniswap v4 hook permission risk levels?

The 14 Uniswap v4 hook permission risk levels categorize threat vectors based on the specific hook callbacks enabled, such as beforeSwap or afterAddLiquidity. This skill provides comprehensive threat modeling detailing each permission's risk profile and required security checks.

How do I audit Uniswap v4 hooks before mainnet deployment?

Audit Uniswap v4 hooks before mainnet deployment by running through a complete pre-deployment security checklist covering reentrancy, unbounded loop DoS, liquidity locks, and gas budget guidelines. This skill generates tailored checklists for production hook deployments.

How do I validate delta accounting in Solidity v4 hooks?

Validate delta accounting in Solidity v4 hooks by ensuring all balance changes are accurately settled before execution completes to prevent fund drainage. This skill offers security-first development guidance to verify delta accounting and identify accounting errors.

Does this Uniswap v4 hook security guidance cover reentrancy and token handling hazards?

Yes, this Uniswap v4 hook security guidance covers high-severity vulnerability mitigation including reentrancy, unbounded loop DoS, liquidity locks, and token handling hazards. It provides step-by-step fixes for these common attack vectors.