Smart contracts, as fundamental components of transactions in blockchain and decentralized systems, have inherent risks due to their immutable code and security vulnerabilities that are often challenging to detect. Traditional static analysis tools may overlook certain vulnerabilities, prompting the need for enhanced detection methods. To address this limitation, we propose a hybrid approach that combines static analysis with machine learning techniques. By leveraging static tools, we extract graph-based features from smart contracts such as the number of edges, functions, variables and cycle and we use them to train machine learning models like XGBoost and Random Forest. Our experimental results show that Random Forest demonstrated particularly strong accuracy, showing significant improvements over traditional vulnerability detection methods.

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

Improving the Security of Smart Contracts: Combining Graph and Machine Learning Models

  • Abdessamad Lachir,
  • Fouad Yakoubi,
  • Samira Douzi,
  • Bouabid El Ouahidi

摘要

Smart contracts, as fundamental components of transactions in blockchain and decentralized systems, have inherent risks due to their immutable code and security vulnerabilities that are often challenging to detect. Traditional static analysis tools may overlook certain vulnerabilities, prompting the need for enhanced detection methods. To address this limitation, we propose a hybrid approach that combines static analysis with machine learning techniques. By leveraging static tools, we extract graph-based features from smart contracts such as the number of edges, functions, variables and cycle and we use them to train machine learning models like XGBoost and Random Forest. Our experimental results show that Random Forest demonstrated particularly strong accuracy, showing significant improvements over traditional vulnerability detection methods.