Malicious Contract Detection for Blockchain Network Using Lightweight Deep Learning Implemented through Explainable AI

Yeajun Kang,Wonwoong Kim,Hyunji Kim,Minwoo Lee,Minho Song,Hwajeong Seo
DOI: https://doi.org/10.3390/electronics12183893
IF: 2.9
2023-09-16
Electronics
Abstract:A smart contract is a digital contract on a blockchain. Through smart contracts, transactions between parties are possible without a third party on the blockchain network. However, there are malicious contracts, such as greedy contracts, which can cause enormous damage to users and blockchain networks. Therefore, countermeasures against this problem are required. In this work, we propose a greedy contract detection system based on deep learning. The detection model is trained through the frequency of opcodes in the smart contract. Additionally, we implement Gredeeptector, a lightweight model for deployment on the IoT. We identify important instructions for detection through explainable artificial intelligence (XAI). After that, we train the Greedeeptector through only important instructions. Therefore, Greedeeptector is a computationally and memory-efficient detection model for the IoT. Through our approach, we achieve a high detection accuracy of 92.3%. In addition, the file size of the lightweight model is reduced by 41.5% compared to the base model and there is little loss of accuracy.
engineering, electrical & electronic,computer science, information systems,physics, applied
What problem does this paper attempt to address?