Cargando…

Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer

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 extr...

Descripción completa

Detalles Bibliográficos
Autores principales: Chen, Yizhou, Dai, Heng, Yu, Xiao, Hu, Wenhua, Xie, Zhiwen, Tan, Cheng
Formato: Online Artículo Texto
Lenguaje:English
Publicado: MDPI 2021
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8512493/
https://www.ncbi.nlm.nih.gov/pubmed/34640737
http://dx.doi.org/10.3390/s21196417
_version_ 1784583004376530944
author Chen, Yizhou
Dai, Heng
Yu, Xiao
Hu, Wenhua
Xie, Zhiwen
Tan, Cheng
author_facet Chen, Yizhou
Dai, Heng
Yu, Xiao
Hu, Wenhua
Xie, Zhiwen
Tan, Cheng
author_sort Chen, Yizhou
collection PubMed
description 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.
format Online
Article
Text
id pubmed-8512493
institution National Center for Biotechnology Information
language English
publishDate 2021
publisher MDPI
record_format MEDLINE/PubMed
spelling pubmed-85124932021-10-14 Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer Chen, Yizhou Dai, Heng Yu, Xiao Hu, Wenhua Xie, Zhiwen Tan, Cheng Sensors (Basel) Article 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. MDPI 2021-09-26 /pmc/articles/PMC8512493/ /pubmed/34640737 http://dx.doi.org/10.3390/s21196417 Text en © 2021 by the authors. https://creativecommons.org/licenses/by/4.0/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/).
spellingShingle Article
Chen, Yizhou
Dai, Heng
Yu, Xiao
Hu, Wenhua
Xie, Zhiwen
Tan, Cheng
Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title_full Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title_fullStr Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title_full_unstemmed Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title_short Improving Ponzi Scheme Contract Detection Using Multi-Channel TextCNN and Transformer
title_sort improving ponzi scheme contract detection using multi-channel textcnn and transformer
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8512493/
https://www.ncbi.nlm.nih.gov/pubmed/34640737
http://dx.doi.org/10.3390/s21196417
work_keys_str_mv AT chenyizhou improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer
AT daiheng improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer
AT yuxiao improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer
AT huwenhua improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer
AT xiezhiwen improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer
AT tancheng improvingponzischemecontractdetectionusingmultichanneltextcnnandtransformer