Hong Kong University of Science and Technology
Scalable Algorithms for Gas Analysis and Optimization in Smart Contracts
Abstract
dc:description<p>Blockchains are a family of distributed consensus protocols that maintain a shared, append-only ledger without relying on a trusted central authority. Smart contracts are self-enforcing programs executed on blockchains that can support arbitrarily complex logic. Their applications span multiple domains, including finance, healthcare, and supply chain management, in both the public and private sectors. They are currently in charge of billions of dollars’ worth of digital assets. On modern programmable blockchains, users incur execution fees, known as “gas,” when interacting with contracts. In the last five years, Ethereum users spent more than 19.6 billion USD on gas fees. The high cost of gas and the existence of “out-of-gas” vulnerabilities, which have led to millions of dollars in user losses, make the analysis and minimization of gas usage a critical research problem. Yet, existing approaches often produce suboptimal results, lack strong assurances, or do not scale. These limitations frequently compel developers to rely on manual audits, which are costly, error-prone, and can leave vulnerabilities undiscovered.</p> <p>The main body of this thesis explores the impact of gas from multiple perspectives. It first approaches the topic from the user’s point of view, focusing on gas estimation and its subsequent reduction through improved compiler optimizations. It then shifts to the miner’s perspective, analyzing strategies for revenue maximization on two major cryptocurrencies, Ethereum and Cardano. The primary objective is to develop scalable solutions that provide strong formal assurances. To this end, this work leverages techniques such as parameterized algorithms and algebro-geometric methods, which are particularly effective at exploiting the structural sparsity inherent in smart contracts. Furthermore, it illustrates that blockchain research is fundamentally interdisciplinary, utilizing methodologies beyond traditional computer science to uncover costly vulnerabilities. Finally, each core contribution is backed by comprehensive empirical evaluations, demonstrating significant improvements over state-of-the-art solutions.</p>
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Farokhnia, Soroush
- Contributors dc:contributor
-
- Shen, Jiasi
- Kafshdar Goharshady, Amir
Rights
- Language dc:language
- English
Identifiers
dc:identifier.*- Repository record dc:identifier
- http://repository.hkust.edu.hk/ir/Record/1783.1-174530