Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
Open Access
- 26 September 2021
- Vol. 21 (19), 6417
- https://doi.org/10.3390/s21196417
Abstract
With the development of blockchain technologies, many Ponzi schemes disguise themselves under the veil of smart contracts. The Ponzi scheme contracts cause serious financial losses, which has a bad effect on the blockchain. Existing Ponzi scheme contract detection studies have mainly focused on extracting hand-crafted features and training a machine learning classifier to detect Ponzi scheme contracts. However, the hand-crafted features cannot capture the structural and semantic feature of the source code. Therefore, in this study, we propose a Ponzi scheme contract detection method called MTCformer (Multi-channel Text Convolutional Neural Networks and Transofrmer). In order to reserve the structural information of the source code, the MTCformer first converts the Abstract Syntax Tree (AST) of the smart contract code to the specially formatted code token sequence via the Structure-Based Traversal (SBT) method. Then, the MTCformer uses multi-channel TextCNN (Text Convolutional Neural Networks) to learn local structural and semantic features from the code token sequence. Next, the MTCformer employs the Transformer to capture the long-range dependencies of code tokens. Finally, a fully connected neural network with a cost-sensitive loss function in the MTCformer is used for classification. The experimental results show that the MTCformer is superior to the state-of-the-art methods and its variants in Ponzi scheme contract detection.Keywords
This publication has 41 references indexed in Scilit:
- Addressing Unseen Word Problem in Text ClassificationLecture Notes in Computer Science, 2018
- Detecting Ponzi Schemes on EthereumPublished by Association for Computing Machinery (ACM) ,2018
- Improving sentiment analysis via sentence type classification using BiLSTM-CRF and CNNExpert Systems with Applications, 2017
- A Survey of Attacks on Ethereum Smart Contracts (SoK)Published by Springer Science and Business Media LLC ,2017
- Contract law 2.0: ‘Smart’ contracts as the beginning of the end of classic contract lawInformation & Communications Technology Law, 2017
- The IoT electric business model: Using blockchain technology for the internet of thingsPeer-to-Peer Networking and Applications, 2016
- Learning semantic representations using convolutional neural networks for web searchPublished by Association for Computing Machinery (ACM) ,2014
- The application of data mining techniques in financial fraud detection: A classification framework and an academic review of literatureDecision Support Systems, 2011
- Long Short-Term MemoryNeural Computation, 1997
- ANTLR: A predicated‐LL(k) parser generatorSoftware: Practice and Experience, 1995