Python-based smart contract fuzzer for EVM. It compiles Solidity sources, discovers property functions named echidna_*, executes random sequences of public/external calls, and checks that all properties hold after each step. Runs locally without Docker; Docker files are included only for convenience.
Requirements:
- Python 3.9+
- pip 26+
- Windows/macOS/Linux
Install in editable mode:
pip install -e .Print diagnostics (attach to bug reports):
solfuzz doctorFuzz example contract:
solfuzz run --config configs/example.yamlReplay a failure (best-effort):
solfuzz replay artifacts/run-*/failure.json- Properties: Solidity functions named
echidna_*returningbool. If any returnsfalseor reverts, Solfuzz reports a violation. - Targets: All other public/external non-view functions are fuzzed.
- Reproducibility: Seeds can be provided via
--seed. Failures are saved underartifacts/run-*/failure.json.
See configs/example.yaml for a reference. Key options:
solidity.sources: file(s) or directories with.solfilessolidity.optimize,solidity.runs,solidity.evm_versionfuzz.max_steps,fuzz.stop_on_fail,fuzz.seed,fuzz.gas_limitreport.dir: artifacts directory
- Uses in-process EVM (
eth-tester+py-evm), no external binaries required. - Solidity compiler is managed by
py-solc-xand downloaded on first compile per pragma.
- Input shrinking/minimization is basic and will be improved.
- Coverage-guided scheduling and parallel workers are on the roadmap.
Run a short smoke:
solfuzz run contracts/Counter.sol --max-steps 50 --seed 123Build and run inside a container (not required for normal use):
docker build -t solfuzz .
docker run --rm -it solfuzz solfuzz doctor