Deep Smart Contract Intent Detection
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. Unfortunately, existing research lacks effective methods for detecting development intents in smart contracts. To address this gap, we propose SMARTINTENTNN (Smart Contract Intent Neural Network), a deep learning model designed to automatically detect development intents in smart contracts. 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 SMARTINTENTNN on a dataset containing over 40,000 real-world smart contracts, employing self-comparison baselines in our experimental setup. The results show that 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.
Authors
- Youwei Huang (ORCID: https://orcid.org/0000-0001-8350-1991)
- Sen Fang (ORCID: https://orcid.org/0000-0002-9918-7180)
- Tao Zhang (ORCID: https://orcid.org/0000-0002-6272-4069)
- Bin Hu (ORCID: https://orcid.org/0000-0003-3514-5413)
- Jianwen Li (ORCID: https://orcid.org/0000-0002-3936-937X)
- Jiachun Tao
Institutions
- Macau University of Science and Technology (MO)
- North Carolina State University (US)
- Chinese Academy of Sciences (CN)
- Institute of Computing Technology (CN)
Publication Details
- Published
- 2025-03-04
- DOI
- https://doi.org/10.1109/saner64311.2025.00020
- Citations
- 2
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 17.04
Funders
- VNU Science and Technology Development Fund