Mutation testing uncovered a high-severity bug in the Arkis smart-contract protocol
Mutation testing can find critical vulnerabilities in blockchain smart contracts that are missed by conventional test suites.
Security & privacy Trail of Bits 18 Sep 2025 Tooling Deployed evidence
Published as “Use mutation testing to find the bugs your tests don't catch”
Why it matters
Mutation testing can reveal hidden bugs in smart contracts, improving security beyond what traditional coverage metrics provide.
Summary
The post explains mutation testing, which creates small code changes (mutants) and runs the existing test suite to see if they are caught. Using Slither's slither-mutate tool, the authors ran a campaign on the Arkis protocol and discovered uncaught mutants that revealed a high-severity vulnerability (TOB-ARK-10) allowing fund drainage. The evidence is a single real-world audit case, and the authors note the technique can be time-consuming but effective for improving test suites.
What they found 2
- Mutation testing uncovered a high-severity vulnerability (TOB-ARK-10) in the Arkis protocol.
“During the audit, our engineers ran a mutation testing campaign against the files in scope and found several uncaught mutants, which led to finding TOB-ARK-10, a high severity issue that could have allowed attackers to drain funds from the protocol.”
- A surviving mutant showed that commenting out a line had no effect on the test suite.
“These results show that the test suite coverage for the affected files was insufficient: commenting out line 33 had no effect on the tests.”
Caveats 5
- The biggest disadvantage of mutation testing is that a campaign can take a very long time to finish.
- Executing a mutation testing campaign can take several hours or days, depending on the size of the codebase, the number of contracts selected for mutation, the enabled mutators, and the test suite runtime.
- Mutation testing campaigns can take several hours or days to run.
- Prioritization of mutators is required to reduce runtime.
- The provided command works only with the Foundry framework; other frameworks need manual adaptation.
What’s new here 4
- Demonstrates mutation testing applied to Solidity via the slither-mutate tool.
- Shows a real audit where mutation testing uncovered a high-severity vulnerability in the Arkis protocol.
- Provides step-by-step instructions for running mutation campaigns with the Foundry testing framework.
- Discusses runtime challenges and prioritization strategies for large codebases.