Enhancing Smart-Contract Security through Machine Learning: A Survey of Approaches and Techniques
Abstract
:1. Introduction
2. Related Work
3. Background
3.1. Classification of Smart-Contract Vulnerabilities
3.1.1. Reentrancy Attack
3.1.2. Integer Overflow and Underflow
3.1.3. Uninitialized Storage Pointer
3.1.4. Access Control Vulnerability
3.1.5. Front-End Runtime Error Vulnerability
3.1.6. Time Dependency
3.1.7. Other Vulnerabilities
3.2. Development of Smart-Contract Security Detection
4. Machine-Learning Techniques
4.1. The Development of Machine Learning
4.2. Machine-Learning Algorithms
4.2.1. Supervised Learning
4.2.2. Semi-Supervised Learning
4.2.3. Unsupervised Learning
4.2.4. Reinforcement Learning
4.3. Comparing Different Kinds of Machine Learning
5. Case Studies of ML-Based Smart-Contract Security Detection
5.1. Document Retrieval
5.2. Machine-Learning-Based Tools for Smart-Contract Vulnerability Detection
5.3. Comparative Analysis of Existing Machine-Learning-Based Smart-Contract Vulnerability Detection Tools
6. Discussion
7. Conclusions and Future Work
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Nakamoto, S. Bitcoin: A peer-to-peer electronic cash system. In Decentralized Business Review; Satoshi Nakamato Institute: Austin, TX, USA, 2008; p. 21260. [Google Scholar]
- Gad, A.G.; Mosa, D.T.; Abualigah, L.; Abohany, A.A. Emerging Trends in Blockchain Technology and Applications: A Review and Outlook. J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 6719–6742. [Google Scholar] [CrossRef]
- Sahoo, S.; Kumar, A.; Mishra, R.; Tripathi, P. Strengthening Supply Chain Visibility With Blockchain: A PRISMA-Based Review. IEEE Trans. Eng. Manag. 2022, 1–17. [Google Scholar] [CrossRef]
- Liu, Y.; Qian, K.; Wang, K.; He, L. BCmaster: A Compatible Framework for Comprehensively Analyzing and Monitoring Blockchain Systems in IoT. IEEE Internet Things J. 2022, 9, 22529–22546. [Google Scholar] [CrossRef]
- Tyagi, A.K.; Dananjayan, S.; Agarwal, D.; Thariq Ahmed, H.F. Blockchain—Internet of Things Applications: Opportunities and Challenges for Industry 4.0 and Society 5.0. Sensors 2023, 23, 947. [Google Scholar] [CrossRef]
- Xu, S.; Guo, C.; Hu, R.Q.; Qian, Y. Blockchain-Inspired Secure Computation Offloading in a Vehicular Cloud Network. IEEE Internet Things J. 2022, 9, 14723–14740. [Google Scholar] [CrossRef]
- Liu, D.; Alahmadi, A.; Ni, J.; Lin, X.; Shen, X. Anonymous Reputation System for IIoT-Enabled Retail Marketing Atop PoS Blockchain. IEEE Trans. Ind. Inf. 2019, 15, 3527–3537. [Google Scholar] [CrossRef]
- Han, Y.; Zhang, Y.; Vermund, S.H. Blockchain Technology for Electronic Health Records. Int. J. Environ. Res. Public Health 2022, 19, 15577. [Google Scholar] [CrossRef]
- Jaiman, V.; Urovi, V. A Consent Model for Blockchain-Based Health Data Sharing Platforms. IEEE Access 2020, 8, 143734–143745. [Google Scholar] [CrossRef]
- Liu, X.; Wang, W.; Niyato, D.; Zhao, N.; Wang, P. Evolutionary Game for Mining Pool Selection in Blockchain Networks. IEEE Wirel. Commun. Lett. 2018, 7, 760–763. [Google Scholar] [CrossRef]
- Gurzhii, A.; Islam, A.K.M.N.; Haque, A.K.M.B.; Marella, V. Blockchain Enabled Digital Transformation: A Systematic Literature Review. IEEE Access 2022, 10, 79584–79605. [Google Scholar] [CrossRef]
- Sunny, F.A.; Hajek, P.; Munk, M.; Abedin, M.Z.; Satu, M.S.; Efat, M.I.A.; Islam, M.J. A systematic review of blockchain applications. IEEE Access 2022, 10, 59155–59177. [Google Scholar] [CrossRef]
- Blockchain Boosts Global Economy: A PWC Digital Report. Available online: https://www.pwc.com/gx/en/news-room/press-releases/2020/blockchain-boost-global-economy-track-trace-trust.html (accessed on 13 October 2020).
- Wood, G. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
- Cheng, H.; Hu, Q.; Zhang, X.; Yu, Z.; Yang, Y.; Xiong, N. Trusted Resource Allocation Based on Smart Contracts for Blockchain-Enabled Internet of Things. IEEE Internet Things J. 2022, 9, 7904–7915. [Google Scholar] [CrossRef]
- Zhu, S.; Cai, Z.; Hu, H.; Li, Y.; Li, W. zkCrowd: A Hybrid Blockchain-Based Crowdsourcing Platform. IEEE Trans. Ind. Inf. 2020, 16, 4196–4205. [Google Scholar] [CrossRef]
- Saini, A.; Zhu, Q.; Singh, N.; Xiang, Y.; Gao, L.; Zhang, Y. A Smart-Contract-Based Access Control Framework for Cloud Smart Healthcare System. IEEE Internet Things J. 2021, 8, 5914–5925. [Google Scholar] [CrossRef]
- Atzei, N.; Bartoletti, M.; Cimoli, T. A survey of attacks on ethereum smart contracts (sok). In Principles of Security and Trust: 6th International Conference, POST 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, 22–29 April 2017, Proceedings 6; Springer: Berlin/Heidelberg, Germany, 2017; pp. 164–186. [Google Scholar]
- Chen, H.; Pendleton, M.; Njilla, L.; Xu, S. A survey on ethereum systems security: Vulnerabilities, attacks, and defenses. ACM Comput. Surv. CSUR 2020, 53, 1–43. [Google Scholar] [CrossRef]
- Liu, J.; Liu, Z. A survey on security verification of blockchain smart contracts. IEEE Access 2019, 7, 77894–77904. [Google Scholar] [CrossRef]
- Kabla, A.H.H.; Anbar, M.; Manickam, S.; Alamiedy, T.A.; Cruspe, P.B.; Al-Ani, A.K.; Karupayah, S. Applicability of intrusion detection system on Ethereum attacks: A comprehensive review. IEEE Access 2022, 10, 71632–71655. [Google Scholar] [CrossRef]
- Rameder, H.; Di Angelo, M.; Salzer, G. Review of automated vulnerability analysis of smart contracts on Ethereum. Front. Blockchain 2022, 5, 814977. [Google Scholar] [CrossRef]
- Kushwaha, S.S.; Joshi, S.; Singh, D.; Kaur, M.; Lee, H.N. Systematic review of security vulnerabilities in ethereum blockchain smart contract. IEEE Access 2022, 10, 6605–6621. [Google Scholar] [CrossRef]
- Krichen, M.; Lahami, M.; Al-Haija, Q.A. Formal Methods for the Verification of Smart Contracts: A Review. In Proceedings of the 15th International Conference on Security of Information and Networks (SIN), Sousse, Tunisia, 11–13 November 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 01–08. [Google Scholar]
- Miller, A.; Cai, Z.; Jha, S. Smart contracts and opportunities for formal methods. In Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice: 8th International Symposium, ISoLA 2018, Limassol, Cyprus, 5–9 November 2018, Proceedings, Part IV 8; Springer International Publishing: Cham, Switzerland, 2018; pp. 280–299. [Google Scholar]
- Ahmed, S.J.; Taha, D.B. Machine Learning for Software Vulnerability Detection: A Survey. In Proceedings of the 8th International Conference on Contemporary Information Technology and Mathematics (ICCITM), Mosul, Iraq, 31 August–1 September 2022; pp. 66–72. [Google Scholar]
- Pan, Z.; Mishra, P. A survey on hardware vulnerability analysis using machine learning. IEEE Access 2022, 10, 49508–49527. [Google Scholar] [CrossRef]
- Zeng, P.; Lin, G.; Pan, L.; Tai, Y.; Zhang, J. Software vulnerability analysis and discovery using deep learning techniques: A survey. IEEE Access 2020, 8, 197158–197172. [Google Scholar] [CrossRef]
- Lin, G.; Wen, S.; Han, Q.L.; Zhang, J.; Xiang, Y. Software vulnerability detection using deep neural networks: A survey. Proc. IEEE 2020, 108, 1825–1848. [Google Scholar] [CrossRef]
- Luu, L.; Chu, D.-H.; Olickel, H.; Saxena, P.; Hobor, A. Making Smart Contracts Smarter. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, 24–28 October 2016; pp. 254–269. [Google Scholar]
- Tikhomirov, S.; Voskresenskaya, E.; Ivanitskiy, I.; Takhaviev, R.; Marchenko, E.; Alexandrov, Y. SmartCheck: Static Analysis of Ethereum Smart Contracts. In Proceedings of the 1st International Workshop on Emerging Trends in Software Engineering for Blockchain, Gothenburg, Sweden, 27 May 2018; pp. 9–16. [Google Scholar]
- Tsankov, P.; Dan, A.; Cohen, D.D.; Gervais, A.; Buenzli, F.; Vechev, M. Securify: Practical Security Analysis of Smart Contracts. arXiv 2018, arXiv:1806.01143. [Google Scholar]
- Brent, L.; Jurisevic, A.; Kong, M.; Liu, E.; Gauthier, F.; Gramoli, V.; Holz, R.; Scholz, B. Vandal: A Scalable Security Analysis Framework for Smart Contracts. arXiv 2018, arXiv:1809.03981. [Google Scholar]
- Kalra, S.; Goel, S.; Dhawan, M.; Sharma, S. ZEUS: Analyzing Safety of Smart Contracts. In Proceedings of the 2018 Network and Distributed System Security Symposium, San Diego, CA, USA, 18–21 February 2018. [Google Scholar]
- Jiang, B.; Liu, Y.; Chan, W.K. ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detection. In Proceedings of the 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE), Montpellier, France, 3–7 September 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 259–269. [Google Scholar] [CrossRef]
- Feist, J.; Grieco, G.; Groce, A. Slither: A Static Analysis Framework For Smart Contracts. In Proceedings of the 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB), Montreal, QC, Canada, 26 May 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 8–15. [Google Scholar] [CrossRef]
- Chang, J.; Gao, B.; Xiao, H.; Sun, J.; Cai, Y.; Yang, Z. sCompile: Critical Path Identification and Analysis for Smart Contracts. arXiv 2019, arXiv:1808.00624. [Google Scholar]
- Gao, Z.; Jayasundara, V.; Jiang, L.; Xia, X.; Lo, D.; Grundy, J. SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding. In Proceedings of the 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME), Cleveland, OH, USA, 29 September–4 October 2019; pp. 394–397. [Google Scholar]
- Huang, J.; Han, S.; You, W.; Shi, W.; Liang, B.; Wu, J.; Wu, Y. Hunting Vulnerable Smart Contracts via Graph Embedding Based Bytecode Matching. IEEE Trans. Inf. Forensics Secur. 2021, 16, 2144–2156. [Google Scholar] [CrossRef]
- Chen, J.; Xia, X.; Lo, D.; Grundy, J.; Luo, X.; Chen, T. DefectChecker: Automated Smart Contract Defect Detection by Analyzing EVM Bytecode. IEEE Trans. Softw. Eng. 2022, 48, 2189–2207. [Google Scholar] [CrossRef]
- Chen, T.; Li, Z.; Luo, X.; Wang, X.; Wang, T.; He, Z.; Fang, K.; Zhang, Y.; Zhu, H.; Li, H.; et al. SigRec: Automatic Recovery of Function Signatures in Smart Contracts. IEEE Trans. Softw. Eng. 2022, 48, 3066–3086. [Google Scholar] [CrossRef]
- Hu, T.; Li, B.; Pan, Z.; Qian, C. Detect Defects of Solidity Smart Contract Based on the Knowledge Graph. IEEE Trans. Reliab. 2023, 1–17. [Google Scholar] [CrossRef]
- McCulloch, W.S.; Pitts, W. A logical calculus of the ideas immanent in nervous activity. Bull. Math. Biophys. 1943, 5, 115–133. [Google Scholar] [CrossRef]
- Turing, A.M. Computing Machinery and Intelligence; Springer: Dordrecht, The Netherlands, 2009; pp. 23–65. [Google Scholar]
- Rosenblatt, F. The perceptron: A probabilistic model for information storage and organization in the brain. Psychol. Rev. 1958, 65, 386–408. [Google Scholar] [CrossRef]
- Hubel, D.H.; Wiesel, T.N. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. J. Physiol. 1962, 160, 106–154. [Google Scholar] [CrossRef] [PubMed]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef]
- Hinton, G.E.; Salakhutdinov, R.R. Reducing the Dimensionality of Data with Neural Networks. Science 2006, 313, 504–507. [Google Scholar] [CrossRef] [PubMed]
- Graves, A.; Graves, A. Long Short-Term Memory. In Supervised Sequence Labelling with Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; pp. 37–45. [Google Scholar]
- Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial networks. Commun. ACM 2020, 63, 139–144. [Google Scholar] [CrossRef]
- Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; Riedmiller, M. Playing atari with deep reinforcement learning. arXiv 2013, arXiv:1312.5602. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is All you Need. In Advances in Neural Information Processing Systems; Curran Associates, Inc.: Red Hook, NY, USA, 2017. [Google Scholar]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv 2019, arXiv:1810.04805v2. [Google Scholar]
- Kim, S.J.; Bae, S.J.; Jang, M.W. Linear Regression Machine Learning Algorithms for Estimating Reference Evapotranspiration Using Limited Climate Data. Sustainability 2022, 14, 11674. [Google Scholar] [CrossRef]
- Maulud, D.; Abdulazeez, A.M. A review on linear regression comprehensive in machine learning. J. Appl. Sci. Technol. Trends 2020, 1, 140–147. [Google Scholar] [CrossRef]
- Cox, D.R. The regression analysis of binary sequences. J. R. Stat. Soc. Ser. B Methodol. 1958, 20, 215–232. [Google Scholar] [CrossRef]
- Aniche, M.; Maziero, E.; Durelli, R.; Durelli, V.H. The effectiveness of supervised machine learning algorithms in predicting software refactoring. IEEE Trans. Softw. Eng. 2020, 48, 1432–1450. [Google Scholar] [CrossRef]
- Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Gigović, L.; Pourghasemi, H.R.; Drobnjak, S.; Bai, S. Testing a new ensemble model based on SVM and random forest in forest fire susceptibility assessment and its mapping in Serbia’s Tara National Park. Forests 2019, 10, 408. [Google Scholar] [CrossRef]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
- González, C.; Astudillo, C.A.; López-Cortés, X.A.; Maldonado, S. Semi-supervised learning for MALDI–TOF mass spectrometry data classification: An application in the salmon industry. Neural Comput. Appl. 2023, 35, 1–11. [Google Scholar] [CrossRef]
- Cover, T.; Hart, P. Nearest neighbor pattern classification. IEEE Trans. Inf. Theory 1967, 13, 21–27. [Google Scholar] [CrossRef]
- Gallego, A.J.; Rico-Juan, J.R.; Valero-Mas, J.J. Efficient k-nearest neighbor search based on clustering and adaptive k values. Pattern Recognit. 2022, 122, 108356. [Google Scholar] [CrossRef]
- LeCun, Y.; Boser, B.; Denker, J.S.; Henderson, D.; Howard, R.E.; Hubbard, W.; Jackel, L.D. Backpropagation applied to handwritten zip code recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef]
- Yudistira, N.; Kavitha, M.S.; Kurita, T. Weakly-Supervised Action Localization, and Action Recognition Using Global–Local Attention of 3D CNN. Int. J. Comput. Vis. 2022, 130, 2349–2363. [Google Scholar] [CrossRef]
- Wei, G.; Li, G.; Zhao, J.; He, A. Development of a LeNet-5 gas identification CNN structure for electronic noses. Sensors 2019, 19, 217. [Google Scholar] [CrossRef] [PubMed]
- Gori, M.; Monfardini, G.; Scarselli, F. A new model for learning in graph domains. In Proceedings of the 2005 IEEE International Joint Conference on Neural Networks, Montreal, QC, Canada, 31 July–4 August 2005; IEEE: Piscataway, NJ, USA, 2015; Volume 2, pp. 729–734. [Google Scholar]
- Ciano, G.; Rossi, A.; Bianchini, M.; Scarselli, F. On inductive–transductive learning with graph neural networks. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 44, 758–769. [Google Scholar] [CrossRef] [PubMed]
- Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
- Chen, T.; Zhang, X.; You, M.; Zheng, G.; Lambotharan, S. A GNN-based supervised learning framework for resource allocation in wireless IoT networks. IEEE Internet Things J. 2021, 9, 1712–1724. [Google Scholar] [CrossRef]
- Elman, J.L. Finding structure in time. Cogn. Sci. 1990, 14, 179–211. [Google Scholar] [CrossRef]
- Mikolov, T.; Karafiát, M.; Burget, L.; Cernocký, J.; Khudanpur, S. Recurrent neural network based language model. In Proceedings of the Interspeech, Makuhari, Japan, 12–16 September 2010; Volume 2, pp. 1045–1048. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Polat, H.; Türkoğlu, M.; Polat, O.; Şengür, A. A novel approach for accurate detection of the DDoS attacks in SDN-based SCADA systems based on deep recurrent neural networks. Expert Syst. Appl. 2022, 197, 116748. [Google Scholar] [CrossRef]
- Cho, K.; Van Merriënboer, B.; Bahdanau, D.; Bengio, Y. On the properties of neural machine translation: Encoder-decoder approaches. arXiv 2014, arXiv:1409.1259. [Google Scholar]
- Yarowsky, D. Unsupervised word sense disambiguation rivaling supervised methods. In Proceedings of the 33rd Annual Meeting of the Association for Computational Linguistics, Cambridge, MA, USA, 26–30 June 1995; pp. 189–196. [Google Scholar]
- Xu, H.; Li, L.; Guo, P. Semi-supervised active learning algorithm for SVMs based on QBC and tri-training. J. Ambient Intell. Humaniz. Comput. 2021, 12, 8809–8822. [Google Scholar] [CrossRef]
- Zhou, Z.H.; Li, M. Tri-training: Exploiting unlabeled data using three classifiers. IEEE Trans. Knowl. Data Eng. 2005, 17, 1529–1541. [Google Scholar] [CrossRef]
- Ning, X.; Wang, X.; Xu, S.; Cai, W.; Zhang, L.; Yu, L.; Li, W. A review of research on co-training. Concurr. Comput. Pract. Exp. 2021, e6276. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Yang, N.; Jo, J.; Jeon, M.; Kim, W.; Kang, J. Semantic and explainable research-related recommendation system based on semi-supervised methodology using BERT and LDA models. Expert Syst. Appl. 2022, 190, 116209. [Google Scholar] [CrossRef]
- Radford, A.; Narasimhan, K.; Salimans, T.; Sutskever, I. Improving Language Understanding by Generative Pre-Training. OpenAI Technical Report. 2018. Available online: https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf (accessed on 15 March 2023).
- Floridi, L.; Chiriatti, M. GPT-3: Its nature, scope, limits, and consequences. Minds Mach. 2020, 30, 681–694. [Google Scholar] [CrossRef]
- Katz, D.M.; Bommarito, M.J.; Gao, S.; Arredondo, P. GPT-4 Passes the Bar Exam. SSRN. 2023. Available online: https://ssrn.com/abstract=4389233 (accessed on 15 March 2023).
- MacQueen, J. Classification and analysis of multivariate observations. In Proceedings of the 5th Berkeley Symposium on Mathematical Statistics and Probability, Los Angeles, CA, USA, 21–23 June 1967; University of California: Berkeley, CA, USA, 1967; Volume 1, pp. 281–297. [Google Scholar]
- Punj, G.; Stewart, D.W. Cluster analysis in marketing research: Review and suggestions for application. J. Mark. Res. 1983, 20, 134–148. [Google Scholar] [CrossRef]
- Dolnicar, S. A review of unquestioned standards in using cluster analysis for data-driven market segmentation. J. Mark. Theory Pract. 2002, 10, 1–12. [Google Scholar]
- Von Luxburg, U. A tutorial on spectral clustering. Stat. Comput. 2007, 17, 395–416. [Google Scholar] [CrossRef]
- Ng, A.; Jordan, M.; Weiss, Y. On spectral clustering: Analysis and an algorithm. In Proceedings of the Advances in Neural Information Processing Systems, Vancouver BC, Canada, 3–8 December 2001; Volume 14, pp. 849–856. [Google Scholar]
- Ester, M.; Kriegel, H.P.; Sander, J.; Xu, X. A density-based algorithm for discovering clusters in large spatial databases with noise. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, KDD’96, Portland, OR, USA, 2–4 August 1996; Volume 96, pp. 226–231. [Google Scholar]
- Pearson, K. On lines and planes of closest fit to systems of points in space. Lond. Edinb. Dublin Philos. Mag. J. Sci. 1901, 2, 559–572. [Google Scholar] [CrossRef]
- Turk, M.; Pentland, A. Eigenfaces for recognition. J. Cogn. Neurosci. 1991, 3, 71–86. [Google Scholar] [CrossRef]
- Jaynes, E.T. Information theory and statistical mechanics. Phys. Rev. 1957, 106, 620. [Google Scholar] [CrossRef]
- Toutanova, K.; Klein, D.; Manning, C.D.; Singer, Y. Feature-rich part-of-speech tagging with a cyclic dependency network. In Proceedings of the 2003 Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics, Edmonton, AB, Canada, 27 April–1 May 2003; pp. 252–259. [Google Scholar]
- Masci, J.; Meier, U.; Cireşan, D.; Schmidhuber, J. Stacked convolutional auto-encoders for hierarchical feature extraction. In Proceedings of the 21st International Conference on Artificial Neural Networks (ICANN 2011), Espoo, Finland, 14–17 June 2011; Part I 21. Springer: Berlin/Heidelberg, Germany, 2011; pp. 52–59. [Google Scholar]
- Karras, T.; Aila, T.; Laine, S.; Lehtinen, J. Progressive Growing of GANs for Improved Quality, Stability, and Variation. arXiv 2017, arXiv:1710.10196. [Google Scholar]
- Watkins, C.J.C.H. Learning from Delayed Rewards. Ph.D. Thesis, University of Cambridge, Cambridge, UK, 2017. [Google Scholar]
- Clifton, J.; Laber, E. Q-learning: Theory and applications. Annu. Rev. Stat. Its Appl. 2020, 7, 279–301. [Google Scholar] [CrossRef]
- Cao, Y.; Ji, R.; Ji, L.; Lei, G.; Wang, H.; Shao, X. l2-MPTCP: A Learning-Driven Latency-Aware Multipath Transport Scheme for Industrial Internet Applications. IEEE Trans. Ind. Inform. 2022, 18, 8456–8466. [Google Scholar] [CrossRef]
- Williams, R.J. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Reinforcement Learning; Springer: Boston, MA, USA, 1992; pp. 5–32. [Google Scholar]
- Naeem, M.; Rizvi, S.T.H.; Coronato, A. A gentle introduction to reinforcement learning and its application in different fields. IEEE Access 2020, 8, 209320–209344. [Google Scholar] [CrossRef]
- Coulom, R. Efficient selectivity and backup operators in Monte-Carlo tree search. In Proceedings of the Computers and Games: 5th International Conference, CG 2006, Turin, Italy, 29–31 May 2006; Springer: Berlin/Heidelberg, Germany, 2006; pp. 72–83. [Google Scholar]
- Silver, D.; Huang, A.; Maddison, C.J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; et al. Mastering the game of Go with deep neural networks and tree search. Nature 2016, 529, 484–489. [Google Scholar] [CrossRef]
- Ho, J.; Ermon, S. Generative adversarial imitation learning. In Proceedings of the Annual Conference on Neural Information Processing Systems 2016, Barcelona, Spain, 5–10 December 2016. [Google Scholar]
- Gao, Z.; Jiang, L.; Xia, X.; Lo, D.; Grundy, J. Checking Smart Contracts With Structural Code Embedding. IEEE Trans. Softw. Eng. 2021, 47, 2874–2891. [Google Scholar] [CrossRef]
- Hao, X.; Ren, W.; Zheng, W.; Zhu, T. SCScan: A SVM-Based Scanning System for Vulnerabilities in Blockchain Smart Contracts. In Proceedings of the IEEE 19th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), Guangzhou, China, 29 December–1 January 2020; pp. 1598–1605. [Google Scholar]
- Lou, Y.; Zhang, Y.; Chen, S. Ponzi Contracts Detection Based on Improved Convolutional Neural Network. In Proceedings of the IEEE International Conference on Services Computing (SCC), Beijing, China, 7–11 November 2020; pp. 353–360. [Google Scholar]
- Qian, P.; Liu, Z.; He, Q.; Zimmermann, R.; Wang, X. Towards Automated Reentrancy Detection for Smart Contracts Based on Sequential Models. IEEE Access 2020, 8, 19685–19695. [Google Scholar] [CrossRef]
- Hara, K.; Takahashi, T.; Ishimaki, M.; Omote, K. Machine-learning Approach using Solidity Bytecode for Smart-contract Honeypot Detection in the Ethereum. In Proceedings of the IEEE 21st International Conference on Software Quality, Reliability and Security Companion (QRS-C), Hainan, China, 6–10 December 2021; pp. 652–659. [Google Scholar]
- Mi, F.; Wang, Z.; Zhao, C.; Guo, J.; Ahmed, F.; Khan, L. VSCL: Automating Vulnerability Detection in Smart Contracts with Deep Learning. In Proceedings of the IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Sydney, Australia, 3–6 May 2021; pp. 1–9. [Google Scholar]
- Wang, B.; Chu, H.; Zhang, P.; Dong, H. Smart Contract Vulnerability Detection Using Code Representation Fusion. In Proceedings of the 28th Asia-Pacific Software Engineering Conference (APSEC), Taipei, Taiwan, 6–9 December 2021; pp. 564–565. [Google Scholar]
- Yu, X.; Zhao, H.; Hou, B.; Ying, Z.; Wu, B. DeeSCVHunter: A Deep Learning-Based Framework for Smart Contract Vulnerability Detection. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), Shenzhen, China, 18–22 July 2021; pp. 1–8. [Google Scholar]
- Zhang, Y.; Kang, S.; Dai, W.; Chen, S.; Zhu, J. Code Will Speak: Early detection of Ponzi Smart Contracts on Ethereum. In Proceedings of the 2021 IEEE International Conference on Services Computing (SCC), Chicago, IL, USA, 5–10 September 2021; pp. 301–308. [Google Scholar]
- Andrijasa, M.F.; Ismail, S.A.; Ahmad, N. Towards Automatic Exploit Generation for Identifying Re-Entrancy Attacks on Cross-Contract. In Proceedings of the IEEE Symposium on Future Telecommunication Technologies (SOFTT), Johor Baharu, Malaysia, 14–16 November 2022; pp. 15–20. [Google Scholar]
- Ashizawa, N.; Yanai, N.; Cruz, J.P.; Okamura, S. Eth2Vec: Learning contract-wide code representations for vulnerability detection on Ethereum smart contracts. Blockchain Res. Appl. 2022, 3, 100101. [Google Scholar] [CrossRef]
- Gupta, R.; Patel, M.M.; Shukla, A.; Tanwar, S. Deep learning-based malicious smart contract detection scheme for internet of things environment. Comput. Electr. Eng. 2022, 97, 107583. [Google Scholar] [CrossRef]
- Hu, H.; Bai, Q.; Xu, Y. Scsguard: Deep scam detection for ethereum smart contracts. In Proceedings of the IEEE INFOCOM 2022-IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), New York, NY, USA, 2–5 May 2022; pp. 1–6. [Google Scholar]
- Hwang, S.-J.; Choi, S.-H.; Shin, J.; Choi, Y.-H. CodeNet: Code-Targeted Convolutional Neural Network Architecture for Smart Contract Vulnerability Detection. IEEE Access 2022, 10, 32595–32607. [Google Scholar] [CrossRef]
- Li, N.; Liu, Y.; Li, L.; Wang, Y. Smart Contract Vulnerability Detection Based on Deep and Cross Network. In Proceedings of the 2022 3rd International Conference on Computer Vision, Image and Deep Learning & International Conference on Computer Engineering and Applications (CVIDL & ICCEA), Changchun, China, 20–22 May 2022; pp. 533–536. [Google Scholar]
- Liu, L.; Tsai, W.-T.; Bhuiyan, M.Z.A.; Peng, H.; Liu, M. Blockchain-enabled fraud discovery through abnormal smart contract detection on Ethereum. Future Gener. Comput. Syst. 2022, 128, 158–166. [Google Scholar] [CrossRef]
- Nguyen, H.H.; Nguyen, N.M.; Xie, C.; Ahmadi, Z.; Kudendo, D.; Doan, T.N.; Jiang, L. MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities. In Proceedings of the IEEE 9th International Conference on Data Science and Advanced Analytics (DSAA), Online, 13–16 October 2022; pp. 1–10. [Google Scholar]
- Shakya, S.; Mukherjee, A.; Halder, R.; Maiti, A. Chaturvedi, SmartMixModel: Machine Learning-based Vulnerability Detection of Solidity Smart Contracts. In Proceedings of the 2022 IEEE International Conference on Blockchain (Blockchain), Espoo, Finland, 22–25 August 2022; pp. 37–44. [Google Scholar]
- Wang, Z.; Zheng, Q.; Sun, Y. GVD-net: Graph embedding-based Machine Learning Model for Smart Contract Vulnerability Detection. In Proceedings of the International Conference on Algorithms, Data Mining, and Information Technology (ADMIT), Xi’an, China, 23–25 September 2022; pp. 99–103. [Google Scholar]
- Wu, Z.; Li, S.; Wang, B.; Liu, T.; Zhu, Y.; Zhu, C.; Hu, M. Detecting Vulnerabilities in Ethereum Smart Contracts with Deep Learning. In Proceedings of the 4th International Conference on Data Intelligence and Security (ICDIS), Shenzhen, China, 24–26 August 2022; pp. 55–60. [Google Scholar]
- Xu, G.; Liu, L.; Zhou, Z. Reentrancy Vulnerability Detection of Smart Contract Based on Bidirectional Sequential Neural Network with Hierarchical Attention Mechanism. In Proceedings of the 2022 International Conference on Blockchain Technology and Information Security (ICBCTIS), Huaihua, China, 15–17 July 2022; pp. 56–59. [Google Scholar]
- Zhang, L.; Wang, J.; Wang, W.; Jin, Z.; Su, Y.; Chen, H. Smart contract vulnerability detection combined with multi-objective detection. Comput. Netw. 2022, 217, 109289. [Google Scholar] [CrossRef]
- Zheng, Z.; Chen, W.; Zhong, Z.; Chen, Z.; Lu, Y. Securing the ethereum from smart ponzi schemes: Identification using static features. ACM Trans. Softw. Eng. Methodol. 2022. [Google Scholar] [CrossRef]
- Zhou, Q.; Zheng, K.; Zhang, K.; Hou, L.; Wang, X. Vulnerability Analysis of Smart Contract for Blockchain-Based IoT Applications: A Machine Learning Approach. IEEE Internet Things J. 2022, 9, 24695–24707. [Google Scholar] [CrossRef]
- Cai, J.; Li, B.; Zhang, J.; Sun, X.; Chen, B. Combine sliced joint graph with graph neural networks for smart contract vulnerability detection. J. Syst. Softw. 2023, 195, 111550. [Google Scholar] [CrossRef]
- Jiang, F.; Cao, Y.; Xiao, J.; Yi, H.; Lei, G.; Liu, M.; Deng, S.; Wang, H. VDDL: A deep learning-based vulnerability detection model for smart contracts. In Proceedings of the International Conference on Machine Learning for Cyber Security, Nadi, Fiji, 2–4 December 2023; pp. 72–86. [Google Scholar]
- Jie, W.; Chen, Q.; Wang, J.; Koe, A.S.V.; Li, J.; Huang, P.; Wu, Y.; Wang, Y. A Novel Extended Multimodal AI Framework towards Vulnerability Detection in Smart Contracts. Inf. Sci. 2023, 636, 118907. [Google Scholar] [CrossRef]
- Liu, Z.; Qian, P.; Wang, X.; Zhuang, Y.; Qiu, L.; Wang, X. Combining Graph Neural Networks With Expert Knowledge for Smart Contract Vulnerability Detection. IEEE Trans. Knowl. Data Eng. 2023, 35, 1296–1310. [Google Scholar] [CrossRef]
- Su, J.; Dai, H.-N.; Zhao, L.; Zheng, Z.; Luo, X. Effectively generating vulnerable transaction sequences in smart contracts with reinforcement learning-guided fuzzing. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, Rochester, MI, USA, 10–14 October 2023. [Google Scholar]
- Sun, X.; Tu, L.; Zhang, J.; Cai, J.; Li, B.; Wang, Y. ASSBert: Active and semi-supervised bert for smart contract vulnerability detection. J. Inf. Secur. Appl. 2023, 73, 103423. [Google Scholar] [CrossRef]
- Zhang, Z.; Lei, Y.; Yan, M.; Yu, Y.; Chen, J.; Wang, S.; Mao, X. Reentrancy vulnerability detection and localization: A deep learning based two-phase approach. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, Rochester, MI, USA, 10–14 October 2023. [Google Scholar]
Machine-Learning Method | Advantages | Disadvantages |
---|---|---|
Supervised Learning | High predictive accuracyWide applicability | Requires large labeled dataset |
Semi-supervised Learning | High data utilizationReduced labeling cost | Algorithm complexityDependence on assumptions |
Unsupervised Learning | No need for labeled data Discovering latent structures | Limited predictive Challenging evaluation |
Reinforcement Learning | Decision-making ability Adaptive learning | Computational complexity Slow convergence |
Model | Method | Dataset Size | Classification | Year |
---|---|---|---|---|
Gao et al. [38] | Code Embedding | 22,275 | Supervised Learning | 2019 |
Hao et al. [106] | SVM | Not provided | Supervised Learning | 2020 |
Lou et al. [107] | CNN | 3774 | Supervised Learning | 2020 |
Qian et al. [108] | Bi-LSTM | 2000 | Supervised Learning | 2020 |
Hara et al. [109] | Machine Learning | 151,935 | Supervised Learning | 2021 |
Mi et al. [110] | DNN | 40 | Supervised Learning | 2021 |
Wang et al. [111] | Deep Learning | More than 2000 | Supervised Learning | 2021 |
Yu et al. [112] | Deep Learning | More than 50,932 | Supervised Learning | 2021 |
Zhang et al. [113] | CatBoost and Random Forrest | 3774 | Supervised Learning | 2021 |
Andrijasa et al. [114] | Deep Reinforcement Learning | Not provided | Reinforcement Learning | 2022 |
Ashizawa et al. [115] | Machine Learning | 95,152 | Supervised Learning | 2022 |
Gupta et al. [116] | LSTM, ANN and GRU | 7000 | Supervised Learning | 2022 |
Hu et al. [117] | GRU AND Attention | More than 1000 | Supervised Learning | 2022 |
Hwang et al. [118] | Machine Learning | 47,518 | Supervised Learning | 2022 |
Li et al. [119] | Deep Learning | 3000 | Supervised Learning | 2022 |
Liu et al. [120] | HGTNs | 1382 | Supervised Learning | 2022 |
Nguyen et al. [121] | Machine Learning | 47,891 | Supervised Learning | 2022 |
Shakya et al. [122] | Machine Learning | 70,000 | Supervised Learning | 2022 |
Wang et al. [123] | Graph Embedding and Machine Learning | Not provided | Supervised Learning | 2022 |
Wu et al. [124] | Deep Learning | 11,881 | Supervised Learning | 2022 |
Xu et al. [125] | Bi-LSTM | 36,232 | Supervised Learning | 2022 |
Zhang et al. [126] | CNN | Not provided | Supervised Learning | 2022 |
Zheng et al. [127] | Machine Learning | 10,349 | Supervised Learning | 2022 |
Zhou et al. [128] | Machine Learning and AST | 20,567 | Supervised Learning | 2022 |
Cai et al. [129] | GNN | More than 9369 | Supervised Learning | 2023 |
Jiang et al. [130] | BERT | 47,038 | Semi-Supervised Learning | 2023 |
Jie et al. [131] | Machine Learning | Not provided | Supervised Learning | 2023 |
Liu et al. [132] | GNN and Expert Knowledge | 40,932 | Supervised Learning | 2023 |
Su et al. [133] | Reinforcement Learning and Fuzzing | Not provided | Reinforcement Learning | 2023 |
Sun et al. [134] | BERT | 20,829 | Semi-Supervised Learning | 2023 |
Zhang et al. [135] | Deep Learning | 47,398 | Supervised Learning | 2023 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jiang, F.; Chao, K.; Xiao, J.; Liu, Q.; Gu, K.; Wu, J.; Cao, Y. Enhancing Smart-Contract Security through Machine Learning: A Survey of Approaches and Techniques. Electronics 2023, 12, 2046. https://doi.org/10.3390/electronics12092046
Jiang F, Chao K, Xiao J, Liu Q, Gu K, Wu J, Cao Y. Enhancing Smart-Contract Security through Machine Learning: A Survey of Approaches and Techniques. Electronics. 2023; 12(9):2046. https://doi.org/10.3390/electronics12092046
Chicago/Turabian StyleJiang, Fan, Kailin Chao, Jianmao Xiao, Qinghua Liu, Keyang Gu, Junyi Wu, and Yuanlong Cao. 2023. "Enhancing Smart-Contract Security through Machine Learning: A Survey of Approaches and Techniques" Electronics 12, no. 9: 2046. https://doi.org/10.3390/electronics12092046
APA StyleJiang, F., Chao, K., Xiao, J., Liu, Q., Gu, K., Wu, J., & Cao, Y. (2023). Enhancing Smart-Contract Security through Machine Learning: A Survey of Approaches and Techniques. Electronics, 12(9), 2046. https://doi.org/10.3390/electronics12092046