Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2026
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866909014500048896 |
|---|---|
| author | Zhang, Xing Zhang, Keyu Zhu, Taohong Ruan, Anbang |
| author_facet | Zhang, Xing Zhang, Keyu Zhu, Taohong Ruan, Anbang |
| contents | 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. 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2605_03697 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts Zhang, Xing Zhang, Keyu Zhu, Taohong Ruan, Anbang Cryptography and Security Artificial Intelligence 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. 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. |
| title | Tailored Prompts, Targeted Protection: Vulnerability-Specific LLM Analysis for Smart Contracts |
| topic | Cryptography and Security Artificial Intelligence |
| url | https://arxiv.org/abs/2605.03697 |