SC Audit//BLUEPRINT · C7 to C22 Full AutomationCommand center

SC audit pipeline

Full automation blueprint and analysis report
Generated 2026-05-15 · 15 analysis agents · 38,178 LOC analyzed
$400
Total Investment
$6K–$15K
Pipeline EV (0.3x)
15
Campaigns Run
200+
Agents Deployed
250K+
LOC Audited
5,000+
Findings Generated
7
Active Submissions
98%
FP Kill Rate

Executive summary

The SC Audit Pipeline runs as a 7-layer autonomous smart contract vulnerability discovery system. It uses 20 parallel DeepSeek agents, 22 false-positive suppression rules, 3-phase semantic deduplication, and multi-platform submission automation. The codebase totals 38,178 LOC across 98 Python files (src/ + scripts/ + tests/ + config/), with 669 passing tests at 36.4% coverage.


Status1 CRITICAL submitted to Immunefi (TermMax UUPS, $50K bounty). 2 more queued (OdosV2 + Inverse Curve Oracle). 4 additional submissions across Sherlock, C4, and direct disclosure. The 3-report Immunefi cap blocks further submissions after Day 2.

Key bottleneckImmunefi has no submission API. The Novice rate limit is 1 report per 24h, with a 3-report pending cap. Upgrading to 5 per 48h needs a paid report. Manual web form submission is the number 1 constraint.

7-layer pipeline architecture PRODUCTION

1

Discovery and target selection

6 platform scrapers (Immunefi, Sherlock, C4, CodeHawks, Cantina, Hats) plus audit-count filter plus exploit-history scoring. Immunefi API shows 284 active bounties.

95% AUTO
2

Static analysis and context extraction

Slither/Aderyn integration plus Solidity version detection plus DeFi protocol identification plus OZ pattern recognition. Context-aware prompts go to each agent.

100% AUTO
3

AI multi-agent analysis (20 agents)

20 specialized DeepSeek agents run in parallel via asyncio.gather(). 100 concurrent calls, 1200 RPM, 5-retry exponential backoff. Cost runs $0.07/M input, $0.28/M output.

100% AUTO
4

Synthesis and validation

22 FP suppression rules feed a 3-phase semantic dedup (title Jaccard, then code-location, then vuln-class). 50.5% finding reduction. 98% combined FP kill rate.

100% AUTO
5

PM1 verification (human-guided)

Claude-guided deep verification of PM2 handoff findings. 25% survival rate (75% kill rate). Scope verification, on-chain proof, audit cross-ref. The quality gate lives here.

60% AUTO
6

Submission and tracking

Immunefi (manual web form), Sherlock (AppleScript clipboard-assist plus $250 USDC stake), C4 (web form), Cantina (web form), direct email disclosure.

40% AUTO
7

Feedback and revenue loop

Verdict tracking, precision benchmarking, FP rule tuning, revenue dashboard. GitHub parsing for Sherlock judgments. Wallet monitoring for payouts.

70% AUTO

Automation level by layer

LayerCurrentTargetGap
1. Discovery
95%
99% Auto-refresh new bounties weekly
2. Static Analysis
100%
100% ·
3. AI Multi-Agent
100%
100% ·
4. Synthesis
100%
100% ·
5. PM1 Verification
60%
85% Auto on-chain proof, auto audit cross-ref
6. Submission
40%
80% Playwright for Immunefi/Cantina, Synpress for Sherlock
7. Feedback Loop
70%
95% Auto verdict scraping, wallet alerts

81%
Current Overall
94%
Target Overall

20 DeepSeek agent fleet ACTIVE

oracle_price
Price feed staleness
reentrancy
Cross-function reentry
access_control
Missing auth checks
liquidation
Liquidation logic
math_precision
Rounding errors
token_accounting
Balance tracking
flash_loan
Flash loan attacks
upgrade_proxy
UUPS/Proxy issues
economic_attack
Economic exploits
input_validation
Input sanitization
state_consistency
State invariants
cross_contract
Cross-contract calls
dos_griefing
DoS vectors
lending_specific
Lending protocol
governance_timelock
Governance flaws
proxy_upgrade_deep
Deep proxy analysis
bridge_crosschain
Bridge security
vault_share_inflation
ERC4626 inflation
permit_signature
Signature replay
mev_sandwich
MEV/Sandwich

Pipeline parameters

Max Concurrent Calls100
Rate Limit1,200 RPM
Max Retries5 (exp backoff 1s → 15s)
Request Timeout180s
Temperature0.1 (deterministic)
Max Response Tokens8,192
Max Prompt Chars120,000
Max Findings/Agent50
Max Total Findings2,500
Max Files/Batch10 (200 total)

Active submissions and pipeline

#TargetFindingSeverityPlatformStatusEV (0.3x)
1 TermMax UUPS _disableInitializers missing (7 contracts) CRITICAL Immunefi ($50K) $7K–$17.5K
2 TermMax OdosV2AdapterV2 output token validation removed HIGH Immunefi ($50K) QUEUED DAY 1 $1.8K–$6K
3 Inverse Finance Curve EMA oracle staleness (6 feeds + WbtcPriceFeed) MED-HIGH Immunefi ($100K) QUEUED DAY 2 $3K–$9K
4 MachFi BandOracle._getLatestPrice() ignores staleness HIGH Sherlock #43 $1K–$3.5K
5 Renegade AccountIfExists auth pattern bypass HIGH C4 Bounty $4K–$7K
6 USX/Scroll rebalanceBySwapping() missing access control HIGH Email $2K–$6K
7 Sentiment V2 ETH_INDEX=DYDX 15,127x overvaluation CRITICAL Direct Disclosure 8 MSGS SENT $750–$2K
Total pipeline EV (0.3x discount) $19.5K–$51K
Immunefi rate limit constraintNovice tier is 1 report per 24h, max 3 pending reports. After Day 2 (Inverse Curve Oracle), we hit the 3-report cap and stay blocked until one report resolves. Upgrade to 5 per 48h needs 1 paid report.

Post-cap backlog

TargetFindingBountyEVBlocker
Ostium 6 reinitializer() functions missing access control $200K $5K–$20K Needs on-chain verification plus Immunefi cap
CapyFi Whitelist bypass $1M $2K–$10K Needs audit cross-ref plus Immunefi cap
Belong (3 findings) Signature verification gaps (unsigned amount, replay, no nonce) $30K comp $3K–$9K Immunefi competition format

7 manual bottlenecks identified CRITICAL PATH

B1 · Immunefi submission (manual web form)

MANUAL

No public API. You log in, open the program, fill 7 fields, paste markdown, then submit. Rate limited 1 per 24h on Novice.

Fix · Playwright browser automation. Log in with stored session cookies. Fill dropdowns, paste the markdown body, click submit. No wallet interaction at submission time. ETA 4 to 6 hours to build.

B2 · Sherlock submission ($250 USDC stake)

SEMI-AUTO

AppleScript clipboard-assist is already built. The form auto-fills, but the $250 USDC wallet approval still needs manual confirmation.

Fix · Playwright plus Synpress (MetaMask automation). Auto-fill form fields, auto-approve the USDC stake on Arbitrum. Keep a human gate on wallet approval for safety ($250 per submission risk).

B3 · On-chain verification (manual Etherscan)

MANUAL

UUPS proxy verification, implementation slot reading, and initializer state checks all happen manually via Etherscan. web3.py is in requirements but no RPC verification script exists.

Fix · build scripts/verify_onchain.py, a web3.py script to read EIP-1967 implementation slots, check the Initializable storage slot (0x0 means not initialized), and verify across all chains (Ethereum, Arbitrum, Base, BSC, Mantle, Scroll). Multi-chain RPC endpoints via the LiteLLM proxy pattern.

B4 · Audit report cross-reference (manual PDF reading)

MANUAL

Immunefi rule says unfixed vulnerabilities mentioned in prior reports are not eligible. Right now that means reading 5+ PDFs per target by hand.

Fix · build scripts/audit_crossref.py, which downloads audit PDFs from GitHub repos, extracts text, vector-embeds findings, and semantic-matches against ours. It flags duplicates. Cost is about $0.02 per audit report via DeepSeek embeddings.

B5 · PM1 verification (Claude-guided)

60% AUTO

PM1 kills 75% of PM2 findings. Today it needs human-guided Claude sessions for deep analysis, scope verification, and exploit path reasoning.

Fix · auto-scope verification via API (bounty page scraping, then asset matching), auto on-chain proof (the B3 fix), auto audit cross-ref (the B4 fix). The remaining 15% is novel exploit reasoning, which still needs Claude PM1.

B6 · Bounty status monitoring (manual check)

SEMI-AUTO

Checking whether bounties are active, paused, or removed. The Sentiment bounty was dead but the pipeline didn't catch it. MachFi #43 versus #12 confusion.

Fix · a cron job pinging the Immunefi API plus Sherlock GraphQL plus the C4 API every 6h. Alert on status changes. Store bounty status in SQLite.

B7 · Cantina submission (manual web form)

MANUAL

No API, and a code-review interface with fiddly interactions. The "New Finding" button path is simpler than the code-highlighting path.

Fix · Playwright automation via the "New Finding" button. Log in with stored session, fill severity, title, and description, then submit. No wallet component.

Submission automation strategy

Tier 1 immediate (AppleScript)

  • Sherlock SC-SHERLOCK-SUBMIT-CHROME.applescript (BUILT)
  • Immunefi SC-IMMUNEFI-SUBMIT.applescript (1 to 2h to build)
  • Cantina SC-CANTINA-SUBMIT.applescript (1 to 2h to build)

A human approves every action. Safest for $250 stakes. It copies title and body to the clipboard, then the user pastes.

Tier 2 near-term (Playwright)

  • Immunefi Playwright (no wallet needed at submission)
  • Cantina Playwright (no wallet needed)
  • Sherlock Playwright plus Synpress (MetaMask auto)

Full browser automation. 2 to 5s realistic delays. Persistent browser profiles handle session management. 1 to 2 days to build.

Platform API reality check

PlatformAPI Available?Best AutomationOn-Chain?Risk
Immunefi READ-ONLY (bounties.json) Playwright No UI changes break selectors
Sherlock NONE Playwright + Synpress Yes ($250 USDC) $250/submission financial risk
Cantina NONE Playwright No Complex code-review UI
Code4rena CLOSING JULY 12 N/A No Platform shutting down

Codebase inventory 38,178 LOC

Source modules (src/)

analysis/Context extraction, ensemble validation, agents, static analysis~8,000 LOC
synthesis/FP filter (841 LOC), semantic dedup, classifier, PoC generator~4,500 LOC
submission/Queue, Sherlock, C4, Immunefi, Cantina submitters~3,000 LOC
discovery/6 platform scrapers, monitor, cloner~3,500 LOC
tracking/Feedback loop, revenue dashboard, wallet monitor~2,500 LOC
utils/Secrets, database, cache, validation, logger~2,500 LOC

Scripts (scripts/)

SC-deepseek-v4-pro-pipeline.pyMain orchestrator867 LOC
orchestrate.pyFull pipeline orchestration1,159 LOC
auto_audit.pyAutonomous audit runner993 LOC
submit_to_contest.pyContest submission621 LOC
benchmark_precision.pyPrecision metrics844 LOC
SC-target-screener.pyTarget screening (3 modes)~500 LOC
28 more scriptsVarious utilities~7,000 LOC

Testing

669
Tests Passing
36.4%
Coverage
3.09s
Test Runtime

