Developing Cost-Effective Blockchain-Powered Applications

Author:

Zarir Abdullah A.1,Oliva Gustavo A.2,Jiang Zhen M. (Jack)3,Hassan Ahmed E.2

Affiliation:

1. EconTech team at Amazon, Vancouver, BC, Canada

2. Software Analysis and Intelligence Lab (SAIL) at Queen’s University, Kingston, ON, Canada

3. Department of Electrical Engineering and Computer Science at York University, Toronto, Ontario, Canada

Abstract

Ethereum is a blockchain platform that hosts and executes smart contracts. 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, transaction issuers choose how much they are willing to pay for each unit of gas (a.k.a., gas price). The final transaction fee corresponds to the gas price times the gas usage. Miners process transactions to gain mining rewards, which come directly from these transaction fees. The flexibility and the inherent complexity of the gas system pose challenges to the development of blockchain-powered applications. Developers of blockchain-powered applications need to translate requests received in the frontend of their application into one or more smart contract transactions. Yet, it is unclear how developers should set the gas parameters of these transactions given that (i) miners are free to prioritize transactions whichever way they wish and (ii) the gas usage of a contract transaction is only known after the transaction is processed and included in a new block. In this article, we analyze the gas usage of Ethereum transactions that were processed between Oct. 2017 and Feb. 2019 (the Byzantium era). We discover that (i) most miners prioritize transactions based on their gas price only, (ii) 25% of the functions that received at least 10 transactions have an unstable gas usage (coefficient of variation = 19%), and (iii) a simple prediction model that operates on the recent gas usage of a function achieves an R-Squared of 0.76 and a median absolute percentage error of 3.3%. We conclude that (i) blockchain-powered application developers should be aware that transaction prioritization in Ethereum is frequently done based solely on the gas price of transactions (e.g., a higher transaction fee does not necessarily imply a higher transaction priority) and act accordingly and (ii) blockchain-powered application developers can leverage gas usage prediction models similar to ours to make more informed decisions to set the gas price of their transactions. Lastly, based on our findings, we list and discuss promising avenues for future research.

Funder

Natural Sciences and Engineering Research Council of Canada

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Cited by 49 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Futuristic Blockchain Applications of the Metaverse;Blockchain Technologies;2024-08-29

2. SmartExecutor: Coverage-Driven Symbolic Execution Guided via State Prioritization and Function Selection;Distributed Ledger Technologies: Research and Practice;2024-07-15

3. Design and Evaluation of Smart Contracts for the Issuance of Mobile Driver’s License;The Journal of Korean Institute of Information Technology;2024-06-30

4. Detection of malicious smart contracts by fine‐tuning GPT‐3;SECURITY AND PRIVACY;2024-06-09

5. A large-scale exploratory study on the proxy pattern in Ethereum;Empirical Software Engineering;2024-06-04

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3