Do you still need a manual smart contract audit?
Isaac David, Liyi Zhou, Kaihua Qin, Dawn Song, Lorenzo Cavallaro,, Arthur Gervais

TL;DR
This study evaluates the potential of large language models like GPT-4 and Claude to automate smart contract security audits, highlighting their current capabilities, limitations, and areas for improvement in detecting vulnerabilities.
Contribution
The paper demonstrates the performance of LLMs in smart contract security analysis, introduces optimized prompt engineering, and provides a benchmark dataset for future research.
Findings
LLMs correctly identify vulnerabilities in 40% of compromised contracts.
Models outperform random baseline by 20% in F1-score.
GPT-4 achieves up to 78.7% true positive rate in mutation testing.
Abstract
We investigate the feasibility of employing large language models (LLMs) for conducting the security audit of smart contracts, a traditionally time-consuming and costly process. Our research focuses on the optimization of prompt engineering for enhanced security analysis, and we evaluate the performance and accuracy of LLMs using a benchmark dataset comprising 52 Decentralized Finance (DeFi) smart contracts that have previously been compromised. Our findings reveal that, when applied to vulnerable contracts, both GPT-4 and Claude models correctly identify the vulnerability type in 40% of the cases. However, these models also demonstrate a high false positive rate, necessitating continued involvement from manual auditors. The LLMs tested outperform a random model by 20% in terms of F1-score. To ensure the integrity of our study, we conduct mutation testing on five newly developed and…
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
TopicsInternet Traffic Analysis and Secure E-voting · Cryptography and Data Security · Advanced Malware Detection Techniques
