How do I scan an ERC-4626 vault in QuillShield before an audit?

Paste one prompt into Cursor or Claude to run a QuillShield review of your vault before the manual audit, with the agent told what to watch: empty-vault inflation, share pricing, rounding and donations.

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

Vault bugs hide in share math. On 26 June 2025 a new Resupply lending pair priced its collateral from a CurveLend vault with no deposits. The attacker donated 2,000 crvUSD and deposited 2 crvUSD for 1 wei of shares, the pair's exchange rate rounded down to zero, and it was left with $10M of reUSD bad debt. Our page on the ERC-4626 inflation attack has the background.

What prompt do I give the agent?

This Foundry repo is an ERC-4626 vault. Run a QuillShield AI-Powered Code Review on the vault Solidity in src/. Show the fixed price and wait for my confirm. Pay attention to share inflation on an empty vault, deposit and redeem pricing, rounding, and donation or inflation attacks. 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: who can move funds, how the vault values its assets, trust assumptions and any earlier audit report.
  3. Paste the prompt. The agent quotes the vault 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.

What did QuillShield find in its demo vault?

On 23 October 2026 QuillShield audited the Mini DeFi Vault, our own demo contract, in 2 hours and 7 minutes and reported 5 findings, 3 of them Critical. Two of the Critical findings are share-pricing bugs: deposit() prices new shares on a balance that already includes msg.value, and redeem() reduces totalShares by only shares/1e9. That was a demo, not a customer repo. The full list is on the QuillShield homepage.

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.

Does it look at virtual shares and decimal offsets?

The prompt points the review at empty-vault inflation and rounding, which is where virtual shares and decimal offsets are the usual defenses. Each finding comes with the exact lines, the impact and a recommended fix.

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