Applying blockchain-based method to smart contract classification for CPS applications
Smart contract has been the core of blockchain systems and other blockchain-based systems since Blockchain 2.0. Various operations on blockchain are performed through the invocation and execution of smart contracts. This leads to extensive combinations between blockchain, smart contract, Internet of...
Main Authors: | , , , |
---|---|
Format: | Article |
Language: | English |
Published: |
KeAi Communications Co., Ltd.
2022-12-01
|
Series: | Digital Communications and Networks |
Subjects: | |
Online Access: | http://www.sciencedirect.com/science/article/pii/S2352864822001742 |
_version_ | 1797950637300776960 |
---|---|
author | Zigui Jiang Kai Chen Hailin Wen Zibin Zheng |
author_facet | Zigui Jiang Kai Chen Hailin Wen Zibin Zheng |
author_sort | Zigui Jiang |
collection | DOAJ |
description | Smart contract has been the core of blockchain systems and other blockchain-based systems since Blockchain 2.0. Various operations on blockchain are performed through the invocation and execution of smart contracts. This leads to extensive combinations between blockchain, smart contract, Internet of Things (IoT) and Cyber-Physical System (CPS) applications, and then many blockchain-based IoT or CPS applications emerge to provide multiple benefits to the economy and society. In this case, obtaining a better understanding of smart contracts will contribute to the easier operation, higher efficiency and stronger security of those blockchain-based systems and applications. Many existing studies on smart contract analysis are based on similarity calculation and smart contract classification. However, smart contract is a piece of code with special characteristics and most of smart contracts are stored without any category labels, which leads to difficulties of smart contract classification. As the back end of a blockchain-based Decentralized Application (DApp) is one or several smart contracts, DApps with labeled categories and open source codes are applied to achieve a supervised smart contract classification. A three-phase approach is proposed to categorize DApps based on various data features. In this approach, 5,659 DApps with smart contract source codes and pre-tagged categories are first obtained based on massive collected DApps and smart contracts from Ethereum, State of the DApps and DappRadar. Then feature extraction and construction methods are designed to form multi-feature vectors that could present the major characteristics of DApps. Finally, a fused classification model consisting of KNN, XGBoost and random forests is applied to the multi-feature vectors of all DApps for performing DApp classification. The experimental results show that the method is effective. In addition, some positive correlations between feature variables and categories, as well as several user behavior patterns of DApp calls, are found in this paper. |
first_indexed | 2024-04-10T22:19:29Z |
format | Article |
id | doaj.art-1e43aab6ab354f539504053baae9501e |
institution | Directory Open Access Journal |
issn | 2352-8648 |
language | English |
last_indexed | 2024-04-10T22:19:29Z |
publishDate | 2022-12-01 |
publisher | KeAi Communications Co., Ltd. |
record_format | Article |
series | Digital Communications and Networks |
spelling | doaj.art-1e43aab6ab354f539504053baae9501e2023-01-18T04:32:07ZengKeAi Communications Co., Ltd.Digital Communications and Networks2352-86482022-12-0186964975Applying blockchain-based method to smart contract classification for CPS applicationsZigui Jiang0Kai Chen1Hailin Wen2Zibin Zheng3School of Software Engineering, Sun Yat-Sen University, ChinaSchool of Mathematics, Sun Yat-Sen University, ChinaSchool of Computer Science and Engineering, Sun Yat-Sen University, ChinaSchool of Software Engineering, Sun Yat-Sen University, China; Corresponding author.Smart contract has been the core of blockchain systems and other blockchain-based systems since Blockchain 2.0. Various operations on blockchain are performed through the invocation and execution of smart contracts. This leads to extensive combinations between blockchain, smart contract, Internet of Things (IoT) and Cyber-Physical System (CPS) applications, and then many blockchain-based IoT or CPS applications emerge to provide multiple benefits to the economy and society. In this case, obtaining a better understanding of smart contracts will contribute to the easier operation, higher efficiency and stronger security of those blockchain-based systems and applications. Many existing studies on smart contract analysis are based on similarity calculation and smart contract classification. However, smart contract is a piece of code with special characteristics and most of smart contracts are stored without any category labels, which leads to difficulties of smart contract classification. As the back end of a blockchain-based Decentralized Application (DApp) is one or several smart contracts, DApps with labeled categories and open source codes are applied to achieve a supervised smart contract classification. A three-phase approach is proposed to categorize DApps based on various data features. In this approach, 5,659 DApps with smart contract source codes and pre-tagged categories are first obtained based on massive collected DApps and smart contracts from Ethereum, State of the DApps and DappRadar. Then feature extraction and construction methods are designed to form multi-feature vectors that could present the major characteristics of DApps. Finally, a fused classification model consisting of KNN, XGBoost and random forests is applied to the multi-feature vectors of all DApps for performing DApp classification. The experimental results show that the method is effective. In addition, some positive correlations between feature variables and categories, as well as several user behavior patterns of DApp calls, are found in this paper.http://www.sciencedirect.com/science/article/pii/S2352864822001742BlockchainBlockchain-based applicationSmart contractDApp classificationSolidity |
spellingShingle | Zigui Jiang Kai Chen Hailin Wen Zibin Zheng Applying blockchain-based method to smart contract classification for CPS applications Digital Communications and Networks Blockchain Blockchain-based application Smart contract DApp classification Solidity |
title | Applying blockchain-based method to smart contract classification for CPS applications |
title_full | Applying blockchain-based method to smart contract classification for CPS applications |
title_fullStr | Applying blockchain-based method to smart contract classification for CPS applications |
title_full_unstemmed | Applying blockchain-based method to smart contract classification for CPS applications |
title_short | Applying blockchain-based method to smart contract classification for CPS applications |
title_sort | applying blockchain based method to smart contract classification for cps applications |
topic | Blockchain Blockchain-based application Smart contract DApp classification Solidity |
url | http://www.sciencedirect.com/science/article/pii/S2352864822001742 |
work_keys_str_mv | AT ziguijiang applyingblockchainbasedmethodtosmartcontractclassificationforcpsapplications AT kaichen applyingblockchainbasedmethodtosmartcontractclassificationforcpsapplications AT hailinwen applyingblockchainbasedmethodtosmartcontractclassificationforcpsapplications AT zibinzheng applyingblockchainbasedmethodtosmartcontractclassificationforcpsapplications |