Automated testing that sends a program large numbers of random or generated inputs and instruction sequences to find crashes and broken invariants that hand-written tests miss.
Why it matters
Fuzzing explores input combinations that nobody thought to write a test for, so it is a good complement to an audit and to unit tests. A team that already fuzzes its program gives auditors a head start and usually has fewer findings.
What to check
- Ask which invariants the fuzz tests check, for example that total supply or vault balances stay consistent.
- Ask how often the fuzz tests run and whether they run on every change.
How it works in practice
A fuzz test generates random sequences of instructions with random arguments and accounts, runs them against the program and checks invariants after each step, for example that a vault balance equals the sum of deposits.
When a run breaks an invariant, the tool saves the input so the team can replay it, fix the bug and keep the case as a regression test.
Common mistakes
- Writing fuzz tests with no invariants, so they only check that the program does not crash.
- Running them once before the audit and never again after code changes.
- Using inputs so narrow that the interesting paths are never reached.
Related terms
- Audit (smart contract audit)An independent security review of a program at a specific commit, usually by a specialised firm, that reports vulnerabilities and recommendations before launch.
- AnchorThe most widely used framework for writing Solana programs in Rust.
- Arithmetic overflowA calculation whose result does not fit its integer type.
- Bug bountyA public program that pays security researchers for responsibly reporting vulnerabilities in deployed code.
Guides
- Solana pre-launch security checklist: 15 checks before mainnetA practical checklist for launching a Solana program on mainnet: upgrade authority, multisig, verifiable builds, token authorities, monitoring, incident response and the audit.
- How to choose a Solana smart contract auditor: a practical checklistWhat actually matters when picking a Solana auditor: Anchor and native Rust experience, methodology, scope, timelines, red flags in quotes and what a good report looks like.
- Anchor vs native Rust for Solana programs: how to chooseAnchor or native Rust for your Solana program? The real trade-offs in safety, speed of development, compute usage, tooling and hiring, and when each choice makes sense.
Describe your project in plain English. Smart Match suggests verified Solana providers with a reason for each match. Free for teams.
Get matched →