ZeroPath is an evidence-first smart contract security research engine.
It is built for local use by humans and IDE agents in tools like Codex, Claude Code, Cursor, Windsurf, and other MCP-compatible environments. The engine helps an agent understand a protocol, generate exploit hypotheses, prove or reject them, remember useful evidence, and export reports only when judge checks pass.
- A local research engine for smart contract security work.
- CLI-first and MCP-compatible.
- Memory-backed through a project research ledger.
- Adapter-based, with EVM/Solidity as the first stable adapter.
- Evidence-gated: hypotheses are not findings.
- It is not a generic Solidity scanner.
- It is not an autonomous auditor that should be trusted to report issues by itself.
- It is not a report-generation toy.
- It does not claim full multi-language support until adapters exist.
- It does not mark anything report-ready without concrete evidence.
The core rule is simple:
LLMs can propose. ZeroPath must verify.
Stable:
- CLI project initialization
- EVM/Solidity detection and lightweight indexing
- protocol understanding snapshot
- invariant suggestions
- candidate lifecycle
- judge-gated reports
- concrete Foundry proof generation for the ERC4626 inflation benchmark fixture
(executable PoC, passing
forge test, measured impact, report-ready gate); being generalized - heuristic ERC4626 anti-condition (inflation-mitigation) detection
- memory router
- MCP scaffold
Experimental:
- heuristic hypothesis generation
- Foundry PoC skeleton generation for non-inflation bug classes
- old adversarial, simulator, monitor, and RL components
- Solodit integration placeholder through the older knowledge modules
Planned:
- stronger Solidity parsing
- real Solodit ingestion
- live fork validation
- vector retrieval
- Move, Solana, CosmWasm, and Cairo adapters
- VS Code/LSP UI
ZeroPath is layered:
- Core engine: schemas, storage, protocol intent, candidates, memory, evidence, judging, and reports.
- CLI: human and automation interface.
- MCP server: IDE-agent interface.
- Adapters: language and VM-specific indexing and proof backends.
- Memory system: project, finding, pattern, rejection, and research ledger entries.
- Evidence store: SQLite plus human-readable JSON artifacts under
.zeropath. - Templates and benchmarks: report, PoC, agent, and benchmark scaffolds.
The core engine does not assume Solidity. EVM/Solidity support lives behind
zeropath.adapters.evm.
Initialize project state:
zeropath initIndex an EVM/Solidity project:
zeropath ingest --repo .Generate a protocol intent snapshot:
zeropath understandGenerate high-impact hypotheses:
zeropath hunt --mode critical --limit 5Inspect candidates:
zeropath candidates list
zeropath candidates show ZP-001Record concrete evidence and triage facts:
zeropath candidates evidence ZP-001 \
--root-cause-lines \
--attacker-path \
--state-preconditions \
--duplicate-risk low \
--known-issue-risk none \
--live-config-checkedBuild a proof-state plan:
zeropath candidates plan ZP-001Generate a proof skeleton and run Foundry if available:
zeropath prove ZP-001 --backend foundryIf a state plan exists, the generated Foundry skeleton includes its setup steps, missing dependencies, suggested fixtures, and evidence checklist.
Run judge checks:
zeropath judge ZP-001Export a report only after the judge marks it ready:
zeropath report ZP-001 --format code4renaFor a non-final draft:
zeropath report ZP-001 --format code4rena --draftStart the evidence-first MCP server:
zeropath mcpThe MCP tools wrap core functionality. They do not expose arbitrary shell
execution. Tools that mutate project state require explicit write_mode=true.
Important MCP tools include:
zeropath_project_statuszeropath_ingest_repozeropath_get_protocol_intentzeropath_generate_attack_hypotheseszeropath_update_candidate_evidencezeropath_build_state_planzeropath_generate_foundry_poczeropath_run_poczeropath_judge_candidatezeropath_export_reportzeropath_memory_search
Legacy MCP installer commands are still available:
zeropath mcp install
zeropath mcp serve
zeropath mcp toolsZeroPath memory is a research ledger, not casual chatbot memory.
Memory can store:
- evidence-backed project facts
- protocol intents
- invariants
- rejected hypotheses with reasons
- judge decisions
- proof results
- known issues
- duplicate signals
- high-confidence exploit patterns
Speculation is rejected by default, especially for global memory. Rejected hypotheses are saved when they include a reason because they prevent repeated wasted work.
Candidate readiness is based on checklist evidence:
- root cause lines present
- attacker path present
- reachable state preconditions present
- PoC or proof artifact present
- proof result recorded
- live or fork configuration checked
- impact or profit measured
- known issue and duplicate risk considered
No evidence means no finding.
Adapters own ecosystem-specific behavior:
- project detection
- parsing and indexing
- entrypoint extraction
- asset-flow extraction
- role and dependency extraction
- invariant suggestions
- PoC generation
- proof backend execution
Current stable adapter:
- EVM/Solidity, using lightweight file scans and regex heuristics.
Future adapter stubs:
- Move
- Solana/Rust
- CosmWasm
- Cairo/Starknet
ZeroPath is designed to avoid the common LLM audit failure mode:
code -> pattern match -> generic vulnerability label -> spam report
The intended flow is:
docs + code + config + memory
-> protocol-specific invariant
-> required exploit state
-> transaction sequence
-> proof attempt
-> judge checks
-> report or reject
zeropath init
zeropath ingest --repo .
zeropath understand
zeropath hunt --mode critical --limit 5
zeropath candidates list
zeropath prove ZP-001 --backend foundry
zeropath judge ZP-001
zeropath report ZP-001 --format code4rena
zeropath memory rejectedOlder commands such as analyze, infer, attack, sequence, kg, and
contest are retained only as legacy or experimental compatibility surfaces.
They are not the recommended workflow for new users or IDE agents.
Install locally:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"Run focused tests:
pytest tests/test_project.py tests/test_storage.py tests/test_memory.py tests/test_memory_router.py tests/test_candidates.py tests/test_judge.py tests/test_cli.py tests/test_evm_detector.py tests/test_schemas.py- MCP does not expose a generic shell tool.
- Report export refuses final output unless judge checks pass.
- PoC generation writes to
.zeropath/artifacts/pocsby default. - Writing into project test directories is opt-in and refuses overwrites unless forced.
- Do not store secrets in memory or artifacts.
- Treat every generated candidate as a hypothesis until proven.