SmartAudit: Smart Contract Vulnerability Detection Using Transfer Learning
摘要
Ethereum being a dominant player in decentralized finance, invites a vast number of smart contracts annually. Though smart contracts play a crucial role in developing decentralized applications that are safe, secure, and efficient, Ethereum lost a huge amount due to various attacks caused by different vulnerabilities within the smart contracts. Therefore, it is crucial to audit the reliability of smart contracts before their deployment. This paper proposes SmartAudit which identifies whether the smart contract is vulnerable. SmartAudit employs BERT (Bidirectional Encoder Representations from Transformers) to identify vulnerabilities in unseen smart contracts. It utilizes optimized opcode sequences derived from a pruned control flow graph as input. The results show that SmartAudit significantly improves accuracy, precision, recall and F1-score compared to the state-of-the-art models.