Towards Secure and Scalable Blockchain Systems: From Game-Theoretic Oracle Networks to AI-driven Smart Contract Repair

dc.contributor.authorNassirzadeh, Behkish
dc.date.accessioned2025-08-25T20:09:24Z
dc.date.available2025-08-25T20:09:24Z
dc.date.issued2025-08-25
dc.date.submitted2025-08-21
dc.description.abstractThe adoption of blockchain technologies in security-critical and high-throughput domains remains limited by persistent challenges in scalability, reliability, and automated vulnerability mitigation. This thesis presents a cohesive body of work that addresses two fundamental limitations of modern blockchain systems: the difficulty of ensuring safe, efficient execution in smart contracts and the lack of robust mechanisms for secure data connectivity through decentralized oracle networks (DONs). To address the first challenge, we introduce a suite of tools, GasGauge, GasGuard, and GasGaugeAI, that advance the detection, analysis, and automated repair of gas-related Denial-of-Service (DoS) vulnerabilities in Ethereum smart contracts. GasGauge leverages static-dynamic analysis to model safe loop bounds and identify Out-of-Gas (OOG) risks. We examine how emerging AI methods, particularly large language models (LLMs) and program synthesis tools, provide a scalable path forward for developing self-healing blockchain systems. GasGuard builds on this foundation by integrating a fine-tuned LLM to insert guard conditions that prevent unsafe execution automatically. Finally, GasGaugeAI extends the pipeline with a novel multi-LLM framework that classifies gas-dependent vulnerabilities, generates Foundry-based test cases, synthesizes function-level repairs, and validates fixes iteratively. Across hundreds of real-world contracts, these systems demonstrate the potential of AI-guided repair to drastically reduce manual auditing efforts and prevent exploitable gas exhaustion patterns. Beyond contract-level vulnerabilities, this thesis tackles the broader problem of trustworthy data connectivity in decentralized applications. We propose CountChain, a game-theoretic decentralized oracle network for secure aggregation in counting systems. Built on this foundation, AdChain applies DON principles to online advertising, mitigating discrepancy fraud through incentive-aligned protocols. Our experiments demonstrate that CountChain and AdChain provide both scalability and provable security against rational adversaries. Together, the tools, systems, and theoretical insights presented in this thesis contribute to the vision of blockchain infrastructures that are both secure and scalable by design, bridging the gap between automated repair and game-theoretic connectivity.
dc.identifier.urihttps://hdl.handle.net/10012/22264
dc.language.isoen
dc.pendingfalse
dc.publisherUniversity of Waterlooen
dc.relation.urihttps://github.com/gasgauge/gasgauge.github.io
dc.relation.urihttps://anonymous.4open.science/r/AdCahin-D274/
dc.relation.urihttps://anonymous.4open.science/r/CountChain-058D/
dc.relation.urihttps://anonymous.4open.science/r/GasGaugeAI-250D
dc.relation.urihttps://github.com/BehkishNz/GasGuard
dc.subjectblockchain
dc.subjectcomputer security
dc.subjectartificial intelligence
dc.subjectAI
dc.subjectLLM
dc.subjectsmart contract
dc.subjectEthereum
dc.subjectdecentralized oracles
dc.subjectgame theory
dc.subjectstatic analysis
dc.subjectfuzzing
dc.subjectautomatic program repair
dc.titleTowards Secure and Scalable Blockchain Systems: From Game-Theoretic Oracle Networks to AI-driven Smart Contract Repair
dc.typeDoctoral Thesis
uws-etd.degreeDoctor of Philosophy
uws-etd.degree.departmentElectrical and Computer Engineering
uws-etd.degree.disciplineElectrical and Computer Engineering
uws-etd.degree.grantorUniversity of Waterlooen
uws-etd.embargo.terms0
uws.contributor.advisorGanesh, Vijay
uws.contributor.advisorHasan, Anwar
uws.contributor.affiliation1Faculty of Engineering
uws.peerReviewStatusUnrevieweden
uws.published.cityWaterlooen
uws.published.countryCanadaen
uws.published.provinceOntarioen
uws.scholarLevelGraduateen
uws.typeOfResourceTexten

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Nassirzadeh_Behkish.pdf
Size:
2.31 MB
Format:
Adobe Portable Document Format

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
6.4 KB
Format:
Item-specific license agreed upon to submission
Description: