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

Xing Zhang, Keyu Zhang, Taohong Zhu, Anbang Ruan
5/5/2026
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

Smart contracts on blockchains are prone to diverse security vulnerabilities that can lead to significant financial losses due to their immutable nature. Existing detection approaches often lack flexibility across vulnerability types and rely heavily on manually crafted expert rules.

Show full abstract

In this paper, we present an LLM-based framework for practical smart contract vulnerability detection. We construct and release a large-scale dataset comprising 31,165 professionally annotated vulnerability instances collected from over 3,200 real-world projects across 15 major blockchain platforms. Our approach leverages precise AST-based context extraction and vulnerability-specific prompt design to instantiate customized detectors for 13 prevalent vulnerability categories. Experimental results demonstrate strong effectiveness, achieving an average positive recall of 0.92 and an average negative recall of 0.85, highlighting the potential of carefully engineered contextual prompting for scalable and high-precision smart contract security analysis.

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{zhang2026tailored,
  title  = {Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts},
  author = {Xing Zhang and Keyu Zhang and Taohong Zhu and Anbang Ruan},
  year   = {2026},
  eprint = {2605.03697},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.03697v1}
}

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/2605.03697.svg)](https://codeofpaper.com/paper/2605.03697)

Discussion