Bytecode-based approach for Ethereum smart contract classification

In recent years, blockchain technology has been widely used and concerned in many fields, including finance, medical care and government affairs.However, due to the immutability of smart contracts and the particularity of the operating environment, various security issues occur frequently.On the one...

Full description

Saved in:
Bibliographic Details
Main Authors: Dan LIN, Kaixin LIN, Jiajing WU, Zibin ZHENG
Format: Article
Language:English
Published: POSTS&TELECOM PRESS Co., LTD 2022-10-01
Series:网络与信息安全学报
Subjects:
Online Access:http://www.cjnis.com.cn/thesisDetails#10.11959/j.issn.2096-109x.2022046
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1841529679095267328
author Dan LIN
Kaixin LIN
Jiajing WU
Zibin ZHENG
author_facet Dan LIN
Kaixin LIN
Jiajing WU
Zibin ZHENG
author_sort Dan LIN
collection DOAJ
description In recent years, blockchain technology has been widely used and concerned in many fields, including finance, medical care and government affairs.However, due to the immutability of smart contracts and the particularity of the operating environment, various security issues occur frequently.On the one hand, the code security problems of contract developers when writing contracts, on the other hand, there are many high-risk smart contracts in Ethereum, and ordinary users are easily attracted by the high returns provided by high-risk contracts, but they have no way to know the risks of the contracts.However, the research on smart contract security mainly focuses on code security, and there is relatively little research on the identification of contract functions.If the smart contract function can be accurately classified, it will help people better understand the behavior of smart contracts, while ensuring the ecological security of smart contracts and reducing or recovering user losses.Existing smart contract classification methods often rely on the analysis of the source code of smart contracts, but contracts released on Ethereum only mandate the deployment of bytecode, and only a very small number of contracts publish their source code.Therefore, an Ethereum smart contract classification method based on bytecode was proposed.Collect the Ethereum smart contract bytecode and the corresponding category label, and then extract the opcode frequency characteristics and control flow graph characteristics.The characteristic importance is analyzed experimentally to obtain the appropriate graph vector dimension and optimal classification model, and finally the multi-classification task of smart contract in five categories of exchange, finance, gambling, game and high risk is experimentally verified, and the F1 score of the XGBoost classifier reaches 0.913 8.Experimental results show that the algorithm can better complete the classification task of Ethereum smart contracts, and can be applied to the prediction of smart contract categories in reality.
format Article
id doaj-art-1cace43b42574bf295ab69b23899247e
institution Kabale University
issn 2096-109X
language English
publishDate 2022-10-01
publisher POSTS&TELECOM PRESS Co., LTD
record_format Article
series 网络与信息安全学报
spelling doaj-art-1cace43b42574bf295ab69b23899247e2025-01-15T03:16:12ZengPOSTS&TELECOM PRESS Co., LTD网络与信息安全学报2096-109X2022-10-01811112059575346Bytecode-based approach for Ethereum smart contract classificationDan LINKaixin LINJiajing WUZibin ZHENGIn recent years, blockchain technology has been widely used and concerned in many fields, including finance, medical care and government affairs.However, due to the immutability of smart contracts and the particularity of the operating environment, various security issues occur frequently.On the one hand, the code security problems of contract developers when writing contracts, on the other hand, there are many high-risk smart contracts in Ethereum, and ordinary users are easily attracted by the high returns provided by high-risk contracts, but they have no way to know the risks of the contracts.However, the research on smart contract security mainly focuses on code security, and there is relatively little research on the identification of contract functions.If the smart contract function can be accurately classified, it will help people better understand the behavior of smart contracts, while ensuring the ecological security of smart contracts and reducing or recovering user losses.Existing smart contract classification methods often rely on the analysis of the source code of smart contracts, but contracts released on Ethereum only mandate the deployment of bytecode, and only a very small number of contracts publish their source code.Therefore, an Ethereum smart contract classification method based on bytecode was proposed.Collect the Ethereum smart contract bytecode and the corresponding category label, and then extract the opcode frequency characteristics and control flow graph characteristics.The characteristic importance is analyzed experimentally to obtain the appropriate graph vector dimension and optimal classification model, and finally the multi-classification task of smart contract in five categories of exchange, finance, gambling, game and high risk is experimentally verified, and the F1 score of the XGBoost classifier reaches 0.913 8.Experimental results show that the algorithm can better complete the classification task of Ethereum smart contracts, and can be applied to the prediction of smart contract categories in reality.http://www.cjnis.com.cn/thesisDetails#10.11959/j.issn.2096-109x.2022046blockchainsmart contractbytecodeclassification
spellingShingle Dan LIN
Kaixin LIN
Jiajing WU
Zibin ZHENG
Bytecode-based approach for Ethereum smart contract classification
网络与信息安全学报
blockchain
smart contract
bytecode
classification
title Bytecode-based approach for Ethereum smart contract classification
title_full Bytecode-based approach for Ethereum smart contract classification
title_fullStr Bytecode-based approach for Ethereum smart contract classification
title_full_unstemmed Bytecode-based approach for Ethereum smart contract classification
title_short Bytecode-based approach for Ethereum smart contract classification
title_sort bytecode based approach for ethereum smart contract classification
topic blockchain
smart contract
bytecode
classification
url http://www.cjnis.com.cn/thesisDetails#10.11959/j.issn.2096-109x.2022046
work_keys_str_mv AT danlin bytecodebasedapproachforethereumsmartcontractclassification
AT kaixinlin bytecodebasedapproachforethereumsmartcontractclassification
AT jiajingwu bytecodebasedapproachforethereumsmartcontractclassification
AT zibinzheng bytecodebasedapproachforethereumsmartcontractclassification