IET Blockchain (Jun 2024)

Ponzi scheme detection in smart contracts using the integration of deep learning and formal verification

  • Shibao Chen,
  • Fei Li

DOI
https://doi.org/10.1049/blc2.12056
Journal volume & issue
Vol. 4, no. 2
pp. 185 – 196

Abstract

Read online

Abstract Blockchain smart contracts are codes that can execute and enforce rules for blockchain digital transactions. However, smart contracts may contain numerous subtle vulnerabilities, among which Ponzi vulnerabilities are notable. Existing Ponzi scheme contract detection approaches often rely on machine learning models trained on manually extracted features to achieve satisfactory classification results. Nonetheless, the code of a smart contract potentially harbours elusive semantics and characteristics, which compromises the precision and accuracy of vulnerability detection. Therefore, this paper proposes a method of converting operation codes into sequences to process data to avoid losing unnecessary important information, and uses a one‐dimensional convolutional neural network combined with formal verification. This method is named PZ‐C1DZ3(Ponzi‐Conv1D‐Z3) and is used for Ponzi scheme detection. Four types of machine learning models, namely Conv1D, Conv1D‐LSTM, Conv1D‐MLP, and Conv1D‐transformer, are employed for improvement and comparative validation experiments. Additionally, formal verification tool Z3 solver is utilized to conduct formal security verification on the final model, ensuring its safety. Experimental results demonstrate that the improved Conv1D model outperforms other existing models in terms of detection efficiency and accuracy while also meeting the requirements of formal security verification.

Keywords