arXiv:2610.18165cs.SEOct 2026

Manuscript Offprint

arXiv:2610.18165

Soliduzz: Finding Miscompilations in Smart-Contract Compilers with Assertion-Driven Equivalence Oracles

Alexander Stromberger, Christoph Hochrainer, Valentin Wüstholz, Maria Christakis

ALEXANDER STROMBERGER, TU Wien, Austria

CHRISTOPH HOCHRAINER, TU Wien, Austria

VALENTIN WÜSTHOLZ, Consensys Diligence, Austria

MARIA CHRISTAKIS, TU Wien, Austria

Smart contracts compiled to the Ethereum Virtual Machine (EVM) can manage high-value assets and are difficult to patch after deployment. Compiler miscompilations are therefore especially dangerous: compilation succeeds, but the generated bytecode does not preserve the semantics of the source program. Existing smart-contract compiler fuzzers either focus on robustness failures or rely on differential oracles that compare compiler configurations.

We present SOLIDUZZ, an approach for finding miscompilations in EVM smart-contract compilers using assertion-driven equivalence oracles. SOLIDUZZ uses product programs to encode semantic equivalence as executable assertions. The key shift is to compile these self-checking programs and let off-the-shelf fuzzers and symbolic execution engines explore the resulting bytecode for assertion violations, without requiring compiler-specific support from the analyzer.

SOLIDUZZ instantiates this idea with two complementary families of metamorphic transformations. The first, which we call smart-contract transformations, starts from equivalent expressions and lifts them into smart-contract code that deliberately exercises EVM-specific features such as storage, data locations, control flow, contract interactions, and inline assembly. The second generalizes Equivalence Modulo Inputs (EMI) from fixed concrete inputs to symbolic input spaces. Our symbolic EMI records coverage in the original computation and uses it to guard mutations in the transformed computation. Together, these transformations produce product programs that assert that paired computations yield the same outputs.

We evaluate SOLIDUZZ on three EVM smart-contract compilers—solc, solx, and vyper—using several analysis tools. Overall, SOLIDUZZ exposes 29 bugs. Of these, 24 are compiler bugs: 6 miscompilations, 17 internal compiler errors, and 1 hang. The remaining 5 are bugs in the analysis tools. In time-to-bug experiments over 20 known and newly discovered miscompilations, SOLIDUZZ exposes 9 within 72 hours. Ablations show complementary effects: disabling symbolic EMI leaves 5 bugs exposed, disabling smart-contract transformations leaves 4, and disabling both leaves 3.

1 Introduction

Smart contracts targeting Ethereum are compiled to bytecode that runs on the Ethereum Virtual Machine (EVM). They routinely implement financial protocols, token systems, bridges, auctions, and governance mechanisms. Once deployed, a contract is difficult to patch without an explicit upgrade mechanism, and even upgradeable systems may preserve buggy state or expose users before a fix can be applied. Compiler correctness is therefore a security property of the smart-contract ecosystem: source-level reasoning is only meaningful if the compiler preserves the semantics of the source program.

Miscompilations are particularly dangerous because compilation succeeds without an obvious failure, yet the generated bytecode does not preserve the source semantics. A contract that appears correct in source form may therefore behave differently after compilation.

The oracle problem. Existing fuzzers and generators for Solidity and related smart-contract compilers have substantially improved compiler robustness. FUZZOL [29] uses syntax-aware AST

Authors' Contact Information: Alexander Stromberger, TU Wien, Vienna, Austria, alexander.stromberger@tuwien.ac.at; Christoph Hochrainer, TU Wien, Vienna, Austria, christoph.hochrainer@tuwien.ac.at; Valentin Wüstholz, Consensys Diligence, Vienna, Austria, valentin.wustholz@diligence.security; Maria Christakis, TU Wien, Vienna, Austria, maria.christakis@tuwien.ac.at.

Alexander Stromberger, Christoph Hochrainer, Valentin Wüstholz, and Maria Christakis

mutation to exercise new solc paths; ERWIN [26] uses bounded exhaustive random generation to target bug-prone Solidity feature combinations; and AFL-COMPILER-FUZZER [14] augments AFL with compiler-oriented mutation and splicing operators. These tools are effective at exposing robustness failures such as crashes, hangs, and internal compiler errors.

Semantic testing requires an oracle for determining whether successfully compiled bytecode preserves the intended behavior. Two independently developed Solidity compiler-testing tools share the same name, differing only in capitalization: Li et al.'s SOLSMITH [24] and Shastry's SOLSMITH [31]. Both use differential testing [28] across compiler configurations. SOLSMITH [24] emphasizes validity and language-feature diversity, whereas SOLSMITH [31] compares legacy with intermediate-representation-based code generation and unoptimized with optimized compilation. Because both rely on cross-configuration agreement, they can miss bugs that affect both sides identically. This leaves a complementary challenge: detecting semantic errors without another compiler pipeline or configuration as a reference.

This challenge reflects the oracle problem in compiler testing: testing tools need a way to distinguish correct generated code from miscompiled code [7]. Notable examples include CSMITH, which generates random C programs and uses differential testing across compilers [38], and metamorphic testing [8], which constructs related programs or inputs whose executions should satisfy known relations. Equivalence Modulo Inputs (EMI) is one such technique: it mutates code that is irrelevant for a given input [21]. These techniques provide powerful semantic oracles. Our goal is to generate equivalence oracles tailored to EVM-specific language and compiler features and encode them as assertions that off-the-shelf analyzers can attempt to violate.

Our approach. We present SOLIDUZZ, which realizes this idea for EVM smart-contract compilers. SOLIDUZZ uses product programs to encode semantic equivalence as executable assertions: it combines computations that should be equivalent in a single program, executes them on the same inputs, and compares their results. After compilation, any assertion violation is a candidate miscompilation.

Embedding the oracle in the program separates oracle construction from input exploration. A fuzzer or symbolic execution engine need not understand the compiler, the transformation that produced the equivalent computations, or why they should agree. It only needs to explore the compiled program and report assertion violations. Unlike a differential oracle, each generated product program carries its own semantic check and does not require another compiler pipeline or configuration as a reference.

Oracle generators. SOLIDUZZ constructs assertion-driven equivalence oracles using two complementary families of metamorphic transformations. The first lifts equivalent expressions into smart-contract code that exercises EVM-specific compiler features. These smart-contract transformations are not generic syntactic perturbations: they deliberately stress features such as storage, data locations, control flow, contract interactions, and inline assembly. This allows the generated programs to reach compiler components that simple expression tests do not exercise.

The second family introduces symbolic EMI, which generalizes Equivalence Modulo Inputs from fixed concrete inputs to symbolic input spaces. Classical EMI executes a program on a concrete input and mutates code that is irrelevant for that execution. SOLIDUZZ instead embeds an original and a transformed computation in a single product program: the first records coverage, and the second uses that coverage to select between original and mutated code. The product program then asserts that both computations produce the same outputs.

Together, the two transformation families generate programs that exercise smart-contract compiler features and check semantic equivalence. Existing fuzzers and symbolic execution engines can then search these programs for inputs that expose miscompilations as assertion violations.

SOLIDUZZ : Finding Miscompilations in Smart-Contract Compilers with Assertion-Driven Equivalence Oracles

3

Results. We evaluate SOLIDUZZ on solc, solx, and vyper using several EVM analysis tools. SOLIDUZZ finds 24 previously unknown compiler bugs: 6 miscompilations, 17 internal compiler errors, and 1 hang. During analyzer-driven exploration, it also exposes 5 bugs in the analysis tools, for 29 bugs overall. The miscompilations affect multiple compiler components and include bugs that manifest only after successful compilation. Time-to-bug experiments and ablations show that the two transformation families are complementary: using both exposes substantially more bugs than either family alone.

Contributions. This paper makes the following contributions:

  • We introduce assertion-driven equivalence oracles for finding miscompilations in EVM smart-contract compilers. SOLIDUZZ encodes these oracles in product programs, allowing existing fuzzers and symbolic execution engines to search compiled bytecode for inputs that expose semantic compiler bugs as assertion violations.

  • We present smart-contract transformations that lift equivalent expressions into code exercising storage, data locations, control flow, contract interactions, and inline assembly.

  • We introduce symbolic EMI, a coverage-guided metamorphic formulation of Equivalence Modulo Inputs that makes coverage part of the generated program, guards mutations with that coverage, and lets existing analyzers search for inputs that violate output equivalence.

  • We implement these ideas in SOLIDUZZ and evaluate them on solc, solx, and vyper. SOLIDUZZ finds 24 compiler bugs, including 6 miscompilations, and exposes 5 additional bugs in the analysis tools. Our ablations show that the two transformation families are complementary for bug discovery.