GasGuard: An LLM-Based Automated Gas Vulnerability Detection and Mitigation System
Behkish Nassirzadeh (),
Anwar Hasan () and
Vijay Ganesh ()
Additional contact information
Behkish Nassirzadeh: University of Waterloo
Anwar Hasan: University of Waterloo
Vijay Ganesh: Georgia Institute of Technology
A chapter in Mathematical Research for Blockchain Economy, 2026, pp 187-204 from Springer
Abstract:
Abstract Security concerns are a critical barrier to the mass adoption of blockchain. Among the various security challenges, gas-related vulnerabilities constitute a significant challenge to detect and repair. Existing tools fail to accurately identify these vulnerabilities, necessitating expensive and time-consuming manual audits. This paper introduces GasGuard, one of the first LLM-based automated vulnerability detection and mitigation tools designed to address gas-based vulnerabilities in Ethereum smart contracts. GasGuard extends the capabilities of the Gas Gauge tool by integrating a novel LLM-driven mitigation mechanism that not only detects but also automatically prevents gas wastage without manual intervention. Our approach involves a new static analyzer that efficiently processes contract data and reports, a comprehensive data set derived from more than 900 loops in real-world smart contracts, and a fine-tuned LLM. Our extensive experimental evaluation on over 60 prompt-engineered and fine-tuned GPT models demonstrates that GasGuard can achieve an accuracy of over 98%. Finally, GasGuard represents a significant advancement in smart contract security. It provides a proof of concept that similar approaches can be utilized to address other types of vulnerabilities, significantly reducing the time and cost of smart contract auditing.
Keywords: LLM; AI; Blockchain; Smart Contract; Security (search for similar items in EconPapers)
Date: 2026
References: Add references at CitEc
Citations:
There are no downloads for this item, see the EconPapers FAQ for hints about obtaining it.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:spr:lnopch:978-3-032-13377-9_9
Ordering information: This item can be ordered from
http://www.springer.com/9783032133779
DOI: 10.1007/978-3-032-13377-9_9
Access Statistics for this chapter
More chapters in Lecture Notes in Operations Research from Springer
Bibliographic data for series maintained by Sonal Shukla () and Springer Nature Abstracting and Indexing ().