Deep Smart Contract Intent Detection

Youwei Huang, Sen Fang, Jianwen Li, Jiachun Tao, Bin Hu +1 more
11/19/2022
9 citations
cs.SEcs.LG

Official code: web3se-lab/web3-sekit (13 stars, JavaScript, MIT, last commit 2026-03-06).

Abstract

In recent years, research in software security has concentrated on identifying vulnerabilities in smart contracts to prevent significant losses of crypto assets on blockchains. Despite early successes in this area, detecting developers' intents in smart contracts has become a more pressing issue, as malicious intents have caused substantial financial losses.

Show full abstract

Unfortunately, existing research lacks effective methods for detecting development intents in smart contracts. To address this gap, we propose \textsc{SmartIntentNN} (Smart Contract Intent Neural Network), a deep learning model designed to automatically detect development intents in smart contracts. \textsc{SmartIntentNN} leverages a pre-trained sentence encoder to generate contextual representations of smart contracts, employs a K-means clustering model to identify and highlight prominent intent features, and utilizes a bidirectional LSTM-based deep neural network for multi-label classification. We trained and evaluated \textsc{SmartIntentNN} on a dataset containing over 40,000 real-world smart contracts, employing self-comparison baselines in our experimental setup. The results show that \textsc{SmartIntentNN} achieves an F1-score of 0.8633 in identifying intents across 10 distinct categories, outperforming all baselines and addressing the gap in smart contract detection by incorporating intent analysis.

View on arXivView PDF

Code Implementations(1)

MIT

Models and Tool Kits for Web3 Software Engineering

132JavaScriptAug 4, 20239 months agoMIT
deep-learningresearch-projectsmart-contractssoftware-engineeringweb3

Similar Papers

Cite this paper

@article{huang2022deep,
  title  = {Deep Smart Contract Intent Detection},
  author = {Youwei Huang and Sen Fang and Jianwen Li and Jiachun Tao and Bin Hu and Tao Zhang},
  year   = {2022},
  eprint = {2211.10724},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.10724}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.10724.svg)](https://codeofpaper.com/paper/2211.10724)

Discussion