How do I scan a Uniswap v4 hook in QuillShield before an audit?

Paste one prompt into Cursor or Claude to run a QuillShield review of your hook before the manual audit, with the agent told what to watch: callbacks, the sender, access control and deltas.

Last updated . 2 minute read. By the QuillShield team.

Hooks fail where their callbacks meet privileged code. On 28 May 2025 an attacker took 3,761 wstETH, about $12M, from Cork Protocol by combining a rollover pricing exploit with an access control flaw in the Cork Hook, its Uniswap v4 hook. Our page on Uniswap v4 hook vulnerabilities has the background.

What prompt do I give the agent?

This Foundry repo is a Uniswap v4 hook. Run a QuillShield AI-Powered Code Review on the hook and the Solidity in src/. Show the fixed price and wait for my confirm. Pay attention to who can call each hook callback, what the sender argument really is, access control, and deltas. If the wallet cannot cover the quote, show https://shield.quillaudits.com/topup and stop.

What are the steps?

  1. Set up QuillShield in Cursor or Claude. An owner or admin of your organization creates an API key under Settings, API keys, since the agent can't. Then copy the MCP config that QuillShield shows with the key into the agent's MCP settings. It runs the server with npx -y @quillaudits/cli mcp.
  2. Add context before the audit: the hook's permissions, trust assumptions, privileged roles and any earlier audit report. QuillShield takes these with the code.
  3. Paste the prompt. The agent quotes the hook and the Solidity in src/.
  4. Read the price and confirm. If the wallet can't cover the quote, the agent shows shield.quillaudits.com/topup and stops.
  5. Read the findings once the audit is complete, with the exact lines, the impact and a recommended fix for each.
  6. Fix what you agree with, then take the code to your manual audit. If installing the MCP package fails, run the same review from the web app: our guide to running your first audit covers it step by step.

Common questions

Is this a manual audit?

No. It is a pre-audit review that finds issues before your auditors spend time on them. QuillShield does not replace a manual audit, and you can request one from QuillAudits.

What should I add as context for a hook?

Which hook callbacks the hook uses, who is meant to call privileged functions, the trust assumptions about the pools it attaches to, and any earlier audit report.

Sources

QuillShield is building the security layer between AI and money, so you can keep shipping between audits.

Sign-up is free, and new accounts get $50 in credit, good for up to half of an order.

  1. 1Sign up and import a repo
  2. 2See the exact price before anything is charged
  3. 3Approve it, and the audit starts