Evaluating the Vulnerability Landscape of LLM-Generated Smart Contracts
Hoang Long Do, Nasrin Sohrabi, Muneeb Ul Hassan

TL;DR
This paper systematically analyzes the security vulnerabilities of smart contracts generated by state-of-the-art LLMs, revealing frequent severe flaws despite syntactic correctness, and provides guidelines to mitigate these risks in blockchain applications.
Contribution
It offers a comprehensive security assessment of LLM-generated smart contracts, identifying common vulnerabilities and proposing practical countermeasures for safer deployment.
Findings
LLM-generated smart contracts often contain severe security flaws
Recurring vulnerability patterns are identified across different models
Practical guidelines are proposed to mitigate security risks
Abstract
Large language models (LLMs) have been widely adopted in modern software development lifecycles, where they are increasingly used to automate and assist code generation, significantly improving developer productivity and reducing development time. In the blockchain domain, developers increasingly rely on LLMs to generate and maintain smart contracts, the immutable, self-executing components of decentralized applications. Because deployed smart contracts cannot be modified, correctness and security are paramount, particularly in high-stakes domains such as finance and governance. Despite this growing reliance, the security implications of LLM-generated smart contracts remain insufficiently understood. In this work, we conduct a systematic security analysis of Solidity smart contracts generated by state-of-the-art LLMs, including ChatGPT, Gemini, and Sonnet. We evaluate these contracts…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · Software Engineering Techniques and Practices · Software Engineering Research
