Fuzzing
Smart Contract Fuzzing: Foundry, Echidna and Invariant Testing
How fuzzers and invariant tests work on smart contracts, and how to write properties that find real bugs.
Describe the expected behavior in [V] specifications. OrCa generates thousands of test cases and returns exact inputs and traces for every violation.

OrCa tests your contracts against the behavior you describe, so a violation shows up even when nothing crashes.
// 001
States your protocol must never reach, tested across thousands of generated transaction sequences.
// 002
Calls that succeed when your spec says they must not, even without a revert or a crash.
// 003
How your contracts behave when composed, not just in isolation.
// 004
Attacks OrCa builds itself through auxiliary contracts, with no change to your source code.
// 005
Out-of-the-box checks from the specification library for common protocols.
// 006
Behavior you already specified, retested every time your code changes.
Most fuzzers throw random inputs and wait for a crash. OrCa is specification guided: it explores your contracts against the behavior you state and validates every run against it.
// 001
![OrCa Task Wizard, Select Specs step: the [V] specification library and the specs embedded in the version are selected.](https://audithub.dev/wp-content/uploads/2026/10/ah-v3-orca-panel-orca-wizard-select-specs-2-selected.webp)
Describe the expected behavior in [V], or start from the specification library.
// 002

OrCa generates thousands of transaction sequences on your Foundry or Hardhat project.
// 003

Each violation comes back with the exact inputs and the transaction trace, in [V] syntax.
Scout flags a suspicious transaction sequence in your protocol. OrCa tests it against your spec and returns the evidence: the exact inputs and the trace that break the expected behavior.
Scout AI - Findings
Line 142
First depositor can inflate the share price
OrCa - Evidence
Share price manipulation reproduced
The exact inputs and the trace that break the expected behavior.
// COUNTEREXAMPLE FOUND
A [V] spec states what must always or never happen, like a withdrawal that must never finish with a zero amount. Start from the specification library, and use OrCa hints for protocols that need specific inputs or setup.
![OrCa showing the original [V] specification, a withdrawal that must never finish with a zero amount, and the Solidity counterexample it found on the ShieldedPool demo contract.](https://audithub.dev/wp-content/uploads/2026/10/ah-v3-orca-screen-orca-spec-counterexample-low-zero-amount-withdrawal.webp)

OrCa works with Foundry and Hardhat projects and runs in your CI. Add a spec when your code changes, and every campaign retests what you already covered.
Working with a coding agent? Run OrCa from your session through AuditHub MCP.
Vanguard runs first, for breadth, and detects unsafe patterns across contract boundaries. OrCa follows and tests whether your contracts honor the behavior you specify, returning failing inputs when they do not.
Detects unsafe patterns across contract boundaries, for breadth.
// 01 Vanguard
Explore Vanguard →Tests whether your contracts honor the behavior you specify.
// 02 OrCa
OrCa retests your specs on every change, and its statistics report shows your auditors how your components actually interact. The audit still gives you a signed expert review.
Before audit
During audit
After audit



A fuzzer generates large numbers of inputs and transaction sequences to exercise behavior your unit tests did not anticipate. OrCa is specification guided: it tests against the behavior you describe, not just for crashes.
You write specs in [V], a declarative language for what must always or never happen. You can also start from the specification library, which covers common protocols.
Foundry and Hardhat projects, Hardhat versions 2 and 3 included.
Most campaigns run in 10 to 30 minutes.
OrCa tests your contracts against your specs with thousands of generated cases; it does not prove them. You get high-signal testing without the overhead of a proof.
Still have questions? Contact us
Fuzzing
How fuzzers and invariant tests work on smart contracts, and how to write properties that find real bugs.
Solidity Security
Twelve practices for Solidity code, from access control to external calls, with the bugs each one prevents.
Security Tools
What static analysis, fuzzing and formal proofs each catch, and how they fit together in one workflow.
Run OrCa on your smart contracts today.