Blockchain’s rapid growth is revolutionizing sectors like finance and healthcare, providing universal computational access for diverse, decentralized applications (DApps). It also facilitates the creation of DApps, which integrates smart contracts on the blockchain with a user-friendly front-end interface. This research aims to assist researchers and developers in analyzing the smart contract’s code readability level and vulnerability types. In this work, we collect and analyze smart contracts from the “Etherscan” platform to demonstrate the tool’s effectiveness. To the author’s knowledge, this is the first work examining the association between the readability and vulnerability of solidity smart contracts. To examine the degree of readability of smart contracts, we employ a set of readability matrices that the previous research demonstrated related to code readability. Our suggested method evaluates the smart contract automatically and calculates a set of metrics for the level of code readability. Furthermore, We propose a machine learning model to create an automated system that discerns between readable and non-readable smart contracts. The result shows that XGBoost outperformed other classifiers with an impressive 98.856% F-Measure and 98.858% accuracy. Additionally, we utilize the Slither to analyze security issues in smart contracts. Afterward, we examined the most prevalent and critical vulnerability types discovered in each smart contract. Also, it is observed that there is a correlation between non-readability and vulnerability. Our analysis revealed that 72.6% of non-readable files exhibit vulnerabilities, showing that files with high vulnerability are characterized by low readability.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Analyzing the Correlation of Smart Contract Vulnerability and Readability: A Machine Learning Approach

  • K. M. Sameera,
  • P. Vinod,
  • K. A. Rafidha Rehiman,
  • Poonam Kumari,
  • Harsh Raj,
  • Rinki Kumari,
  • Aman Kumar,
  • Ritika Mittal

摘要

Blockchain’s rapid growth is revolutionizing sectors like finance and healthcare, providing universal computational access for diverse, decentralized applications (DApps). It also facilitates the creation of DApps, which integrates smart contracts on the blockchain with a user-friendly front-end interface. This research aims to assist researchers and developers in analyzing the smart contract’s code readability level and vulnerability types. In this work, we collect and analyze smart contracts from the “Etherscan” platform to demonstrate the tool’s effectiveness. To the author’s knowledge, this is the first work examining the association between the readability and vulnerability of solidity smart contracts. To examine the degree of readability of smart contracts, we employ a set of readability matrices that the previous research demonstrated related to code readability. Our suggested method evaluates the smart contract automatically and calculates a set of metrics for the level of code readability. Furthermore, We propose a machine learning model to create an automated system that discerns between readable and non-readable smart contracts. The result shows that XGBoost outperformed other classifiers with an impressive 98.856% F-Measure and 98.858% accuracy. Additionally, we utilize the Slither to analyze security issues in smart contracts. Afterward, we examined the most prevalent and critical vulnerability types discovered in each smart contract. Also, it is observed that there is a correlation between non-readability and vulnerability. Our analysis revealed that 72.6% of non-readable files exhibit vulnerabilities, showing that files with high vulnerability are characterized by low readability.