mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control
Claude Code and agent skill by mtarcure/claude-vibe-squad
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when the target integrates a Uniswap v4 singleton hook and you must check each hook callback (beforeSwap, afterSwap, beforeAddLiquidity, donate) for the missing-caller-check class — a callback that fails to require msg.sender is the PoolManager or to validate the supplied PoolKey lets an attacker invoke it directly with forged accounting to mint unbacked tokens or drain the pool.
Install
npx vskill@latest install mtarcure/claude-vibe-squad/uniswap-v4-hook-access-controlSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Uniswap v4 Hook Callback Access-Control Audit
Audit Uniswap v4 (and v4-style singleton/hook) integrations for the missing-caller-check class: a custom hook callback (beforeSwap/afterSwap/beforeAddLiquidity/donate/etc.) that does not verify msg.sender == address(poolManager) and does not validate the supplied PoolKey, letting an attacker call the hook directly with forged accounting parameters to mint unbacked tokens or drain the pool.
Source: corpus A §I.6 — Dedaub / Cyfrin / Cork Protocol, May 2025 ($11M pool drain). Impact class: funds theft / pool drain (intrinsic). Governing method: Phase-3a hypothesis lane of systematic-attacking; leads only into the full verification spine.
Method
- Enumerate every hook callback the target exposes (
slither, and read theHookspermission
bitmap on the deployed hook via cast).
- For each callback, confirm BOTH guards: (a) a strict
require(msg.sender == address(poolManager))
(or the framework's equivalent authority check), and (b) validation that the PoolKey / currency / fee parameters correspond to a pool the hook is actually authorized for — not attacker-chosen.
- Trace the hook's internal accounting: identify any state (redemption balances, reserve counters,
minted supply) mutated inside a callback from parameters the caller controls.
- PoC on
anvil --fork: call the unguarded callback directly (bypassing the PoolManager) with
inflated deposit/redemption values; assert unbacked mint or drain. Link-level negative control = the same call through the real PoolManager reverts or nets to zero.
- Add a
forge/halmosinvariant: "hook accounting only advances via PoolManager-originated calls
with a registered PoolKey."
Acceptance
- Every hook callback is classified for the caller check AND PoolKey validation.
- The direct-call PoC drains/mints against a real fork; the PoolManager-routed negative control does
not.
- Finding names the exact unguarded callback and the accounting field it corrupts; deduped against
the Cork / v4-hook advisory corpus before submission.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodel-lanes/gemini/.agents/skills/uniswap-v4-hook-access-control/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control)