Computer Science ›› 2026, Vol. 53 ›› Issue (10): 464-475.doi: 10.11896/jsjkx.250800080

• Information Security • Previous Articles     Next Articles

Smart Contract Vulnerability Detection Method Based on Temporal Feature Graph NeuralNetwork

CHEN Hong1, WANG Mingjun1, JIN Haibo1, WU Cong2, LU Qi1   

  1. 1 School of Software,Liaoning Technical University,Huludao,Liaoning 125105, China
    2 School of Innovation Practice,Liaoning Technical University,Fuxin,Liaoning 123000, China
  • Received:2025-08-18 Revised:2025-11-29 Published:2026-10-13
  • About author:CHEN Hong,born in 1967,postgra-duate,associate professor,master’s supervisor,is a member of CCF(No.46268M).Her main research interests include information security and network security.
    WANG Mingjun,born in 2001,postgraduate.Her main research interest is network and information security.
  • Supported by:
    National Natural Science Foundation of China(62173171),Scientific Research Project of Liaoning Provincial Department of Education(LJKFZ20220198) and Scientific Research Project of Colleges and Universities in Guangdong Province(2021ZDZX1027).

Abstract: Aiming at the problem of low accuracy caused by high false positives in static analysis and low efficiency in dynamic analysis in smart contract security vulnerability detection,a smart contract vulnerability detection method based on fusion of temporal-feature graph neural network(FTF-GNN) is proposed.Firstly,pattern-based features Pr and graph-based features Gr are extracted through static analysis,which pattern-based features Pr reduce false positives caused by blind detection and graph-based features Gr avoid the bottleneck of whole graph traversal.Secondly,the high-risk functions are screened based on the risk probability threshold λ to improve the overall analysis efficiency.Thirdly,a temporal graph neural network is constructed to enhance the ability to capture complex vulnerabilities through the self-attention mechanism.Finally,it focuses on reentrant vulnerability and timestamp dependency vulnerability detection.Experiments on the real contract datasets of Ethereum and VNT chain show that the accuracy of the proposed model for reentry vulnerability detection reaches 93.12% and the F1 value reaches 94.41%,which are 0.31 percentage points and 2.73 percentage points higher than the best of the existing comparison methods.The ac-curacy of detecting timestamp dependence vulnerability reaches 91.71% and the F1 value reaches 92.47%.Compared with the existing comparison methods,the best ones increase by 0.07 percentage points and 1.10 percentage points.

Key words: Blockchain, Smart contract, Vulnerability detection, Temporal feature, Graph neural network

CLC Number: 

  • TP393
[1] SZABO N.Formalizing andsecuring relation-ships on public networks [J].First Monday,1997,2:9.
[2] CHEN J F,WANG Z X,CAI S H,et al.Vulnerability detection method for blockchain smart contracts based on metamorphic testing[J].Journal on Communications,2023,44(10):164-176.
[3] WANG Z X,WEN B.Smart Contract Vulnerability Detection of Symbol Execution with Critical Path Pre-Searching [J].Journal of Applied Sciences,2024,42(2):364-374.
[4] MUELLER B.Mythril-reversing and bug hunting frameworkfor the ethereum blockchain[EB/OL].[2022-01-16].https://pypi.org/project/mythril/0.8.2,2017.
[5] BAI Y M,SHI Z B,XIN W G,et al.Research on Smart Contract Vulnerability Detection Method Based on Word Embedding and Shapelet Time Series Features [J].Journal of North University of China(Natural Science Edition),2023,44(4):381-387.
[6] MA F,XU Z,REN M,et al.Pluto:Exposing vulnerabilities in intercontract scenarios [J].IEEE Transactions on Software Engineering,2021,48(11):4380-4396.
[7] LIU Z,QIAN P,YANG J,et al.Rethinking smart contractfuzzing:Fuzzing with invocation ordering and important branch revisiting [J].IEEE Transactions on Information Forensics and Security,2023,18:1237-1251.
[8] CHEN K X,LIU J Y,JIA P.An Score Oriented Fuzzing Method for Smart Contracts [J].Modern Computer,2022,28(8):36-41.
[9] XIAO P,ZHANG X S,YANG F Y,et al.Vulnerability Detection Based on Deep Graph Convolutional Network and Attention Mechanism [J].Computer Engineering and Applications,2024,60(3):292-298.
[10] LIU Z,QIAN P,WANG X,et al.Combining graph neural networks with expert knowledge for smart contract vulnerability detection [J].IEEE Transactions on Knowledge and Data Engineering,2021,35(2):1296-1310.
[11] FAN Y Q,SHANG S Y,DING X.Smart Contract Vulnerability Detection Based on Dual Attention Graph Convolutional Network[C]//Proceedings of the International Conference on Collaborative Computing:Networking,Applications and Worksharing.Berlin:Springer,2021:335-351.
[12] CHEN D,FENG L,FAN Y,et al.Smart contract vulnerability detection based on semantic graph and residual graph convolutional networks with edge attention [J].Journal of Systems and Software,2023,202:111705.
[13] HE L,ZHAO X,WANG Y,et al.Graphsa:Smart contract vulnerability detection combining graph neural networks and static analysis[C]//26th European Conference on Artificial Intelligence(ECAI).IOS Press,2023:1020-1027.
[14] HUANG J,HAN S M,YOU W,et al.Hunting vulnerable smart contracts via graph embedding based bytecode matching [J].IEEE Transactions on Information Forensics and Security,2021,16:2144-2156.
[15] LIN Y J,ZHANG Y.Integer Overflow Vulnerability Detection Based on the Fusion of Semantics and Structural Features [J].Journal of Hubei University(Natural Science Edition),2024,46(4):531-539.
[16] XUE J L,LI B,ZHANG J L,et al.A smart Contract Defect Detection Method Based on Transfer Learning [J].Journal of Yang-zhou University(Natural Science Edition),2023,26(4):25-30.
[17] KIPF T N.Semi-supervised classification with graph convolu-tional networks[J].arXiv:1609.02907,2016.
[18] ZHUANG Y,LIU Z,QIAN P,et al.Smart Contract Vulnerabi-lity Detection Using Graph Neural Networks[C]//Proceedings of the Twenty-ninth International Conference on International Joint Conferences on Artificial Intelligence.2021:3283-3290.
[19] LI X,DU J L,CHEN Z W,et al.Smart Contract Vulnerability Detection Method Based on Dual Channel [J].Science Techno-logy and Engineering,2023,23(34):14651-14659.
[20] SHI Z T,SHI Z B,LIU D M,et al.Feature-Wise ModulationGraph Neural Network Smart Contract Vulnerability Detection Based on Source Code [J].Journal of North University of China(Natural Science Edition),2024,45(5):601-607.
[21] LI X H,YANG Y B,ZHANG J W,et al.Graph Neural Network Vulnerability Detection for Ethernet Smart Contracts [J].Journal of Xidian University,2024,51(4):139-150.
[22] ZHOU T,DU Y P,XIE R F,et al.Vulnerability Detection Method Based on Deep Fusion of Multi-dimensional Features from Heterogeneous Contract Graphs [J].Computer Science,2025,52(9):368-375.
[23] LI C Y,HUANG K,ZHANG R H,et al.A Heterogeneous Graph Attention Network-Based Approach for Smart Contract Vulnerability Detection [J].Computer Science,2026,53(2):423-430.
[24] SONG J H,CAO K,ZHANG Y.Smart Contract Bytecode Vulnerability Detection Method Based on Heterogeneous Graphs and Instruction Sequences [J].Computer Science,2025,52(12):367-373.
[25] ANTONOPOULOS A M,WOOD G.Mastering ethereum:buil-ding smart contracts and dapps[M].O’reilly Media,2018.
[26] ZENG Q R,HE J H,ZHAO G S,et al.EtherGIS:A Vulnerability Detection Framework for Ethereum Smart Contracts Based on Graph Learning Features [C]//Proceedings of the 2022 IEEE 46th Annual Computers,Software,and Applications Conference(COMPSAC).Piscataway,NJ:IEEE,2022:1742-1749.
[27] WANG S L.A Source Code Vulnerability Detection SchemeBased on Code Sequence and Graph Structure [J].Journal of North University of China(Natural Science Edition),2023,44(6):641-653.
[28] YING Z B,SONG L C,CHEN D,et al.AWIBS:An adaptive weight incentive for blockchain sharding [J].Journal of Information and Intelligence,2023,1(2):87-103.
[1] JIANG Hangyu, CAO Huaihu, ZHOU Kai, CHEN Fu, SU Rui. Dual-channel Message Passing for Class-imbalanced Graph Fraud Detection [J]. Computer Science, 2026, 53(9): 439-450.
[2] HE Jiaojun, LI Xin. Review of Graph Learning Based on Large Language Models:Methods,Benchmarks and Advances [J]. Computer Science, 2026, 53(9): 1-15.
[3] XU Jianjun, BI Ying, CHEN Mingming, LIANG Jing. Survey of Molecular Pre-training Models and Their Applications in Drug Discovery [J]. Computer Science, 2026, 53(9): 110-123.
[4] WANG Xingyue, YE Hongting, XU Honghua, ZHOU Suyang, KONG Youyong. Multimodal Renewable Energy Data Feature Graph Modeling Method Based on Hard Prompts [J]. Computer Science, 2026, 53(9): 145-156.
[5] QUAN Jingtao, ZHANG Lei, LIU Bailong, WANG Feifan. Leveraging Multi-source Contextual Knowledge-enhanced Graph for Traffic Forecasting [J]. Computer Science, 2026, 53(8): 245-256.
[6] ZHOU Haobin, LU Yunhao, QIN Jun, JIAO Xintao, ZENG Biqing. CCSFR:Collaborative-Content Semantic Fusion for Review-enhanced Recommendation [J]. Computer Science, 2026, 53(8): 276-284.
[7] LI Xiaochao, YUAN Zisu, LI Qianmu, LIU Fan, CHE Xun. Survey on Code Representation Learning for Vulnerability Detection [J]. Computer Science, 2026, 53(8): 388-402.
[8] YAN Qisen, KANG Ming, YANG Yiyao, CHEN Wen. Semi-supervised Source Code Vulnerability Detection Model with Dual-stage Label Propagation [J]. Computer Science, 2026, 53(8): 413-425.
[9] PAN Yuquan, YUAN Deyu, WANG Anran, JIA Yuan. Enhanced GNNs Across Social Networks User Identity Linkage Algorithm Based on HiddenFeatures [J]. Computer Science, 2026, 53(8): 50-60.
[10] CHEN Shanshan, JING Ningkang. OptimalFix:Complete Framework for Efficient Detection and Patch of Vulnerabilities in SmartContracts Automatically [J]. Computer Science, 2026, 53(7): 422-432.
[11] ZHAO Xingbo, LIAN Defu. Traffic Flow Forecasting Based on Dynamic Graph Convolution and Hypergraph Learning [J]. Computer Science, 2026, 53(7): 205-212.
[12] LI Kaiju, YIN Chenyang, CHENG Zhangtao, LIU Xueting, ZHOU Fan. Causal Subgraph Learning for Cascade Popularity Prediction [J]. Computer Science, 2026, 53(7): 213-221.
[13] WU Kai, SUN Zhe, ZHANG Xu, CAO Yadong, SUN Zhixin. Research on Modeling and Scheduling Methods for Intra-city Delivery Based on Heterogeneous Graph Neural Networks [J]. Computer Science, 2026, 53(7): 242-250.
[14] WANG Jiajun, JIAO Pengfei, ZHANG Xinxun, LI Tianpeng, GAO Mengzhou. Unsupervised Dynamic Graph Change Point Detection Method Based on Variational Graph Auto-encoder [J]. Computer Science, 2026, 53(7): 272-279.
[15] TAI Wenxin, LIU Xueting, WANG Xiaohan, ZHONG Ting, WANG Yong, ZHOU Fan. Trustworthy IP Geolocation Method via Graph Neural Networks and Conformalized Quantile Regression [J]. Computer Science, 2026, 53(7): 308-314.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!