Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilities

ZeKe Xiao, Qin Wang, Hammond Pearce, Shiping Chen
1/13/2025
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

Smart contract vulnerabilities caused significant economic losses in blockchain applications. Large Language Models (LLMs) provide new possibilities for addressing this time-consuming task. However, state-of-the-art LLM-based detection solutions are often plagued by high false-positive rates. In this paper, we push the boundaries of existing research in two key ways. First, our evaluation is based on Solidity v0.8, offering the most up-to-date insights compared to prior studies that focus on older versions (v0.4). Second, we leverage the latest five LLM models (across companies), ensuring comprehensive coverage across the most advanced capabilities in the field. We conducted a series of rigorous evaluations. Our experiments demonstrate that a well-designed prompt can reduce the false-positive rate by over 60%. Surprisingly, we also discovered that the recall rate for detecting some specific vulnerabilities in Solidity v0.8 has dropped to just 13% compared to earlier versions (i.e., v0.4). Further analysis reveals the root cause of this decline: the reliance of LLMs on identifying changes in newly introduced libraries and frameworks during detection.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xiao2025logic,
  title  = {Logic Meets Magic: LLMs Cracking Smart Contract Vulnerabilities},
  author = {ZeKe Xiao and Qin Wang and Hammond Pearce and Shiping Chen},
  year   = {2025},
  eprint = {2501.07058},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.07058v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.07058.svg)](https://codeofpaper.com/paper/2501.07058)

Discussion