SmartFix: Fixing Vulnerable Smart Contracts by Accelerating Generate-and-Verify Repair using Statistical Models
Sunbeom So, Hakjoo Oh
Abstract
We present SmartFix, a new technique for repairing vulnerable smart contracts. There is an urgent need to develop automatic bug-repair techniques for smart contracts, as smart contracts are safety-critical software and manual debugging is burdensome and error-prone. While several repair approaches have been proposed recently, they are unsatisfactory since no existing techniques can achieve high repairability, full automation, and safety guarantee at the same time, posing significant problems for practical use. SmartFix aims to address these shortcomings by using a “generate-and-verify” approach that iteratively enumerates candidate patches while validating their correctness by invoking a safety verifier. However, in this approach, a technical challenge arises as the search space is huge and the verification-based patch validation is expensive. To address this challenge, we present a novel technique for accelerating the generate-and-verify repair procedure using statistical models derived from the verifier’s feedback. Experimental results on real-world Ethereum smart contracts show that SmartFix is able to achieve a fix success rate of 94.8% for critical classes of vulnerabilities, far outperforming sGuard, the existing state-of-the-art technique whose success rate is 65.4%.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers3
- CVE-Factory: Scaling Expert-Level Agentic Tasks for Code Security VulnerabilityXianzhen Luo, Jingyuan Zhang, Shiqi Zhou, JinYang Huang et al.ICML 2026 · 3 citations
- CollisionRepair: First-Aid and Automated Patching for Storage Collision Vulnerabilities in Smart ContractsYu Pan, Wanjing Han, Yue Duan, Mu ZhangUSENIX Security 2025
- SoK: Automated Vulnerability Repair: Methods, Tools, and AssessmentsYiwei Hu, Zhen Li, Kedie Shu, Shenghua Guan et al.USENIX Security 2025
Related papers
- VERISMART: A Highly Precise Safety Verifier for Ethereum Smart ContractsSunbeom So, Myungho Lee, Jisu Park, Heejo Lee et al.S&P 2020 · 133 citations
- EVMPatch: Timely and Automated Patching of Ethereum Smart ContractsMichael Rodler, Wenting Li, Ghassan O. Karame, Lucas DaviUSENIX Security 2021 · 103 citations
- Automated Inference on Financial Security of Ethereum Smart ContractsWansen Wang, Wenchao Huang, Zhaoyi Meng, Yan Xiong et al.USENIX Security 2023
- Leveraging Mixture-of-Experts Framework for Smart Contract Vulnerability Repair with Large Language ModelHang Yuan, Xizhi Hou, Lei Yu, Li Yang et al.ASE 2025 · 1 citation
- All Your Tokens are Belong to Us: Demystifying Address Verification Vulnerabilities in Solidity Smart ContractsTianle Sun, Ningyu He, Jiang Xiao, Yinliang Yue et al.USENIX Security 2024 · 11 citations
