cs.AIFeb 17, 2026

Benchmarking Zero-Shot Reasoning Approaches for Error Detection in Solidity Smart Contracts

Authors: Eduardo Sardenberg, Antonio José Grandson Busson, Daniel de Sousa Moraes, Julio Cesar Duarte, Sérgio Colcher

Organizations: TeleMídia Lab - PUC-Rio, Rio de Janeiro, RJ - Brazil · BTG Pactual, São Paulo, SP - Brazil · Instituto Militar de Engenharia, Rio de Janeiro, RJ - Brazil

Abstract

Smart contracts play a central role in blockchain systems by encoding financial and operational logic. Still, their susceptibility to subtle security flaws poses significant risks of financial loss and erosion of trust. LLMs create new opportunities for automating vulnerability detection, yet the effectiveness of different prompting strategies and model choices in real-world contexts remains uncertain. This paper evaluates state-of-the-art LLMs on Solidity smart contract analysis using a balanced dataset of 400 contracts under two tasks: (i) Error Detection, where the model performs binary classification to decide whether a contract is vulnerable, and (ii) Error Classification, where the model must assign the predicted issue to a specific vulnerability category. Models are evaluated using zero-shot prompting strategies, including zero-shot, zero-shot Chain-of-Thought (CoT), and zero-shot Tree-of-Thought (ToT). In the Error Detection task, CoT and ToT substantially increase recall (often approaching ~ 95--99%), but typically reduce precision, indicating a more sensitive decision regime with more false positives. In the Error Classification task, Claude 3 Opus attains the best Weighted F1-score (90.8) under the ToT prompt, followed closely by its CoT.

Figures & tables

Explore similar work

CardsList
  1. Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts

    May 5, 2026Xing Zhang, Keyu Zhang, Taohong Zhu +1Software Vulnerability DetectionLLMs for Cybersecurity

  2. SmartEval: A Benchmark for Evaluating LLM-Generated Smart Contracts from Natural Language Specifications

    May 10, 2026Abhinav Goel, Agostino Capponi, Alfio Gliozzo +1Code GenerationCode Generation Evaluation

  3. Benchmarking LLM-Based Static Analysis for Secure Smart Contract Development: Reliability, Limitations, and Potential Hybrid Solutions

    May 11, 2026Stefan-Claudiu Susan, Andrei Arusoaie, Dorel LucanuLLM EvaluationSoftware Vulnerability Detection