Bytecode Obfuscation for Smart Contracts via Structural and Semantic Perturbation
Open Access
- 17 April 2026
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Software Engineering and Methodology
Abstract
Smart contracts are critical to blockchain but face significant security challenges, where potential vulnerabilities can lead to financial losses and undermine system trustworthiness. Code obfuscation has emerged as a crucial technique for countering reverse engineering and enhancing contract security. However, existing methods suffer from three major limitations: (1) current bytecode obfuscation methods are primarily designed for traditional programming languages and cannot be directly applied to Solidity; (2) these methods exhibit limited resistance against advanced decompilation tools; and (3) they often result in high gas consumption. To this end, we propose BOSC , a novel bytecode obfuscation method that integrates four obfuscation strategies from both structural and semantic perspectives to enhance obfuscation effectiveness. Specifically, in structural perturbation, we adopt and refine incomplete instruction obfuscation and false branch obfuscation, while in semantic perturbation, we improve and employ instruction reordering obfuscation and flower instruction obfuscation. Experimental results demonstrate that BOSC significantly increases the decompilation failure rate from 6.06% to 96.4%, and raises cyclomatic complexity by 81.83%, providing robust protection against automated attacks. This improvement incurs only a modest additional gas cost of 1,792 gwei , which translates to an approximate expense of 0.33869 USD , thereby achieving a balance between obfuscation effectiveness and economic efficiency.Keywords
This publication has 18 references indexed in Scilit:
- Enhancing Ethereum smart-contracts static analysis by computing a precise Control-Flow Graph of Ethereum bytecodeJournal of Systems and Software, 2023
- Identification of token contracts on Ethereum: standard compliance and beyondInternational Journal of Data Science and Analytics, 2021
- Ethereum, Smart Contracts, DApps2020
- Diversification and obfuscation techniques for software security: A systematic literature reviewInformation and Software Technology, 2018
- Enhance virtual-machine-based code obfuscation security through dynamic bytecode schedulingComputers & Security, 2018
- An Overview of Blockchain Technology: Architecture, Consensus, and Future Trends2017
- Blockchain Enabled Applications2017
- Preventing Reverse Engineering Threat in Java Using Byte Code Obfuscation Techniques2006
- Advanced obfuscation techniques for Java bytecodeJournal of Systems and Software, 2004
- Computation of normalized edit distance and applicationsIEEE Transactions on Pattern Analysis and Machine Intelligence, 1993