IDEAS home Printed from https://ideas.repec.org/h/spr/lnopch/978-3-031-18679-0_9.html
   My bibliography  Save this book chapter

Gas Gauge: A Security Analysis Tool for Smart Contract Out-of-Gas Vulnerabilities

In: Mathematical Research for Blockchain Economy

Author

Listed:
  • Behkish Nassirzadeh

    (University of Waterloo)

  • Huaiying Sun

    (East China University of Science and Technology)

  • Sebastian Banescu

    (Quantstamp)

  • Vijay Ganesh

    (University of Waterloo)

Abstract

In recent years, we have witnessed a dramatic increase in the adoption and application of smart contracts in a variety of contexts. However, security vulnerabilities pose a significant challenge to the continued adoption of smart contracts. An important and pervasive class of security vulnerabilities that afflicts Ethereum smart contracts is the gas limit DoS on a contract via unbounded operations. These vulnerabilities result in a failed transaction with an “out-of-gas” error and are often present in contracts containing loops whose bounds are affected by end-user input. To address this issue, we present Gas Gauge, a tool aimed at detecting Out-of-Gas DoS vulnerabilities in Ethereum smart contracts. The Gas Gauge tool has three major components: The Detection Phase, Identification Phase, and Correction Phase. The Detection Phase component consists of an accurate static analysis approach that finds and summarizes all the loops in a smart contract. The Identification Phase component uses a white-box fuzzing approach to generate a set of inputs that causes the contract to run out of gas. Lastly, the Correction Phase component uses static analysis and run-time verification to predict the maximum loop bounds consistent with allowable gas usage and suggest appropriate repairs to the tool’s users. Each part of Gas Gauge can be used separately or all together to detect, identify and help repair contracts vulnerable to Out-of-Gas DoS vulnerabilities. Gas Gauge was tested on 1,000 real-world solidity smart contracts. When compared to seven state-of-the-art tools, we show that Gas Gauge is the most effective (i.e., has no false positives and false negatives) while being competitive in terms of efficiency.

Suggested Citation

  • Behkish Nassirzadeh & Huaiying Sun & Sebastian Banescu & Vijay Ganesh, 2023. "Gas Gauge: A Security Analysis Tool for Smart Contract Out-of-Gas Vulnerabilities," Lecture Notes in Operations Research, in: Panos Pardalos & Ilias Kotsireas & Yike Guo & William Knottenbelt (ed.), Mathematical Research for Blockchain Economy, pages 143-167, Springer.
  • Handle: RePEc:spr:lnopch:978-3-031-18679-0_9
    DOI: 10.1007/978-3-031-18679-0_9
    as

    Download full text from publisher

    To our knowledge, this item is not available for download. To find whether it is available, there are three options:
    1. Check below whether another version of this item is available online.
    2. Check on the provider's web page whether it is in fact available.
    3. Perform a search for a similarly titled item that would be available.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:lnopch:978-3-031-18679-0_9. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.