Honeypot contract detection method for Ethereum based on source code structure and graph attention network
To address the problems of low accuracy and poor generalization of current honeypot contract detection methods, a honeypot contract detection method for Ethereum based on source code structure and graph attention network was proposed.Firstly, in order to extract the structural information of the Sol...
Saved in:
Main Authors: | , , |
---|---|
Format: | Article |
Language: | zho |
Published: |
Editorial Department of Journal on Communications
2023-09-01
|
Series: | Tongxin xuebao |
Subjects: | |
Online Access: | http://www.joconline.com.cn/zh/article/doi/10.11959/j.issn.1000-436x.2023178/ |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
_version_ | 1841539212572098560 |
---|---|
author | Youwei WANG Yudong HOU Lizhou FENG |
author_facet | Youwei WANG Yudong HOU Lizhou FENG |
author_sort | Youwei WANG |
collection | DOAJ |
description | To address the problems of low accuracy and poor generalization of current honeypot contract detection methods, a honeypot contract detection method for Ethereum based on source code structure and graph attention network was proposed.Firstly, in order to extract the structural information of the Solidity source code of the smart contract, the source code was parsed and converted into an XML parsing tree.Then, a set of feature words that could express the structural and content characteristics of the contract was selected, and the contract source code structure graph was constructed.Finally, in order to avoid the impact of dataset imbalance, the concepts of teacher model and student model were introduced based on the ensemble learning theory.Moreover, the graph attention network model was trained from the global and local perspectives, respectively, and the outputs of all models were fused to obtain the final contract detection result.The experiments demonstrate that CSGDetector has higher honeypot detection capability than the existing method KOLSTM, with increments of 1.27% and 7.21% on F<sub>1</sub> measurement in two-class classification and multi-class classification experiments, respectively.When comparing with the existing method XGB, the average recall rate of CSGDetector in the masked honeypot detection experiments for different types of honeypot contracts is improved by 7.57%, which verifies the effectiveness of the method in improving the generalization performance of the algorithm. |
format | Article |
id | doaj-art-8a60212326c24395b719a0dda49324e2 |
institution | Kabale University |
issn | 1000-436X |
language | zho |
publishDate | 2023-09-01 |
publisher | Editorial Department of Journal on Communications |
record_format | Article |
series | Tongxin xuebao |
spelling | doaj-art-8a60212326c24395b719a0dda49324e22025-01-14T07:23:34ZzhoEditorial Department of Journal on CommunicationsTongxin xuebao1000-436X2023-09-014416117259836089Honeypot contract detection method for Ethereum based on source code structure and graph attention networkYouwei WANGYudong HOULizhou FENGTo address the problems of low accuracy and poor generalization of current honeypot contract detection methods, a honeypot contract detection method for Ethereum based on source code structure and graph attention network was proposed.Firstly, in order to extract the structural information of the Solidity source code of the smart contract, the source code was parsed and converted into an XML parsing tree.Then, a set of feature words that could express the structural and content characteristics of the contract was selected, and the contract source code structure graph was constructed.Finally, in order to avoid the impact of dataset imbalance, the concepts of teacher model and student model were introduced based on the ensemble learning theory.Moreover, the graph attention network model was trained from the global and local perspectives, respectively, and the outputs of all models were fused to obtain the final contract detection result.The experiments demonstrate that CSGDetector has higher honeypot detection capability than the existing method KOLSTM, with increments of 1.27% and 7.21% on F<sub>1</sub> measurement in two-class classification and multi-class classification experiments, respectively.When comparing with the existing method XGB, the average recall rate of CSGDetector in the masked honeypot detection experiments for different types of honeypot contracts is improved by 7.57%, which verifies the effectiveness of the method in improving the generalization performance of the algorithm.http://www.joconline.com.cn/zh/article/doi/10.11959/j.issn.1000-436x.2023178/Ethereumhoneypot contractsource code structuregraph attention networkensemble learning |
spellingShingle | Youwei WANG Yudong HOU Lizhou FENG Honeypot contract detection method for Ethereum based on source code structure and graph attention network Tongxin xuebao Ethereum honeypot contract source code structure graph attention network ensemble learning |
title | Honeypot contract detection method for Ethereum based on source code structure and graph attention network |
title_full | Honeypot contract detection method for Ethereum based on source code structure and graph attention network |
title_fullStr | Honeypot contract detection method for Ethereum based on source code structure and graph attention network |
title_full_unstemmed | Honeypot contract detection method for Ethereum based on source code structure and graph attention network |
title_short | Honeypot contract detection method for Ethereum based on source code structure and graph attention network |
title_sort | honeypot contract detection method for ethereum based on source code structure and graph attention network |
topic | Ethereum honeypot contract source code structure graph attention network ensemble learning |
url | http://www.joconline.com.cn/zh/article/doi/10.11959/j.issn.1000-436x.2023178/ |
work_keys_str_mv | AT youweiwang honeypotcontractdetectionmethodforethereumbasedonsourcecodestructureandgraphattentionnetwork AT yudonghou honeypotcontractdetectionmethodforethereumbasedonsourcecodestructureandgraphattentionnetwork AT lizhoufeng honeypotcontractdetectionmethodforethereumbasedonsourcecodestructureandgraphattentionnetwork |