A Mutimodal Smart Contract Classification Method Based on Hybrid Convolutional Neural Networks
摘要
The rapid development of blockchain technology has led to the widespread use of smart contracts for the development of blockchain applications. The vast number of smart contracts presents a considerable challenge for users attempting to locate a specific contract, as the manual process of searching becomes increasingly time-consuming and difficult. To enhance the retrieval of smart contracts, it is imperative to categorize them into distinct groups, thereby facilitating their expedient identification and retrieval. A number of studies have proposed methods for the automated classification of smart contracts, exploiting either the source code, bytecode, or application binary interfaces (ABIs). However, none of the aforementioned studies employ multimodal data. Given that the source code of smart contracts is typically not accessible to the public, we consider both the ABI and bytecode of these contracts and propose a novel classification method for smart contracts based on Hybrid Convolutional Neural Networks, which we have named HCNN-SCC. Specifically, the method employs a convolutional network with an attention module to extract information from the ABI-term matrix, which is derived from the ABI descriptions of smart contracts. Furthermore, a graph convolutional network is employed to extract information from the control flow graphs derived from the bytecode of smart contracts. Finally, the acquired information is aggregated to predict the category of a new smart contract. An experimental study on 3,815 real-world Ethereum smart contracts demonstrates that our proposed method outperforms other baseline techniques.