Litcius/Paper detail

Aroc: An Automatic Repair Framework for On-Chain Smart Contracts

Hai Jin, Zeli Wang, Ming Wen, Weiqi Dai, Yu Zhu, Deqing Zou

2021IEEE Transactions on Software Engineering40 citationsDOIOpen Access PDF

Abstract

Ongoing smart contract attack events have seriously impeded the practical application of blockchain. Although lots of researches have been conducted, they mostly focus on off-chain vulnerability detection. However, smart contracts cannot be modified once they have been deployed on-chain, thus existing techniques cannot protect those deployed contracts from being attacked. To mitigate this problem, we propose a general smart contract repairer named Aroc, which can automatically patch vulnerable deployed contracts without changing the contract codes. The core insight of Aroc is to generate patch contracts to abort malicious transactions in advance. Taking the three most serious bug types (i.e., reentrancy, arithmetic bugs, and unchecked low-level checks) as examples, we present how Aroc automatically repairs them on-chain. We conduct abundant evaluations on four kinds of datasets to evaluate the effectiveness and efficiency of Aroc. In particular, Aroc can repair 95.95% of the vulnerable contracts with an average correctness ratio of 93.32%. Meanwhile, Aroc introduces acceptable additional overheads to smart contract users and blockchain miners. When compared with the state-of-the-art techniques, Aroc introduces either fewer execution overheads or contract codes.

Topics & Concepts

Computer scienceCorrectnessSmart contractComputer securityVulnerability (computing)BlockchainProgramming languageBlockchain Technology Applications and SecurityAdvanced Malware Detection TechniquesSecurity and Verification in Computing
Aroc: An Automatic Repair Framework for On-Chain Smart Contracts | Litcius