SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework

Smart contracts are essential for managing digital assets in blockchain networks, highlighting the need for effective security measures. This paper introduces SmartLLMSentry, a novel framework that leverages large language models (LLMs), specifically ChatGPT with in-context training, to advance smar...

Full description

Saved in:
Bibliographic Details
Main Authors: Oualid Zaazaa, Hanan El Bakkali
Format: Article
Language:English
Published: İzmir Akademi Derneği 2024-12-01
Series:Journal of Metaverse
Subjects:
Online Access:https://dergipark.org.tr/en/download/article-file/3951976
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849220070282100736
author Oualid Zaazaa
Hanan El Bakkali
author_facet Oualid Zaazaa
Hanan El Bakkali
author_sort Oualid Zaazaa
collection DOAJ
description Smart contracts are essential for managing digital assets in blockchain networks, highlighting the need for effective security measures. This paper introduces SmartLLMSentry, a novel framework that leverages large language models (LLMs), specifically ChatGPT with in-context training, to advance smart contract vulnerability detection. Traditional rule-based frameworks have limitations in integrating new detection rules efficiently. In contrast, SmartLLMSentry utilizes LLMs to streamline this process. We created a specialized dataset of five randomly selected vulnerabilities for model training and evaluation. Our results show an exact match accuracy of 91.1% with sufficient data, although GPT-4 demonstrated reduced performance compared to GPT-3 in rule generation. This study illustrates that SmartLLMSentry significantly enhances the speed and accuracy of vulnerability detection through LLM-driven rule integration, offering a new approach to improving Blockchain security and addressing previously underexplored vulnerabilities in smart contracts.
format Article
id doaj-art-46b4622ec9f04b0782931b4f31deb4f0
institution Kabale University
issn 2792-0232
language English
publishDate 2024-12-01
publisher İzmir Akademi Derneği
record_format Article
series Journal of Metaverse
spelling doaj-art-46b4622ec9f04b0782931b4f31deb4f02024-12-19T22:17:20Zengİzmir Akademi DerneğiJournal of Metaverse2792-02322024-12-014212613710.57019/jmv.14890602220SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection FrameworkOualid Zaazaa0https://orcid.org/0000-0003-4864-2486Hanan El Bakkali1https://orcid.org/0000-0003-2941-3768Mohammed V University in RabatMohammed V University in RabatSmart contracts are essential for managing digital assets in blockchain networks, highlighting the need for effective security measures. This paper introduces SmartLLMSentry, a novel framework that leverages large language models (LLMs), specifically ChatGPT with in-context training, to advance smart contract vulnerability detection. Traditional rule-based frameworks have limitations in integrating new detection rules efficiently. In contrast, SmartLLMSentry utilizes LLMs to streamline this process. We created a specialized dataset of five randomly selected vulnerabilities for model training and evaluation. Our results show an exact match accuracy of 91.1% with sufficient data, although GPT-4 demonstrated reduced performance compared to GPT-3 in rule generation. This study illustrates that SmartLLMSentry significantly enhances the speed and accuracy of vulnerability detection through LLM-driven rule integration, offering a new approach to improving Blockchain security and addressing previously underexplored vulnerabilities in smart contracts.https://dergipark.org.tr/en/download/article-file/3951976smart contractvulnerabilitysoftware securityblockchainlarge language models
spellingShingle Oualid Zaazaa
Hanan El Bakkali
SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
Journal of Metaverse
smart contract
vulnerability
software security
blockchain
large language models
title SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
title_full SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
title_fullStr SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
title_full_unstemmed SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
title_short SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Framework
title_sort smartllmsentry a comprehensive llm based smart contract vulnerability detection framework
topic smart contract
vulnerability
software security
blockchain
large language models
url https://dergipark.org.tr/en/download/article-file/3951976
work_keys_str_mv AT oualidzaazaa smartllmsentryacomprehensivellmbasedsmartcontractvulnerabilitydetectionframework
AT hananelbakkali smartllmsentryacomprehensivellmbasedsmartcontractvulnerabilitydetectionframework