15 test files, 10,684 LOC of test code. Strongest coverage sits in secrets (100%), fp_filter (96%), semantic_dedup (90%), ensemble (95%). Weakest sits in the orchestrator (7%), PoC generator (0%), scrapers (0 to 54%).

22 false-positive suppression rules

Pattern-based (fp_filter.py, 841 LOC)
1Reentrancy guard blindness (OZ, custom, EIP-1153)
2Proxy architecture blindness (UUPS, Transparent, Diamond)
3Intentionally public functions
4View function simulation
5Standard Solidity behavior (zero addr, 0.8 overflow)
6Constant/immutable storage FP
7SafeERC20/checked arithmetic
8Access control inheritance chains
LLM-prompt-level (agent config)
9–12Admin trust model, owner-only, timelock
13–16Pyth vs Chainlink confusion, hallucinated crosschain
17–18OZ ReentrancyGuard (global not per-function)
19–20Delegatecall execution context blindness
21Internal function access control FP
22Custom math limitation acknowledgment

Proposed rules 23 to 30L2 sequencer hallucination (ERC4626 to Chainlink confusion), dead shares immunity, MIN_SHARES pattern, signature verification gaps, commented-out security checks, Redstone ms/s timestamp mismatch, reinitializer() access control, flash loan callback reentrancy scope.

Cost analysis and unit economics

Campaign cost breakdown
CampaignTargetsFindingsCost$/Target
C7135,384$2.46$0.19
C841,709$0.95$0.24
C962,363$0.95$0.16
C1071,528$0.61$0.09
C11101,890$0.81$0.08
C12103,201$1.56$0.16
C1393,631$1.55$0.17
C149311$0.17$0.02
C155810$0.85$0.17
Unit economics
$0.14
Avg Cost / Target
$57
Cost / Submission
37.5x
Min ROI (if 1 paid)
525x
Max ROI (if all paid)

DeepSeek pricing
Flash (current)$0.07/M in$0.28/M out
Pro (alternate)$0.27/M in$1.10/M out
Budget remaining$20.47

Scaling plan from $1K per month to 100+ campaigns

MetricCurrent (Manual)Phase 1 ($100/mo)Phase 2 ($500/mo)Phase 3 ($1K/mo)
Campaigns/month 15 (manual trigger) 30 (cron daily) 60 (cron 2x/day) 100+ (continuous)
DeepSeek budget $10/mo $50/mo $200/mo $500/mo
On-chain verification Manual Etherscan Auto RPC (free tiers) Alchemy Growth ($49/mo) Multi-chain RPC ($100/mo)
Submission automation Manual forms AppleScript clipboard Playwright semi-auto Playwright full-auto
Expected submissions/mo 3–5 8–12 15–25 30–50
Expected revenue/mo $0 (pre-revenue) $2K–$5K $5K–$15K $10K–$30K
Infrastructure Local macOS Local + launchd Docker (local) Docker (VPS $50/mo)

Infrastructure and deployment

Docker stack (ready)

# docker-compose.yml · 3-service stack services: pipeline: # Python 3.13, multi-stage build redis: # Cache layer, finding dedup litellm: # LLM routing proxy (70% Flash, 20% R1, 10% Claude) # Makefile: 41 targets make pipeline-run # Run single campaign make pipeline-cron # Schedule 24/7 operation make test # 669 tests, 3.09s make lint # ruff check + format make typecheck # mypy strict

24/7 operation

  • Docker Compose 3-service stack defined
  • Multi-stage build (slim Python 3.13)
  • Redis cache for finding dedup
  • LiteLLM proxy for model routing
  • Makefile with 41 targets
  • launchd plist for macOS scheduling
  • Cron-based campaign triggering
  • Alerting (Slack/Discord webhook)
  • Health monitoring dashboard

100xagenticdev framework integration

The SC Audit Pipeline already runs several 100xagenticdev patterns. Here are the integration points for scaling to 20 parallel agents.

Already implemented
  • parallel-agents.sh pattern: asyncio.gather() with 100-concurrent semaphore
  • Budget enforcement OUTSIDE agent code ($5 default, $50 daily cap)
  • quality-gate.sh pattern: 22 FP rules + 3-phase dedup
  • Frozen dataclasses (no mutable global state)
  • NASA P10: <60 line functions, bounded loops, zero warnings
  • Token-bucket rate limiter (1200 RPM)
  • 5-retry exponential backoff (1s → 15s)
To implement
  • Git worktree isolation per campaign (prevent cross-contamination)
  • Pipeline.sh 4-stage gates (lint → test → build → deploy)
  • Canary deployment (run new agent configs on 1 target before fleet)
  • Agent performance ranking (auto-disable low-precision agents)
  • Feedback-driven prompt tuning (auto-update FP rules from verdicts)
  • Multi-model ensemble (DeepSeek + Claude + GPT-4o cross-validation)

Key learnings from 15 campaigns

What works

  • 0-audit protocols hit at 83% (5 of 6 produced real findings)
  • UUPS _disableInitializers is the highest-confidence pattern (1.0)
  • Cross-protocol adapter code is systematically under-audited
  • Commented-out security checks are high-signal (Resonate harvest)
  • PM1 verification removes 75% of FPs before submission
  • $0.14 per target average cost makes massive scanning cheap
  • Signature verification gaps are an underexploited pattern (Belong: 5/5)

Known DeepSeek weaknesses

  • Can't reason about delegatecall execution context (3 instances)
  • Flags internal functions as missing access control (MUX: 6 kills)
  • Doesn't trace inheritance chains (_disableInitializers in base)
  • L2 sequencer hallucination (top FP, confuses ERC4626 with Chainlink)
  • Cross-contract validation blindness (version confusion)
  • Hallucinates missing modifiers while quoting code that has them
  • Can't analyze novel custom math (complex curve formulas)

Confirmed vulnerability classes to hunt systematically

ClassExampleConfidenceAutomation
UUPS _disableInitializers missing TermMax (7 contracts) 1.0 On-chain slot scan (EIP-1967)
Missing access control on rebalance/swap USX rebalanceBySwapping() 0.95 Agent: access_control
Oracle staleness bypass MachFi BandOracle, Inverse Curve EMA 0.90 Agent: oracle_price
Signature verification gaps Belong (5 findings: unsigned fields, no nonce) 0.80 Agent: permit_signature
reinitializer() without access control Ostium (6 functions, 5 contracts) 0.75 On-chain + Agent: upgrade_proxy
Cross-protocol adapter bugs Sector Finance (Gearbox Curve) 0.70 Agent: cross_contract
Zero slippage on compound/harvest Resonate (amountOutMin=0) 0.70 Agent: mev_sandwich
Redstone ms/s timestamp mismatch Sommelier (4 instances), Sentiment V2 0.65 Pattern D scan ($0 cost)
ERC4626 inflation (no virtual offset) GammaSwap (MIN_SHARES ≠ virtual offset) 0.60 Agent: vault_share_inflation

Immunefi submission schedule

Day 0 · TermMax UUPS [CRITICAL]

7 UUPS contracts missing _disableInitializers. On-chain proof shows slot = 0x0. $71.35M TVL at risk. EV $10K–$25K.

Day 1 (~23h) · TermMax OdosV2Adapter [HIGH] NEXT

The V2 adapter removed output token validation that V1 has. Submit the second the rate limit expires. EV $3K–$10K.

Day 2 · Inverse Finance Curve Oracle [MED-HIGH] READY

6 composite oracle feeds validate Chainlink but not Curve EMA. WbtcPriceFeed has zero staleness on the primary path. EV $5K–$15K.

Blocked · 3-report Immunefi cap hit

After the Day 2 submission, we hold 3 pending reports. Novice cap is 3. No more submissions until one resolves (3 to 7 day triage is typical).

After cap · Ostium reinitializer() [MED-HIGH]

6 reinitializer() functions missing AC across 5 contracts. $200K bounty. Needs on-chain verification first.

After cap · CapyFi whitelist bypass [MEDIUM]

$1M bounty. Needs an audit cross-ref to confirm it isn't already reported.

Full automation roadmap

PriorityComponentEffortImpactStatus
P0 verify_onchain.py · web3.py multi-chain UUPS slot scanner 4–6h Eliminates B3 (on-chain manual) NOT STARTED
P0 Immunefi Playwright submitter · auto form fill plus submit 4–6h Eliminates B1 (top bottleneck) NOT STARTED
P1 audit_crossref.py · PDF download, extract, semantic match 8–12h Eliminates B4 (audit cross-ref) NOT STARTED
P1 Bounty status monitor · cron pinging 3 platform APIs 3–4h Eliminates B6 (stale bounty detection) NOT STARTED
P2 FP rules 23 to 30 · L2 sequencer, dead shares, signatures, Redstone 2–3h +5% FP kill rate (98% to 99%+) NOT STARTED
P2 Cantina Playwright submitter 4–6h Eliminates B7 NOT STARTED
P3 Sherlock Playwright plus Synpress · MetaMask auto-approve 8–12h Eliminates B2 (keep human gate on $250) NOT STARTED
P3 launchd plist plus cron scheduling · 24/7 operation 2–3h Continuous campaign execution Docker stack ready, scheduling not
P4 Multi-model ensemble · DeepSeek + Claude + GPT-4o cross-validation 12–16h Higher confidence, fewer PM1 kills Architecture defined, not implemented
P4 Agent performance ranking · auto-disable low-precision agents 4–6h Reduce noise, improve signal-to-noise Benchmark script exists, no auto-tuning

Killed findings, do not revisit

#TargetFindingKill Reason
K-1GammaSwapERC4626 inflationDead shares (MIN_SHARES=1e3 to address(0)) make the attack irrational
K-2TwynehandleExternalLiquidation ACPermissionless by design (like all DeFi liquidations)
K-3TwyneonMorphoFlashLoan reentrancyParent holds the ReentrancyGuardTransient lock
K-4Sector FinancecoinId/threeId swapDormant. All deployed strategies have coinId=1=threeId
K-5Resonateharvest() MEVMasterChef adapters not in Immunefi scope
K-6SommelierRedstone ms/sCode uses blockTimestamp (seconds), not dataTimestamp (ms)
K-7Midastx.origin gas dustGas dust only, $250 deposit not worth the risk

Revenue projections

Conservative (1 paid)
$5K
12.5x ROI on $400
Expected (3 paid, 0.3x)
$15K
37.5x ROI on $400
Optimistic (all paid)
$51K
127.5x ROI on $400

Annualized at Phase 3, $1K per month investment100+ campaigns per month times 30 to 50 submissions times 15% acceptance rate times $5K average payout works out to $67K–$210K per year at full automation.

Next actions in priority order

Immediate, next 24h
  • Submit OdosV2Adapter to Immunefi the second the rate limit expires (~23h from Day 0)
  • Verify MachFi Sherlock #43 is the correct active bounty (not #12)
  • Check Sentiment Sherlock #37. If live, prepare to re-submit S-02 Critical ($250)

Day 2
  • Submit Inverse Finance Curve Oracle to Immunefi
  • Monitor TermMax UUPS for a triage response

Build this week
  • Build verify_onchain.py (web3.py multi-chain UUPS scanner)
  • Build the Immunefi Playwright submitter
  • Add FP rules 23 to 30
  • Build the bounty status monitor (cron plus 3 APIs)

After the 3-report cap resolves
  • Verify Ostium reinitializer on-chain
  • Verify CapyFi whitelist bypass against audit reports
  • Submit survivors