{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,16]],"date-time":"2026-09-16T09:08:11Z","timestamp":1789549691163,"version":"build-2803163510"},"reference-count":47,"publisher":"Association for Computing Machinery (ACM)","issue":"3","license":[{"start":{"date-parts":[[2021,3,9]],"date-time":"2021-03-09T00:00:00Z","timestamp":1615248000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100000038","name":"Natural Sciences and Engineering Research Council of Canada","doi-asserted-by":"crossref","id":[{"id":"10.13039\/501100000038","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Softw. Eng. Methodol."],"published-print":{"date-parts":[[2021,7,31]]},"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.1145\/3431726","type":"journal-article","created":{"date-parts":[[2021,3,9]],"date-time":"2021-03-09T07:09:29Z","timestamp":1615273769000},"page":"1-38","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":96,"title":["Developing Cost-Effective Blockchain-Powered Applications"],"prefix":"10.1145","volume":"30","author":[{"given":"Abdullah A.","family":"Zarir","sequence":"first","affiliation":[{"name":"EconTech team at Amazon, Vancouver, BC, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Gustavo A.","family":"Oliva","sequence":"additional","affiliation":[{"name":"Software Analysis and Intelligence Lab (SAIL) at Queen\u2019s University, Kingston, ON, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zhen M. (Jack)","family":"Jiang","sequence":"additional","affiliation":[{"name":"Department of Electrical Engineering and Computer Science at York University, Toronto, Ontario, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ahmed E.","family":"Hassan","sequence":"additional","affiliation":[{"name":"Software Analysis and Intelligence Lab (SAIL) at Queen\u2019s University, Kingston, ON, Canada"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2021,3,9]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Solidus: An incentive-compatible cryptocurrency based on permissionless Byzantine consensus. CoRR, abs\/1612.02916.","author":"Abraham Ittai","year":"2016","unstructured":"Ittai Abraham, Dahlia Malkhi, Kartik Nayak, Ling Ren, and Alexander Spiegelman. 2016. Solidus: An incentive-compatible cryptocurrency based on permissionless Byzantine consensus. CoRR, abs\/1612.02916."},{"key":"e_1_2_1_2_1","volume-title":"Proceedings of the 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME\u201915)","author":"Aggarwal K.","unstructured":"K. Aggarwal, A. Hindle, and E. Stroulia. 2015. GreenAdvisor: A tool for analyzing the impact of software evolution on energy consumption. In Proceedings of the 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME\u201915). 311--320."},{"key":"e_1_2_1_3_1","volume-title":"Automatic inference of upper bounds for recurrence relations in cost analysis","author":"Albert Elvira","unstructured":"Elvira Albert, Puri Arenas, Samir Genaim, and Germ\u00e1n Puebla. 2008. Automatic inference of upper bounds for recurrence relations in cost analysis. In Static Analysis, Mar\u00eda Alpuente and Germ\u00e1n Vidal (Eds.). Springer, Berlin, 221--237."},{"key":"e_1_2_1_4_1","volume-title":"GASOL: Gas analysis and optimization for ethereum smart contracts. In Tools and Algorithms for the Construction and Analysis of Systems","author":"Albert Elvira","year":"2020","unstructured":"Elvira Albert, Jes\u00fas Correas, Pablo Gordillo, Guillermo Rom\u00e1n-D\u00edez, and Albert Rubio. 2020. GASOL: Gas analysis and optimization for ethereum smart contracts. In Tools and Algorithms for the Construction and Analysis of Systems, Armin Biere and David Parker (Eds.). Springer International Publishing, Cham, 118--125."},{"key":"e_1_2_1_5_1","volume-title":"Verification and Evaluation of Computer and Communication Systems, Pierre Ganty and Mohamed Ka\u00e2niche (Eds.)","author":"Albert Elvira","unstructured":"Elvira Albert, Pablo Gordillo, Albert Rubio, and Ilya Sergey. 2019. Running on fumes. In Verification and Evaluation of Computer and Communication Systems, Pierre Ganty and Mohamed Ka\u00e2niche (Eds.). Springer International Publishing, Cham, 63--78."},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-54455-6_8"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2635868.2635871"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.5555\/646483.691738"},{"key":"e_1_2_1_9_1","volume-title":"Vandal: A scalable security analysis framework for smart contracts. Arxiv:1809.03981 [cs] (Sept.","author":"Brent Lexi","year":"2018","unstructured":"Lexi Brent, Anton Jurisevic, Michael Kong, Eric Liu, Francois Gauthier, Vincent Gramoli, Ralph Holz, and Bernhard Scholz. 2018. Vandal: A scalable security analysis framework for smart contracts. Arxiv:1809.03981 [cs] (Sept. 2018)."},{"key":"e_1_2_1_10_1","volume-title":"Ethereum white paper. Retrieved on","author":"\u00a0al Vitalik Buterin","year":"2020","unstructured":"Vitalik Buterin et\u00a0al. 2013. Ethereum white paper. Retrieved on March 2, 2020 from https:\/\/github.com\/ethereum\/wiki\/wiki\/White-Paper."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/2976749.2978408"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1109\/SANER.2017.7884650"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-72359-4_1"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/2901739.2901763"},{"key":"e_1_2_1_15_1","volume-title":"Pace","author":"Colombo Christian","year":"2018","unstructured":"Christian Colombo, Joshua Ellul, and Gordon J. Pace. 2018. Contracts over smart contracts: Recovering from violations dynamically. In Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice, Tiziana Margaria and Bernhard Steffen (Eds.). Springer International Publishing, Cham, 300--315."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-65474-0_15"},{"key":"e_1_2_1_17_1","volume-title":"Proceedings of the 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE\u201918)","author":"Destefanis G.","unstructured":"G. Destefanis, M. Marchesi, M. Ortu, R. Tonelli, A. Bracciali, and R. Hierons. 2018. Smart contracts vulnerabilities: A call for blockchain software engineering? In Proceedings of the 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE\u201918). 19--25."},{"key":"e_1_2_1_18_1","volume-title":"Proceedings of the 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER\u201917)","author":"Nucci D. Di","unstructured":"D. Di Nucci, F. Palomba, A. Prota, A. Panichella, A. Zaidman, and A. De Lucia. 2017. Software-based energy profiling of android apps: Simple, efficient and reliable? In Proceedings of the 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER\u201917). 103--114."},{"key":"e_1_2_1_19_1","unstructured":"James D. Evans. 1995. Straightforward Statistics for the Behavioral Sciences. Brooks\/Cole Publishing Company."},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1109\/WETSEB.2019.00008"},{"key":"e_1_2_1_21_1","unstructured":"Z. Gao L. Jiang X. Xia D. Lo and J. Grundy. 2020. Checking smart contracts with structural code embedding. IEEE Transactions on Software Engineering (2020) 1--1."},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276486"},{"key":"e_1_2_1_23_1","volume-title":"Principles of Security and Trust, Lujo Bauer and Ralf K\u00fcsters (Eds.)","author":"Grishchenko Ilya","unstructured":"Ilya Grishchenko, Matteo Maffei, and Clara Schneidewind. 2018. A semantic framework for the security analysis of ethereum smart contracts. In Principles of Security and Trust, Lujo Bauer and Ralf K\u00fcsters (Eds.). Springer International Publishing, Cham, 243--269."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2597073.2597097"},{"key":"e_1_2_1_25_1","volume-title":"Proceedings of the 33rd ACM\/IEEE International Conference on Automated Software Engineering (ASE\u201918)","author":"Jiang Bo","unstructured":"Bo Jiang, Ye Liu, and W. K. Chan. 2018. ContractFuzzer: Fuzzing smart contracts for vulnerability detection. In Proceedings of the 33rd ACM\/IEEE International Conference on Automated Software Engineering (ASE\u201918). ACM, New York, NY, 259--269."},{"key":"e_1_2_1_26_1","volume-title":"Proceedings of the 27th USENIX Conference on Security Symposium (SEC\u201918)","author":"Krupp Johannes","year":"2018","unstructured":"Johannes Krupp and Christian Rossow. 2018. TEETHER: Gnawing at ethereum to automatically exploit smart contracts. In Proceedings of the 27th USENIX Conference on Security Symposium (SEC\u201918). USENIX Association, Berkeley, CA, 1317--1333."},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2017.04.018"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183440.3183495"},{"key":"e_1_2_1_29_1","volume-title":"Leveraging Applications of Formal Methods, Verification and Validation","author":"Marescotti Matteo","unstructured":"Matteo Marescotti, Martin Blicha, Antti E. J. Hyv\u00e4rinen, Sepideh Asadi, and Natasha Sharygina. 2018. Computing exact worst-case gas consumption for smart contracts. In Leveraging Applications of Formal Methods, Verification and Validation. Industrial Practice, Tiziana Margaria and Bernhard Steffen (Eds.). Springer International Publishing, Cham, 450--465."},{"key":"e_1_2_1_30_1","doi-asserted-by":"crossref","unstructured":"Anastasia Mavridou and Aron Laszka. 2017. Designing secure ethereum smart contracts: A finite state machine based approach. Arxiv:1711.09327 [cs] .","DOI":"10.1007\/978-3-662-58387-6_28"},{"key":"e_1_2_1_31_1","volume-title":"VeriSolid: Correct-by-design smart contracts for ethereum","author":"Mavridou Anastasia","unstructured":"Anastasia Mavridou, Aron Laszka, Emmanouela Stachtiari, and Abhishek Dubey. 2019. VeriSolid: Correct-by-design smart contracts for ethereum. In Financial Cryptography and Data Security, Ian Goldberg and Tyler Moore (Eds.). Springer International Publishing, Cham, 446--465."},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3274694.3274743"},{"key":"e_1_2_1_33_1","volume-title":"An exploratory study of smart contracts in the Ethereum blockchain platform. Empirical Software Engineering 25, 3","author":"Oliva Gustavo A.","year":"2020","unstructured":"Gustavo A. Oliva, Ahmed E. Hassan, and Zhen Ming (Jack) Jiang. 2020. An exploratory study of smart contracts in the Ethereum blockchain platform. Empirical Software Engineering 25, 3 (2020)."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.5555\/3291291.3291303"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-94478-4_6"},{"key":"e_1_2_1_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/1966445.1966460"},{"key":"e_1_2_1_37_1","volume-title":"2019 26th Asia-Pacific Software Engineering Conference (APSEC\u201919)","author":"Peng C.","unstructured":"C. Peng, S. Akca, and A. Rajan. 2019. SIF: A framework for solidity contract instrumentation and analysis. In 2019 26th Asia-Pacific Software Engineering Conference (APSEC\u201919). 466--473."},{"key":"e_1_2_1_38_1","volume-title":"2017 IEEE\/ACM 39th International Conference on Software Engineering Companion (ICSE-C\u201917)","author":"Porru S.","unstructured":"S. Porru, A. Pinna, M. Marchesi, and R. Tonelli. 2017. Blockchain-oriented software engineering: Challenges and new directions. In 2017 IEEE\/ACM 39th International Conference on Software Engineering Companion (ICSE-C\u201917). 169--171."},{"key":"e_1_2_1_39_1","volume-title":"Annual Meeting of the Florida Association of Institutional Research. 1--3.","author":"Romano J.","unstructured":"J. Romano, J. D. Kromrey, J. Coraggio, and J. Skowronek. 2006. Appropriate statistics for ordinal level data: Should we really be using t-test and Cohen\u2019s d for evaluating group differences on the NSSE and other surveys? In Annual Meeting of the Florida Association of Institutional Research. 1--3."},{"key":"e_1_2_1_40_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jss.2016.03.031"},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/3191697.3213790"},{"key":"e_1_2_1_42_1","volume-title":"A concurrent perspective on smart contracts","author":"Sergey Ilya","unstructured":"Ilya Sergey and Aquinas Hobor. 2017. A concurrent perspective on smart contracts. In Financial Cryptography and Data Security, Michael Brenner, Kurt Rohloff, Joseph Bonneau, Andrew Miller, Peter Y. A. Ryan, Vanessa Teague, Andrea Bracciali, Massimiliano Sala, Federico Pintore, and Markus Jakobsson (Eds.). Springer International Publishing, Cham, 478--493."},{"key":"e_1_2_1_43_1","unstructured":"Christopher Signer. 2018. Gas Cost Analysis for Ethereum Smart Contracts. Master\u2019s thesis. ETH Zurich Department of Computer Science."},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/3243734.3243737"},{"key":"e_1_2_1_45_1","volume-title":"Ethereum: A Secure Decentralised Generalised Transaction Ledger\u2014Byzantium Version. Retrieved","author":"Wood Gavin","year":"2018","unstructured":"Gavin Wood, Nick Savers, and Community. 2018. Ethereum: A Secure Decentralised Generalised Transaction Ledger\u2014Byzantium Version. Retrieved March 2, 2020 from https:\/\/github.com\/ethereum\/yellowpaper\/tree\/byzantium."},{"key":"e_1_2_1_46_1","volume-title":"Proceedings of the 2019 IEEE International Workshop on Blockchain Oriented Software Engineering (IWBOSE\u201919)","author":"Yamashita K.","unstructured":"K. Yamashita, Y. Nomura, E. Zhou, B. Pi, and S. Jun. 2019. Potential risks of hyperledger fabric smart contracts. In Proceedings of the 2019 IEEE International Workshop on Blockchain Oriented Software Engineering (IWBOSE\u201919). 1--10."},{"key":"e_1_2_1_47_1","unstructured":"W. Zou D. Lo P. S. Kochhar X. D. Le X. Xia Y. Feng Z. Chen and B. Xu. 2019. Smart contract development: Challenges and opportunities. IEEE Transactions on Software Engineering (2019) 1--1. Early Access."}],"container-title":["ACM Transactions on Software Engineering and Methodology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3431726","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3431726","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T17:24:46Z","timestamp":1750181086000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3431726"}},"subtitle":["A Case Study of the Gas Usage of Smart Contract Transactions in the Ethereum Blockchain Platform"],"short-title":[],"issued":{"date-parts":[[2021,3,9]]},"references-count":47,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2021,7,31]]}},"alternative-id":["10.1145\/3431726"],"URL":"https:\/\/doi.org\/10.1145\/3431726","relation":{},"ISSN":["1049-331X","1557-7392"],"issn-type":[{"value":"1049-331X","type":"print"},{"value":"1557-7392","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,3,9]]},"assertion":[{"value":"2020-04-01","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2020-10-01","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2021-03-09","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}