When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?
Chong Chen, Jianzhong Su, Jiachi Chen, Yanlin Wang, Tingting Bi, Jianxing Yu, Yanli Wang, Xingwei Lin, Ting Chen, Zibin Zheng

TL;DR
This study empirically evaluates ChatGPT's ability to detect smart contract vulnerabilities, revealing high recall but limited precision, variable performance across vulnerability types, and highlighting areas for improvement in robustness and accuracy.
Contribution
It provides a comprehensive analysis of ChatGPT's performance in smart contract vulnerability detection, comparing it with existing tools and identifying key limitations and challenges.
Findings
ChatGPT has high recall but limited precision in vulnerability detection.
Performance varies across different vulnerability types.
ChatGPT's robustness needs improvement in uncertainty handling and code length limitations.
Abstract
With the development of blockchain technology, smart contracts have become an important component of blockchain applications. Despite their crucial role, the development of smart contracts may introduce vulnerabilities and potentially lead to severe consequences, such as financial losses. Meanwhile, large language models, represented by ChatGPT, have gained great attentions, showcasing great capabilities in code analysis tasks. In this paper, we presented an empirical study to investigate the performance of ChatGPT in identifying smart contract vulnerabilities. Initially, we evaluated ChatGPT's effectiveness using a publicly available smart contract dataset. Our findings discover that while ChatGPT achieves a high recall rate, its precision in pinpointing smart contract vulnerabilities is limited. Furthermore, ChatGPT's performance varies when detecting different vulnerability types. We…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security
