mlsanityData to 14 Oct 2026

Evaluation of ChatGPT's Smart Contract Auditing Capabilities Based on Chain of Thought

arXiv 2402.12023 ↗First posted 19 Feb 2024cs.CR cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

Smart contracts, as a key component of blockchain technology, play a crucial role in ensuring the automation of transactions and adherence to protocol rules. However, smart contracts are susceptible to security vulnerabilities, which, if exploited, can lead to significant asset losses. This study explores the potential of enhancing smart contract security audits using the GPT-4 model. We utilized a dataset of 35 smart contracts from the SolidiFI-benchmark vulnerability library, containing 732 vulnerabilities, and compared it with five other vulnerability detection tools to evaluate GPT-4's ability to identify seven common types of vulnerabilities. Moreover, we assessed GPT-4's performance in code parsing and vulnerability capture by simulating a professional auditor's auditing process using CoT(Chain of Thought) prompts based on the audit reports of eight groups of smart contracts. We also evaluated GPT-4's ability to write Solidity Proof of Concepts (PoCs). Through experimentation, we found that GPT-4 performed poorly in detecting smart contract vulnerabilities, with a high Precision of 96.6%, but a low Recall of 37.8%, and an F1-score of 41.1%, indicating a tendency to miss vulnerabilities during detection. Meanwhile, it demonstrated good contract code parsing capabilities, with an average comprehensive score of 6.5, capable of identifying the background information and functional relationships of smart contracts; in 60% of the cases, it could write usable PoCs, suggesting GPT-4 has significant potential application in PoC writing. These experimental results indicate that GPT-4 lacks the ability to detect smart contract vulnerabilities effectively, but its performance in contract code parsing and PoC writing demonstrates its significant potential as an auxiliary tool in enhancing the efficiency and effectiveness of smart contract security audits.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 7 of its 27 references that are in the map. First posted on arXiv 19 Feb 2024.

Builds on

7 of 27 references.

References · 7

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2023A Survey on Evaluation of Large Language Modelscited by 1,242
  3. 2019Slither: A Static Analysis Framework For Smart Contractscited by 89
  4. 2023Large Language Model-Powered Smart Contract Vulnerability Detection: New Perspectivescited by 48
  5. 2023When ChatGPT Meets Smart Contract Vulnerability Detection: How Far Are We?cited by 42
  6. 2023Do you still need a manual smart contract audit?cited by 35
  7. 2020How Effective are Smart Contract Analysis Tools? Evaluating Smart Contract Static Analysis Tools Using Bug Injectioncited by 20

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024LLM-SmartAudit: Advanced Smart Contract Vulnerability Detection
  2. 2026On the Shoulders of Giants: Empowering Automated Smart Contract Auditing via the GiAnt Corpus ↗
  3. 2026Benchmarking Zero-Shot Reasoning Approaches for Error Detection in Solidity Smart Contracts
  4. 2026Mitigating Error Propagation in Chain-of-Thought: A Tree-of-Thought Framework for Smart Contract Repair ↗
  5. 2026Decoupled Smart Contract Audits: Lightweight LLM Framework via Distillation and Aggregation
  6. 2024Retrieval Augmented Generation Integrated Large Language Models in Smart Contract Vulnerability Detection
  7. 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justifications
  8. 2024FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMs