Peculiar: Smart Contract Vulnerability Detection Based on Crucial Data Flow Graph and Pre-training Techniques
Authors:
Top Cited Papers
- 1 October 2021
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 378-389
Abstract
Smart contracts with natural economic attributes have been widely and rapidly developed in various fields. However, the bugs and vulnerabilities in smart contracts have brought huge economic losses, which has strengthened people's attention to the security issues of smart contracts. The immutability of smart contracts makes people more willing to conduct security checks before deploying smart contracts. Nonetheless, existing smart contract vulnerability detection techniques are far away from enough: static analysis approaches rely heavily on manually crafted heuristics which is difficult to reuse across different types of vulnerabilities while deep learning based approaches also have unique limitations. In this study, we propose a novel approach, Peculiar, which uses Pre-training technique for detection of smart contract vulnerabilities based on crucial data flow graph. Compared against the traditional data flow graph which is already utilized in existing approach, crucial data flow graph is less complex and does not bring an unnecessarily deep hierarchy, which makes the model easy to focus on the critical features. Moreover, we also involve pre-training technique in our model due to the dramatic improvements it has achieved on a variety of NLP tasks. Our empirical results show that Peculiar can achieve 91.80 % precision and 92.40 % recall in detecting reentrancy vulnerability, one of the most severe and common smart contract vulnerabilities, on 40,932 smart contract files, which is significantly better than the state-of-the-art methods (e.g., Smartcheck achieves 79.37% precision and 70.50% recall). Meanwhile, another experiment shows that Peculiar is more discerning to reentrancy vulnerability than existing approaches. The ablation experiment reveals that both crucial data flow graph and pre-trained model contribute significantly to the performances of Peculiar.Keywords
Funding Information
- National Natural Science Foundation of China (61872445,61672529)
This publication has 43 references indexed in Scilit:
- IoT Service Based on JointCloud Blockchain: The Case Study of Smart Traveling2018
- Security Assurance for Smart Contract2018
- Deep Contextualized Word Representations2018
- ZEUS: Analyzing Safety of Smart Contracts2018
- Smart Contracts Make Bitcoin Mining Pools Vulnerable2017
- Introducing Ethereum and Solidity2017
- Deep API learning2016
- Making Smart Contracts Smarter2016
- Combining Deep Learning with Information Retrieval to Localize Buggy Files for Bug Reports (N)2015
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987