shuvonsec/claude-bug-bounty/web3-audit
Claude Code and agent skill by shuvonsec/claude-bug-bounty
- community
Checking that the SKILL.md file is still in the repository.
Smart contract security audit — 10 DeFi bug classes (accounting desync, access control, incomplete path, off-by-one, oracle, ERC4626, reentrancy, flash loan, signature replay, proxy), pre-dive kill signals (TVL < $500K etc), Foundry PoC template, grep patterns for each class, and real Immunefi paid examples. Use for any Solidity/Rust contract audit or when deciding whether a DeFi target is worth hunting.
Install
npx vskill@latest install shuvonsec/claude-bug-bounty/web3-auditSKILL.md
WEB3 SMART CONTRACT AUDIT
10 bug classes. Pre-dive kill signals. Foundry PoC template. Real paid examples.
PRE-DIVE KILL SIGNALS (check BEFORE any code review)
ZKsync lesson: $322M TVL + OZ audit + 750K LOC + 5 sessions = 0 findings. Large well-audited bridges are extremely hard.
- TVL < $500K → max payout capped too low for effort
- 2+ top-tier audits (Halborn, ToB, Cyfrin, OpenZeppelin) on simple protocol → bugs already found
- Protocol < 500 lines, single A→B→C flow → minimal attack surface
- Formula:
max_realistic_payout = min(10% × TVL, program_cap)— if < $10K, skip
Soft kill: OZ/ToB/Cyfrin audit on current version + codebase > 500K LOC → expect 40+ hours for maybe 1 finding. Only proceed if bounty floor > $50K AND you have protocol-specific expertise.
Target scoring (go if >= 6/10):
- TVL > $10M: +2
- Immunefi program with Critical >= $50K: +2
- No top-tier audit on current version: +2
- < 30 days since deploy: +1
- Protocol you've hunted before: +1
- Source code + natspec comments: +1
- Upgradeable proxies: +1
THE ONE RULE
"Read ALL sibling functions. Ifvote()has a modifier, checkpoke(),reset(),harvest(). The missing modifier on the sibling IS the bug."
This single rule explains 19% of all Critical findings.
1. ACCOUNTING STATE DESYNCHRONIZATION
#1 Critical bug class — 28% of all Criticals on Immunefi.
What It Is
Two state variables supposed to stay in sync. One code path updates A but forgets B. Later code reads both and makes decisions based on stale B.
Root Cause Patterns
Variant 1: Phantom Yield (Yeet protocol — 35 duplicate reports)
Variant 2: Fast Path Skips State Update (Alchemix V3)
Variant 3: Update Happens in Wrong Order (Alchemix)
Grep Patterns
2. ACCESS CONTROL
#2 Critical — 19% of Criticals. $953M lost in 2024 alone.
Variant 1: Missing Modifier on Sibling Function
Variant 2: Wrong Check (Existence vs Ownership)
Variant 3: Silent Modifier (if vs require)
Variant 4: Uninitialized Proxy
Grep Patterns
Real Paid Examples
| Protocol | Payout | Bug | |
|---|---|---|---|
| Wormhole | $10M | Uninitialized UUPS proxy → anyone calls initialize() | |
| ZeroLend | n/a | split() uses existence check, not ownership check | |
| Alchemix | n/a | poke() missing onlyNewEpoch → infinite FLUX inflation | |
| Parity | $150M frozen | No access control on initWallet() in library |
3. INCOMPLETE CODE PATH
#3 Critical — 17% of Criticals.
The Function Family Comparison Test
Variant 1: Update Function Missing Refund (ThunderNFT)
Variant 2: Partial Fill Token Stuck (Plume)
Variant 3: mint() Bypasses Check That deposit() Has (MetaPool)
Grep Patterns
4. OFF-BY-ONE & BOUNDARY CONDITIONS
#4 High — 22% of Highs. Single character change. Massive impact.
Root Cause
Mental Test for Every Comparison
For everyif (A > B): "What happens when A == B?" Is that correct?
6 Boundary Locations to Check
- Period/Epoch boundaries:
>vs>=at period end - Time-based locks: does
block.timestamp == deadlinelock or unlock? - Loop break conditions:
breakwith>vs>= - Array index boundaries:
i <= array.length(should bei < array.length) - Amount/balance boundaries:
>= amountallows exact full withdrawal? - Rounding/precision: can any input produce 0 output that should be non-zero?
Grep Patterns
5. ORACLE / PRICE MANIPULATION
12% of all reports. Largest individual payouts. $117M Mango, $70M Curve.
Bug A: Missing Staleness Check (most common)
Bug B: Missing Confidence Interval (Pyth)
Bug C: TWAP Too Short (flash loan manipulatable)
Bug D: Single-Source Oracle
Grep Patterns
6. ERC4626 VAULT ATTACKS
Exchange Rate Manipulation (near-empty vault)
ERC4626 Transfer (moves shares but not stake/lock records)
Grep Patterns
7. REENTRANCY
2016–present. CEI pattern prevents it. Still found in DeFi.
Variants
- Single-function: attacker re-enters same function before state updated
- Cross-function: re-enters a sibling function with stale state
- Cross-contract: re-enters via a callback to another protocol
- Read-only: re-enters a view function that returns stale data used by attacker
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/web3-audit/SKILL.md
Popularity
- Repository stars
- 4,237
- Repository forks
- 768
- 7-day trend score
- 42
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/shuvonsec/claude-bug-bounty/web3-audit)