Abstract:Due to insufficient development and code review experience of programmers, smart contracts, which are essential components of blockchain technology, are facing a growing number of security issues. Existing formal verification and symbolic execution methods have high false positive and false negative rates. Although deep learning-based methods have improved detection performance, they still face challenges in interpretability and reliance on extensive labeled data. To address these limitations, this paper proposed a smart contract vulnerability detection approach based on prompt engineering in a zero-shot scenario called Prompt-enhanced ChatGPT. Taking ChatGPT using standard prompt as the research subject, this approach reframed the traditional classification task as a text-based question-answering task, leveraging the model’s reasoning capabilities. After preprocessing to remove redundant information from the smart contract source code and designing specific prompt text templates which includes “task description” “vulnerability description”“detection steps” “reasoning process” and “answer format”,Prompt-enhanced ChatGPT can produce vulnerability detection results along with interpretable analysis. After a series of comparative experiments and analysis on public datasets, the results indicate that the proposed approach enhances vulnerability detection performance in zero-shot scenarios, highlighting the potential of large language models in related domains.