# SAEFUZZ: Smart Contract Vulnerability Detection through Statically Guided Evolutionary Fuzzing

Crypto.world

> Stage 1 — Find the interesting paths and order the calls. The contract is compiled and disassembled, and a control-flow graph is built where each node is a basic block (a straight-line run of…

**arXiv**: 2608.15151

**Published**: 2026-08-15

**Authors**: Shiting Yu, Rundong Wei, Xiaoqi Li

## AI summary

## Overview

**Research area:** Blockchain security, specifically automated smart contract vulnerability detection using a combination of bytecode-level static analysis and coverage-guided evolutionary fuzzing.

**Technical level:** Intermediate. Readers should be comfortable with Ethereum Virtual Machine (EVM) concepts such as bytecode, opcodes, control-flow graphs, storage reads and writes, function selectors, and the basic fuzzing loop (generate inputs, execute, observe, mutate). No symbolic-execution or constraint-solving background is required.

**Scope:** The paper presents SAEFUZZ, a lightweight fuzzing pipeline that uses static analysis only to *seed and order* transactions before concrete execution, paired with five runtime oracles, and evaluates it on 200 deployed Ethereum contracts against three baselines.

## What This Paper Is About

Smart contracts are stateful: whether a bug is reachable often depends on the exact order of earlier calls, the caller identity, and the values already written to storage. Existing fuzzers mostly generate highly random call sequences, so much of the testing budget is spent on inputs that are semantically invalid or leave the contract in shallow states, and vulnerabilities that require a specific invocation order stay unexplored. The paper's goal is to shrink that search space cheaply — by extracting vulnerability-relevant bytecode paths and ordering externally callable functions by their storage read/write dependencies — and then let evolutionary search and dedicated runtime oracles do the rest, without putting symbolic execution in the online testing loop.

## Key Contributions

1. **Transaction sequence extraction procedure.** SAEFUZZ builds an EVM control-flow graph, retains complete paths containing security-relevant opcodes, recovers function selectors by scanning `PUSH4` operands and mapping them to ABI entries, and prioritises externally callable state-changing sequences using a storage-dependency score.
2. **Evolutionary test case generator.** Type-valid seeds are constructed from contract ABIs (unsigned integers and Booleans sampled from legal domains, addresses as 20-byte values, dynamic arrays and byte arrays populated after sampling a length) and then optimised via selection, crossover, and mutation using combined branch and instruction coverage.
3. **Five runtime oracles integrated into an end-to-end workflow.** Reentrancy, integer overflow/underflow, block-state dependence, unsafe delegate calls, and frozen Ether, each requiring opcode evidence *plus* runtime state or asset-flow evidence rather than a single suspicious instruction.
4. **Evaluation on deployed Ethereum contracts.** Detection quality, code coverage, the ratio of valid test cases, and three module ablations are reported against Oyente, Osiris, and sFuzz.

## Main Findings

- **Detection quality:** SAEFUZZ achieves **98.50% accuracy, 90.00% precision, and 81.82% recall**, detecting **9 of 11** labelled vulnerable contracts with **1 false positive** among the **189** labelled non-vulnerable contracts.
- **Baseline comparison (TP / FP / FN):** Oyente 5 / 29 / 6 (82.50% accuracy, 14.71% precision, 45.45% recall); Osiris 8 / 37 / 3 (80.00%, 17.78%, 72.73%); sFuzz 9 / 11 / 2 (93.50%, 45.00%, 81.82%); SAEFUZZ 9 / 1 / 2 (98.50%, 90.00%, 81.82%).
- **Recall matches sFuzz, false positives drop sharply:** SAEFUZZ and sFuzz both reach 81.82% recall, but SAEFUZZ produces 1 false positive versus sFuzz's 11. The authors attribute this to static direction of testing toward state-changing sequences plus oracles that demand multiple pieces of execution evidence.
- **Coverage and input validity:** **84.07%** mean instruction coverage, with valid test cases making up **93.48%** of generated cases.
- **Ablation — static guidance matters most for false positives:** removing static analysis drops detections from **9 to 5** and raises false positives from **1 to 31** (accuracy 82.0%). Removing directed generation gives **6** detections and **9** false positives (85.0%). Removing the vulnerability oracles gives **7** detections and **29** false positives (83.5%).
- **Modules address different failure modes:** the authors interpret the ablations as search-space reduction (static guidance), exploration of executable states (directed generation), and alarm validation (oracles) respectively.
- **Limitations on the evidence:** only **11** positive contracts are present and repeated runs are not reported, so statistical significance is not established. Label adjudication, dataset identifiers, contract addresses, a public archive, baseline versions, command-line options, time budgets, random seeds, hardware specifications, and repeated-run statistics are all **not reported**. Processor and memory details are also not reported; experiments ran in a common **Windows** environment using **Python 3.8**.

## Methodology in Plain English

SAEFUZZ works in three stages.

**Stage 1 — Find the interesting paths and order the calls.** The contract is compiled and disassembled, and a control-flow graph is built where each node is a basic block (a straight-line run of instructions ending at a jump, stop, revert, or selfdestruct). The authors define a set of "critical" opcodes tied to their five target bugs: `CALL`, `SSTORE`, `SLOAD`, `ADD`, `SUB`, `MUL`, `TIMESTAMP`, `NUMBER`, and `DELEGATECALL`. Blocks containing any of these are marked, and a depth-first traversal keeps complete paths that pass through at least one marked block — this narrows the path set but does not by itself classify anything. From those paths, the tool scans for `PUSH4` constants (four-byte function selectors), maps them back to ABI entries, and assembles candidate transaction sequences. Ordering uses a simple heuristic borrowed from data flow: a function that writes storage (`SSTORE`) may establish state that a later function reads (`SLOAD`), so writers come first. A public or external function with `SSTORE` scores 2 points, one with `SLOAD` scores 1, and sequences are sorted by descending score. A visibility filter strips out calls an external attacker cannot make — private, internal, `view`, `pure`, and legacy `constant` functions — with the stated trade-off that read-only functions are deprioritised even though they could serve as observation calls in a richer sequence model.

**Stage 2 — Generate valid seeds and evolve them.** Each prioritised sequence is instantiated with ABI-conformant arguments. Fitness combines branch coverage and instruction coverage into one score, with the branch term weighted by the ratio of tracked branch outcomes to total instruction positions, so tests that execute more instructions and hit more branches rank higher. The top fraction of seeds (selection ratio α) are paired and recombined, with offspring rejected if they violate the ABI or the inferred storage ordering; a leftover odd seed is carried over. The remaining seeds are mutated with probability p_m, either at the parameter level (replacing values, flipping bits) or the transaction level (changing sender or transferred value).

**Stage 3 — Check the traces with five oracles.** Each evolved seed is executed and the resulting trace is inspected. Reentrancy needs a value-carrying `CALL` with sufficient forwarded gas *and* a storage location read before the call and written after it. Arithmetic bugs need an operation whose reconstructed result falls outside the intended range *and* no effective `require`, `revert`, or checked-arithmetic safeguard. Block-state dependence needs `TIMESTAMP` or `NUMBER` to influence a branch or calculation that decides whether or how much Ether moves. Unsafe delegate call needs a successful `DELEGATECALL` whose target or arguments trace back to unvalidated attacker input, distinguishing mere presence from exploitability. Frozen Ether needs a successful value-accepting transaction plus the absence of any executable outward transfer path under the generated sequences. The report records the contract, the triggering seed, the execution evidence, and the vulnerability class.

## Why This Matters

**Impact on research.** The paper argues a middle position in the design space: symbolic execution, constraint solving, and language-model inference are all avoided inside the testing loop, yet precision improves substantially over both a symbolic-execution tool (Oyente, 14.71% precision) and an evolutionary fuzzer (sFuzz, 45.00% precision). That makes it a useful reference point for work asking how much mileage remains in cheap static heuristics, and it is an explicit counterexample to the assumption that higher precision requires heavier analysis. The paper is also unusually direct about its own evidentiary gaps, listing missing dataset identifiers, baseline configurations, time budgets, and repeated-run statistics as limitations — a reminder that reported precision differences on 11 positive contracts rest on thin ground.

**Real-world applications**

- **Pre-deployment auditing of DeFi and token contracts.** The dataset spans ERC-20, ERC-721, ERC-1155, access-control, security component, decentralised finance, and NFT-related contracts, matching where reentrancy and frozen-Ether losses concentrate.
- **CI-style regression checks.** Because the tool output is an executable transaction sequence plus trace evidence rather than a bare warning, failing tests can be replayed and inspected.
- **Triage support for manual reviewers.** Directing the testing budget toward sequences that actually change security-relevant state shortens the path from a suspicious opcode to a demonstrable exploit.
- **Proxy and upgradeable-contract review.** The authors note that legitimate proxy patterns can resemble unsafe delegate calls, so the delegate-call oracle is aimed squarely at a pattern common in upgradeable deployments.

**Industry relevance.** Fuzzing is already the default dynamic technique for contracts, and its main operational cost is wasted executions on invalid or shallow inputs. A 93.48% valid-test-case ratio and 84.07% instruction coverage matter practically because they translate into less compute per finding. The paper's candidness about missing baselines, hardware, and timeouts also matters to practitioners: on the reported evidence, the 90.00% precision headline should be read as an initial evaluation rather than a benchmark to procure against.

## Future Directions

1. **Release the labelled dataset and implementation, and publish a deterministic protocol.** The authors call for releasing the data, specifying experimental protocols, and reporting runtime and repeated-run variance — without this, the 1-versus-11 false-positive gap over sFuzz cannot be independently verified.
2. **Replace opcode-level storage dependencies with semantic ones.** The current ordering proxy may miss dependencies mediated by mappings, dynamic storage layout, cross-contract calls, events, or application-specific invariants, and can prioritise state changes unrelated to the target vulnerability. Selective taint tracking, semantic dependency analysis, constraint solving, or language-model assistance are named as possible additions while keeping the lightweight path as a baseline.
3. **Harden the oracles against legitimately benign patterns.** Proxy patterns resembling unsafe delegate calls, liveness-based frozen-Ether checks that depend on how thoroughly withdrawal paths are explored, and arithmetic monitoring that must account for Solidity compiler versions and `unchecked` blocks all remain open precision problems.
4. **Extend beyond five classes and beyond the EVM.** Access-control faults, denial of service, transaction-order dependence, and non-EVM platforms are explicitly out of scope and would require new static features, mutators, and runtime evidence, plus cross-chain evaluation to determine which components generalise.

## Target Audience

Smart contract security researchers and tool builders who want a concrete, low-overhead alternative to symbolic execution in the fuzzing loop; auditors and security engineers evaluating whether static guidance plus runtime oracles is worth adding to an existing fuzzing pipeline; and graduate students or newcomers to blockchain security seeking a readable, end-to-end example of how control-flow graphs, storage dependency heuristics, evolutionary search, and trace-based oracles fit together. Readers looking for a rigorously benchmarked, reproducible comparison against state-of-the-art detectors should treat this as a starting point rather than a settled result, given the 11 positive contracts and the unreported baseline configurations.

## Authors’ abstract

The effectiveness of smart contract fuzzing depends strongly on whether generated transactions reach deep, state-dependent execution paths. Existing fuzzers often generate highly random call sequences, wasting executions on semantically invalid or low-value states and leaving vulnerabilities that require specific invocation orders unexplored. We present a lightweight method for generating fuzz test cases under bytecode-level static guidance. We construct an Ethereum virtual…

[The full abstract on arXiv](https://arxiv.org/abs/2608.15151)

[Read the original paper](https://arxiv.org/abs/2608.15151)

---

Canonical: https://crypto.world/paper/saefuzz-smart-contract-vulnerability-detection-through-statically-2608.15151
