JOURNAL ARTICLE

Smart Contract Vulnerability Detection Based on Hybrid Attention Mechanism Model

Huaiguang WuHanjie DongYaqiong HeQianheng Duan

Year: 2023 Journal:   Applied Sciences Vol: 13 (2)Pages: 770-770   Publisher: Multidisciplinary Digital Publishing Institute

Abstract

A smart contract, as an important part of blockchain technology, has attracted considerable interest from both industry and academia. It provides the basis for the realization of a variety of practical blockchain applications and plays a crucial role in the blockchain ecosystem. While it also holds a large number of digital assets, the frequent occurrence of smart contract vulnerabilities have caused huge economic losses and destroyed the blockchain-based credit system. Currently, the security and reliability of smart contracts have become a new focus of research, and there are a number of smart contract vulnerability detection methods, such as traditional detection tools based on static or dynamic analysis. However, most of them often rely on expert rules, and therefore have poor scalability and high false negative and false positive rates. Recent deep learning methods alleviate this issue, but without considering the semantic information and context of source code. To this end, we propose a hybrid attention mechanism (HAM) model to detect security vulnerabilities in smart contracts. We extract code fragments from the source code, which focus on key points of vulnerability. We conduct extensive experiments on two public smart contract datasets (a total of 24,957 contracts). Empirical results show remarkable accuracy improvement over the state-of-the art methods on five kinds of vulnerabilities, where the detection accuracy could achieve 93.36%, 80.85%, 82.56%, 85.62%, and 82.19% for reentrancy, arithmetic vulnerability, unchecked return value, timestamp dependency, and tx.origin, respectively.

Keywords:
Computer science Smart contract Computer security Vulnerability (computing) Scalability Context (archaeology) Key (lock) Source code Blockchain Risk analysis (engineering) Artificial intelligence Data science Business Database

Metrics

32
Cited By
19.79
FWCI (Field Weighted Citation Impact)
52
Refs
0.99
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Blockchain Technology Applications and Security
Physical Sciences →  Computer Science →  Information Systems
Cybercrime and Law Enforcement Studies
Physical Sciences →  Computer Science →  Information Systems
Advanced Malware Detection Techniques
Physical Sciences →  Computer Science →  Signal Processing
© 2026 ScienceGate Book Chapters — All rights reserved.