Journal of Applied Sciences ›› 2022, Vol. 40 ›› Issue (4): 695-712.doi: 10.3969/j.issn.0255-8297.2022.04.012

• Blockchain • Previous Articles    

SlightDetection: A Static Analysis Tool for Smart Contracts Security Vulnerabilities on Ethereum

CHEN Xiaohan1, ZHAO Xiangfu1, ZHANG Dengji2, FEI Jiajia1   

  1. 1. School of Computer and Control Engineering, Yantai University, Yantai 264005, Shandong, China;
    2. School of Mathematics and Computer Science, Zhejiang Normal University, Jinhua 321004, Zhejiang, China
  • Received:2021-11-12 Published:2022-08-03

Abstract: Security vulnerabilities in Ethereum smart contracts may lead to immeasurable losses. To alleviate this problem, a smart contract vulnerability detection tool SlightDetection is proposed, which uses static program analysis technology to achieve full code coverage. The tool converts smart contract source codes into a corresponding abstract syntax tree, and translates it into an XML intermediate representation. Taking the characteristics of several classic vulnerabilities as an example, the tool writes a custom XPath rule library, and using the XML intermediate representation and the XPath library as inputs, the tool keeps traversing and matching the XPath rule base, till getting the report of vulnerability detection. This work tests 3 classic contracts, and fully demonstrates the faster and more accurate detection features of SlightDetection. The effectiveness of the tool is proved by testing a large number of smart contracts provided on Etherscan and manually verifying more than 100 of them.

Key words: smart contract, vulnerability detection, static analysis, Ethereum

CLC Number: