ParityFuzz: Finding Inconsistencies across Solidity Compilers via Fine-Grained Mutation and Differential Analysis

๐Ÿ“… 2026-05-09
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF

career value

198K/year
๐Ÿค– AI Summary
This work addresses the critical issue of compilation and execution inconsistencies across Solidity compilers, which can lead to erroneous contract migrations, debugging challenges, and security vulnerabilities. To tackle this problem, the authors propose ParityFuzz, a differential testing framework that integrates grammar- and boundary-aware fine-grained mutation, reinforcement learningโ€“guided test generation, and cross-compiler bytecode normalization for precise behavioral comparison. The approach substantially enhances testing efficacy, achieving up to an 18-fold increase in compilation success rate and a 1.8ร— improvement in code coverage. Empirical evaluation uncovered 64 previously unknown inconsistencies, 11 of which have been confirmed and patched by developers, with several findings recognized through bounties awarded by the Polkadot community.
๐Ÿ“ Abstract
The Solidity smart contract ecosystem has rapidly grown, leading to multiple compilers targeting different blockchain platforms or improving compilation efficiency. Although many compilers aim to be compatible with the primary Solidity compiler (Solc), significant inconsistencies in compilation and execution remain. These inconsistencies hinder contract migration, mislead developers during debugging, and may introduce exploitable vulnerabilities, causing financial losses. Existing testing techniques mainly focus on bugs within a single compiler or perform differential testing in the same execution environment. However, they are insufficient for detecting cross-compiler inconsistencies, as they lack mechanisms to explore triggering conditions and compare bytecode across environments. We propose ParityFuzz, a cross-compiler differential testing framework for Solidity. It operates in three stages. First, it derives mutation rules, including syntax- and boundary-oriented rules, by analyzing compilers and execution environments. Second, it uses reinforcement learning to select effective mutation rules for test generation. Third, it compiles and executes programs across multiple compilers, then normalizes and compares results to detect inconsistencies. Our evaluation shows ParityFuzz is efficient and effective. It achieves up to 18x higher compilation success rate and 1.8x higher code coverage than state-of-the-art fuzzers. It uncovers 64 previously unknown inconsistencies across six compilers. Notably, 11 issues have been fixed, and our findings received a bounty from the Polkadot community.
Problem

Research questions and friction points this paper is trying to address.

Solidity compilers
cross-compiler inconsistencies
smart contract
differential analysis
bytecode comparison
Innovation

Methods, ideas, or system contributions that make the work stand out.

differential testing
Solidity compilers
fine-grained mutation
reinforcement learning
cross-compiler inconsistency
๐Ÿ”Ž Similar Papers
No similar papers found.