uniswap-v4-hook-access-control

uniswap-v4-hook-access-control is a skill for Claude Code, Codex from mtarcure/claude-vibe-squad. It costs 87 tokens per session (595 once invoked), scanned A, original, MIT.

A security audit guide for Uniswap v4 hooks, which are custom blockchain contracts called around trades or liquidity changes. It checks that callbacks accept calls only from the authorised pool manager and for authorised pools.

In plain words
What is it for?
It is for reviewing swap, liquidity, and donation callbacks, checking their authority guards, and tracing how supplied pool data affects token accounting.
Why use it?
It targets missing caller and pool checks that can let attackers supply false accounting data and potentially drain funds.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It is for reviewing swap, liquidity, and donation callbacks, checking their authority guards, and tracing how supplied pool data affects token accounting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mtarcure/claude-vibe-squad --skill uniswap-v4-hook-access-control
Clone the repo
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uniswap-v4-hook-access-control

README.md
[![agentmods](https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control/github.svg)](https://agentmods.dev/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control)
Your own site
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for uniswap-v4-hook-access-control

Your own site · 80×15
<a href="https://agentmods.dev/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control"><img src="https://agentmods.dev/badge/skills/mtarcure/claude-vibe-squad/uniswap-v4-hook-access-control.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 595 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.00595
Opus 5.5 $0.00035 $0.00238
Sonnet 5.5 $0.00017 $0.00119
Haiku 4.5 $0.00009 $0.00060

Measured 1mo ago against content hash a434ec7f7860, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

uniswap-v4-hook-access-control scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/uniswap-v4-hook-access-control/SKILL.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Enumerate every hook callback the target exposes (slither, and read the Hooks permission bitmap on the deployed hook via cast).
  2. 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.
  3. Trace the hook's internal accounting: identify any state (redemption balances, reserve counters, minted supply) mutated inside a callback from parameters the caller controls.
  4. 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.
  5. Add a forge/halmos invariant: "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.

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 41 lines · 87 tokens per session scan A a434ec7f7860

Subscribe to this mod's changes

uniswap-v4-hook-access-control is a skill published in the GitHub repository mtarcure/claude-vibe-squad (165 stars, last pushed 1mo ago), licensed MIT. It adds 87 tokens to every session and 595 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-19.