Studying the Gas Usage and Price of Transactions in the Ethereum Blockchain Platform

Loading...
Thumbnail Image

Authors

Zarir, Abdullah Ahmad

Date

Type

thesis

Language

eng

Keyword

Mining , Smart Contracts , Ethereum , Blockchain , Gas , Gas Limit , DApp , Transaction Fee , Gas Price

Research Projects

Organizational Units

Journal Issue

Alternative Title

Abstract

Ethereum is a blockchain platform that hosts and executes general-purpose computer programs known as smart contracts. Users execute smart contracts by sending transactions to one of the functions of the contract. The execution of smart contracts in Ethereum has a cost that is measured in Gas unit. Executing a function of a smart contract burns a certain amount of gas units (a.k.a., gas usage). The total gas usage depends on how much computing power is necessary to carry out the execution of the function. Ethereum follows a free-market policy for deciding the transaction fee for executing a transaction. More specifically, users choose how much they are willing to pay in cryptocurrency for each unit of gas (a.k.a., gas price). Miners process transactions to gain mining rewards, which come directly from the paid transaction fees by users. However, neither the user nor the miner know, beforehand, the gas usage of a transaction. In this thesis, we analyze the Ethereum transaction data spanning between Oct. 2017 and Feb. 2019 (the Byzantium period) to conduct two studies that examine how gas usage and price impact the transaction processing dynamics of the Ethereum blockchain platform. In our first study, we examine the strategies that are adopted by miners to prioritize transactions, the stability of the gas usage of contract functions, and whether the gas usage of a contract transaction can be predicted within a reasonable margin. We observe that most miners follow the default strategy for prioritizing transactions (which solely relies on gas price), a significant amount of contract functions have a very stable gas usage history, and it is possible to provide a real-time estimation of the gas usage of a transaction for these contracts with a median Adjusted RSquared of 0.86. In the second study, we focus on understanding gas prices. We analyze how users commonly set gas prices and whether the contracts that are involved in user-to-contract transactions influence gas prices. Subsequently, we build a regression model to discover the factors that are strongly associated with the gas price of transactions. We observe that the gas prices set by users assume a wide range of values, vary considerably over time, and change based on the user. We also observe that the gas price of user-to-contract transactions differ significantly across contracts and functions. Lastly, we observe that different factors are more strongly associated with gas prices at different times. Our findings can help researchers to focus on the vulnerabilities of the current gas mechanism in their future work, provide developers insights on how to improve their decentralized applications (DApps) regarding transactions, motivate users to make an informed decision when issuing a transaction, and help miners to adopt optimized mining strategy.

Description

Citation

Publisher

License

Attribution-NonCommercial-ShareAlike 3.0 United States
Queen's University's Thesis/Dissertation Non-Exclusive License for Deposit to QSpace and Library and Archives Canada
ProQuest PhD and Master's Theses International Dissemination Agreement
Intellectual Property Guidelines at Queen's University
Copying and Preserving Your Thesis
This publication is made available by the authority of the copyright owner solely for the purpose of private study and research and may not be copied or reproduced except as permitted by the copyright laws without written authority from the copyright owner.

Journal

Volume

Issue

PubMed ID

External DOI

ISSN

EISSN