ACM Transactions on Software Engineering and Methodology · 2024 · 55 citations · 31 references
ComputingComputer ScienceCybersecurityComputer SecuritySoftware EngineeringVulnerability AnalysisSmart ContractsSoftware Security EngineeringSoftware Vulnerability DiscoveryVulnerability ManagementBlockchain ApplicationsEmpirical EvaluationLarge Language ModelsSmart Contract Vulnerability AnalysisSource Code Vulnerability AnalysisVulnerabilityVulnerability Classification
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 attention, showcasing great capabilities in code analysis tasks. In this article, 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 delved into the root causes for the false positives generated by ChatGPT, and categorized them into four groups. Second, by comparing ChatGPT with other state-of-the-art smart contract vulnerability detection tools, we found that ChatGPT’s F-score is lower than others for 3 out of the 7 vulnerabilities. In the case of the remaining 4 vulnerabilities, ChatGPT exhibits a slight advantage over these tools. Finally, we analyzed the limitation of ChatGPT in smart contract vulnerability detection, revealing that the robustness of ChatGPT in this field needs to be improved from two aspects: its uncertainty in answering questions; and the limited length of the detected code. In general, our research provides insights into the strengths and weaknesses of employing large language models, specifically ChatGPT, for the detection of smart contract vulnerabilities.
31
Making Smart Contracts Smarter
Loi Luu, Duc-Hiep Chu, Hrishi Olickel et al. · 2016 · 2.2K citations
Formalizing and Securing Relationships on Public Networks
Nick Szabo · First Monday · 1997 · 2.1K citations · Full text
An overview on smart contracts: Challenges, advances and platforms
Zibin Zheng, Shaoan Xie, Hong‐Ning Dai et al. · Future Generation Computer Systems · 2019 · 1.2K citations · Full text
Law, Contract Law, Contracts +8
Petar Tsankov, Andrei Dan, Dana Drachsler-Cohen et al. · 2018 · 1K citations