This study introduces a framework for identifying and repairing vulnerabilities in smart contracts by utilizing multi-relational graphs combined with a pre-trained model, significantly outperforming current baseline approaches.
Abstract
A smart contract fundamentally consists of code deployed on the blockchain, noted for its transparent and unchangeable execution. These characteristics, however, also expose it to attackers once any weaknesses are present. In recent years, attacks targeting smart contracts have caused substantial financial losses, highlighting the importance of robust vulnerability detection approaches. Conventional detection techniques, which rely on contextual semantics or symbolic execution, often face limitations in efficiency. Although neural network-based approaches have enhanced detection speed, they frequently compromise accuracy. This study introduces a framework for identifying and repairing vulnerabilities in smart contracts by utilizing multi-relational graphs combined with a pre-trained model. Initially, a Multi-Relational Graph (MRG) is constructed to represent the multi-dimensional aspects of execution logic and data dependencies by integrating multiple program feature graphs. To reduce interference from extraneous code, contract slices are then generated according to node and edge types defined within the MRG. These vectorized slices are subsequently processed by a pre-trained model called SCCodeBERT for both detection and repair of potential vulnerabilities. Experiments show that SCCodeBERT achieves an average accuracy of 96.06% and an F1-score of 90.90% on mainstream vulnerability datasets. Moreover, it reaches an average repair effectiveness of 86.42%, significantly outperforming current baseline approaches. This work presents a highly effective automated solution for enhancing smart contract security, offering notable theoretical and practical contributions.
As a core technology in blockchain-based systems, smart contracts are widely used in various fields. Meanwhile, their post-deployment immutability and financial nature render vulnerabilities attractive to attackers, as evidenced by significant economic losses, making smart contract vulnerability detection a critical ta...
Yunhan Zhang, Yan-Xiang Tong, Ben Wang et al.· Annual International Compute...· 0 citations
SmartGuard is presented, an automated multi-stage vulnerability analysis and detection system that integrates transformer-based code models with ensemble machine learning for comprehensive security assessment of Ethereum smart contracts.
O. Omotosho, F. G. Edeguare, M. D. Ogundare et al.· 0 citations
A novel neural network model is proposed that accommodates variable-length input sequences and advances the state-of-the-art by enabling truncation-free processing of long sequences, demonstrating superior performance over baselines reliant on fixed inputs.
Pei-Qian Li, Guo-Jun Wang, Xuelei Liu et al.· Knowledge and Information Sy...· 0 citations
A failure analysis of the representation layer underlying GNN-based smart contract vulnerability detectors finds one confirmed case of misclassification caused directly by a representation-layer failure; the prevalence of such failures in real-world contract populations remains an open empirical question.
Birindwa Prisca Hondi, Chinoso Philip Nwishienyi, Charity Wanja Mwaura et al.· 0 citations
Smart contract vulnerabilities remain a major source of financial loss in blockchain ecosystems. A large body of work has investigated automated detection using static analysis, symbolic execution, and more recently large language models (LLMs). While these approaches are effective for many syntactic and arithmetic iss...
Yangzezhi Zheng, Yangbo Zhou, Yichen Wang et al.· Annual International Compute...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.