mlsanityData to 7 Oct 2026

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

arXiv 2605.03697 ↗First posted 5 May 2026cs.CR cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 16 of its 34 references that are in the map. First posted on arXiv 5 May 2026.

Builds on

16 of 34 references.

References · 16

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2023A Survey of Large Language Modelscited by 2,537
  6. 2024A Survey on Large Language Models for Code Generationcited by 646
  7. 2024A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applicationscited by 428
  8. 2019Slither: A Static Analysis Framework For Smart Contractscited by 88
  9. 2023GPTScan: Detecting Logic Vulnerabilities in Smart Contracts by Combining GPT with Program Analysiscited by 65
  10. 2018ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detectioncited by 32
  11. 2022SoK: Decentralized Finance (DeFi) Attackscited by 28
  12. 2018Vandal: A Scalable Security Analysis Framework for Smart Contractscited by 18
4 more
  1. 2018A Semantic Framework for the Security Analysis of Ethereum smart contractscited by 16
  2. 2022Smart Contract Vulnerability Detection Technique: A Surveycited by 9
  3. 2024SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Frameworkcited by 3
  4. 2024A Context-Driven Approach for Co-Auditing Smart Contracts with The Support of GPT-4 code interpretercited by 1

Built on by

Not cited yet.