Smart contract vulnerability detection method based on echo state network
Smart contracts on blockchain platforms are decentralized applications to provide secure and trusted services to multiple parties on the chain.Smart contract vulnerability detection can ensure the security of these contracts.However,the existing methods for detecting smart contract vulnerabilities encountered issues of insufficient feature learning and low vulnerability detection accuracy when dealing with imbalanced sample sizes and incomplete semantic information mining.Moreover,these methods cannot detect new vulnerabilities in contracts.A smart contract vulnerability detection method based on Echo State Network(ESN)was proposed to address the above problems.Firstly,different semantic and syntactic edges were learned on the basis of contract graph,and feature vectors were obtained through Skip-Gram model training.Then,ESN was combined with transfer learning to achieve transfer and extension of new contract vulnerabilities in order to improve the vulnerability detection rate.Finally,experiments were conducted on the smart contract dataset collected on Etherscan platform.Experimental results show that the accuracy,precision,recall,and F1-score of the proposed method reach 94.30%,97.54%,91.68%,and 94.52%,respectively.Compared with Bidirectional Long Short-Term Memory(BLSTM)network and Bidirectional Long Short-Term Memory with ATTention mechanism(BLSTM-ATT),the proposed method has the accuracy increased by 5.93 and 11.75 percentage points respectively,and the vulnerability detection performance is better.The ablation experiments also further validate the effectiveness of ESN for smart contract vulnerability detection.
vulnerability detectionsmart contractEcho State Network(ESN)transfer learningblockchain