Smart contract vulnerability detection method based on pre-training and novel timing graph neural network
To address the limitations of current deep learning-based methods in extracting contract bytecode features and representing vulnerability semantics,as well as the shortcomings of the traditional graph neural networks in learning tem-poral information from contract statements,a method for detecting vulnerabilities in contracts was proposed based on pre-trained and temporal graph neural network.Firstly,the pre-trained model was used to transform smart contract byte-code into a vulnerability semantics-aware contract graph structure.Then,combined with a self-attention mechanism,the event-driven temporal graph neural network was designed to extract temporal information during contract execution.Fi-nally,focusing on reentrant vulnerabilities,timestamp dependency vulnerabilities,and Tx.origin authentication vulner-abilities,extensive experiments were conducted on a dataset of 120 932 actual contracts.The results show that the pro-posed method significantly outperforms existing approaches.