Abstract
In recent years, with the advent of the blockchain 2.0 era, the security problems of smart contracts have gradually emerged. The detection of contract vulnerabilities is currently a research hotspot in blockchain security [1]. Current research methods are mainly based on traditional software defect analysis methods for vulnerabilities detection, but the detection accuracy and false alarm rate are not satisfactory. In this paper, we propose a bidirectional long short-term memory neural network model (HAM-BiLSTM for short) with hierarchical attention mechanism, which takes the code segment and account information of a smart contract as input. It divides the input samples into three levels as documents: word level, sentence level and document level, and introduces attention mechanism in different levels. The aim is to detect reentrancy vulnerability more accurately and reduce the false alarm rate of the model as much as possible. The neural network model classifies smart contracts through softmax layers by learning feature information from training samples to determine the presence of reentrancy vulnerability. The experiments demonstrate that our proposed solution and model increase detection accuracy and reduce false alarm rate.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.