Making Ethereum Transactions Faster and Cheaper

tldt arrow

Too Long; Didn't Read

Ethereum transaction times vary; current estimators are imperfect, especially for cheap transactions. A new simple model offers more accurate predictions for ÐApp developers.

People Mentioned

Mention Thumbnail
Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Making Ethereum Transactions Faster and Cheaper
Blockchainize Any Technology HackerNoon profile picture
0-item

Abstract and 1 Introduction

2 Background and 2.1 Blockchain

2.2 Transactions

3 Motivating Example

4 Computing Transaction Processing Times

5 Data Collection and 5.1 Data Sources

5.2 Approach

6 Results

6.1 RQ1: How long does it take to process a transaction in Ethereum?

6.2 RQ2: How accurate are the estimates for transaction processing time provided by Etherscan and EthGasStation?

7 Can a simpler model be derived? A post-hoc study

8 Implications

8.1 How about end-users?

9 Related Work

10 Threats to Validity

11 Conclusion, Disclaimer, and References


A. COMPUTING TRANSACTION PROCESSING TIMES

A.1 Pending timestamp

A.2 Processed timestamp

B. RQ1: GAS PRICE DISTRIBUTION FOR EACH GAS PRICE CATEGORY

B.1 Sensitivity Analysis on Block Lookback

C. RQ2: SUMMARY OF ACCURACY STATISTICS FOR THE PREDICTION MODELS

D. POST-HOC STUDY: SUMMARY OF ACCURACY STATISTICS FOR THE PREDICTION MODELS

11 CONCLUSION

Transactions are at the forefront on how information is exchanged on the blockchain. Yet, it is generally unclear how long transactions commonly take to be processed in Ethereum. Predicting the processing time of transactions is key to development of cost-effective ÐApps, since developers need to optimize the balance between cost (transaction fees) and user-experience (transaction processing speed). Few online services exist to help smart contract developers estimate how long transactions will take to be processed. Most importantly, the accuracy of these estimation services remain unclear.


In this paper, we collected data from Etherscan, EthGasStation, and Google BigQuery in order to empirically determine how long transactions tend to take in Ethereum. We also evaluate the estimation accuracy of the models employed by the state-of-the-practice estimation services (Etherscan and EthGasStation). Our results led us to conclude that (i) ÐApp developers should typically avoid very expensive transactions, as there is no practical difference in their processing time compared to expensive transactions, (ii) the state-of-the-practice services are far from perfect, leaving considerable room for improvement (especially for cheaper transactions), and (iii) our simple linear regression model outperforms those services for very cheap and cheap transactions. processing times under different settings (e.g., other time frames) and using different techniques (e.g., alternative model ranking approaches) is also a fruitful follow up to our study.

DISCLAIMER

Any opinions, findings, and conclusions, or recommendations expressed in this material are those of the author(s) and do not reflect the views of Huawei.

REFERENCES

[1] Elvira Albert, Puri Arenas, Samir Genaim, and Germán Puebla. 2008. Automatic Inference of Upper Bounds for Recurrence Relations in Cost Analysis. In Static Analysis, María Alpuente and Germán Vidal (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 221–237.


[2] Elvira Albert, Jesús Correas, Pablo Gordillo, Guillermo Román-Díez, 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.


[3] 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âniche (Eds.). Springer International Publishing, Cham, 63–78.


[4] Bruce Anderson. 2020. The Most In-Demand Hard and Soft Skills of 2020. https://business.linkedin.com/talentsolutions/blog/trends-and-research/2020/most-in-demand-hard-and-soft-skills


[5] BBC. 2017. CryptoKitties craze slow down transactions on Ethereum. https://www.bbc.com/news/technology-42237162. [Online; accessed 26-August-2018].


[6] Armin Biere, Alessandro Cimatti, Edmund M. Clarke, and Yunshan Zhu. 1999. Symbolic Model Checking without BDDs. In Proceedings of the 5th International Conference on Tools and Algorithms for Construction and Analysis of Systems (TACAS ’99). Springer-Verlag, Berlin, Heidelberg, 193–207.


[7] Phillip Bonacich and Paulette Lloyd. 2001. Eigenvector-like measures of centrality for asymmetric relations. Social Networks 23, 3 (2001), 191 – 201. https://doi.org/10.1016/S0378-8733(01)00038-7


[8] Tamara Brandstätter, Stefan Schulte, Jürgen Cito, and Michael Borkowski. 2020. Characterizing Efficiency Optimizations in Solidity Smart Contracts. In 2020 IEEE 3rd International Conference on Blockchain. IEEE. To appear.


[9] Vitalik Buterin. 2014. Ethereum: A next-generation smart contract and decentralized application platform. https: //github.com/ethereum/wiki/wiki/White-Paper Accessed: 2019-11-20.


[10] Ting Chen, Xiaoqi Li, Xiapu Luo, and Xiaosong Zhang. 2017. Under-optimized smart contracts devour your money. In 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE, 442–446.


[11] Ting Chen, Xiaoqi Li, Ying Wang, Jiachi Chen, Zihao Li, Xiapu Luo, Man Ho Au, and Xiaosong Zhang. 2017. An Adaptive Gas Cost Mechanism for Ethereum to Defend Against Under-Priced DoS Attacks. (12 2017).


[12] CoinMarketCap. [n.d.]. Ethereum (ETH) price, marketcap, chart, and info. https://coinmarketcap.com/currencies/eth ereum Accessed: 2019-12-04.


[13] Christina Comben. 2018. What Are Blockchain Confirmations and Why Do They Matter? https://coincentral.com/bl ockchain-confirmations Accessed: 2019-12-04.


[14] Wade D. Cook and Joe Zhu. 2005. Ranking Players in Round Robin Tournaments. Springer US, Boston, MA, 329–350. https://doi.org/10.1007/0-387-24138-8_15


[15] Hoa Khanh Dam, Truyen Tran, and Aditya Ghose. 2018. Explainable Software Analytics. In Proceedings of the 40th International Conference on Software Engineering: New Ideas and Emerging Results (Gothenburg, Sweden) (ICSE-NIER ’18). Association for Computing Machinery, New York, NY, USA, 53–56. https://doi.org/10.1145/3183399.3183424


[16] Ankush Das and Shaz Qadeer. 2020. Exact and Linear-Time Gas-Cost Analysis. In Proceedings of the 27th Static Analysis Symposium (SAS). To appear.


[17] Bradley Efron and Robert J. Tibshirani. 1993. An Introduction to the Bootstrap (first ed.). Chapman and Hall.


[18] James D. Evans. 1995. Straightforward Statistics for the Behavioral Sciences. Brooks/Cole Pub Co.


[19] Baljinder Ghotra, Shane McIntosh, and Ahmed E. Hassan. 2015. Revisiting the Impact of Classification Techniques on the Performance of Defect Prediction Models. In Proceedings of the 37th International Conference on Software Engineering - Volume 1 (Florence, Italy) (ICSE ’15). IEEE Press, 789–800.


[20] Ahmed E. Hassan and Richard C. Holt. 2006. Replaying Development History to Assess the Effectiveness of Change Propagation Tools. Empirical Softw. Engg. 11, 3 (Sept. 2006), 335–367. https://doi.org/10.1007/s10664-006-9006-4


[21] Y. Hu, A. Manzoor, P. Ekparinya, M. Liyanage, K. Thilakarathna, G. Jourjon, and A. Seneviratne. 2019. A Delay-Tolerant Payment Scheme Based on the Ethereum Blockchain. IEEE Access 7 (2019), 33159–33172. https://doi.org/10.1109/AC CESS.2019.2903271


[22] Markus Jakobsson and Ari Juels. 1999. Proofs of Work and Bread Pudding Protocols. In Proceedings of the IFIP TC6/TC11 Joint Working Conference on Secure Information Networks: Communications and Multimedia Security (CMS ’99). Kluwer, B.V., Deventer, The Netherlands, The Netherlands, 258–272. http://dl.acm.org/citation.cfm?id=647800.757199


[23] Frank E. Harrell Jr. 2015. Regression Modeling Strategies with Applications to Linear Models, Logistic and Ordinal Regression, and Survival Analysis (second ed.). Springer.


[24] Shoji Kasahara and Jun Kawahara. 2019. Effect of Bitcoin fee on transaction-confirmation process. Journal of Industrial & Management Optimization 15, 1547-5816_2019_1_365 (2019), 365. https://doi.org/10.3934/jimo.2018047


[25] Seoung Kyun Kim, Zane Ma, Siddharth Murali, Joshua Mason, Andrew Miller, and Michael Bailey. 2018. Measuring Ethereum Network Peers. In Proceedings of the Internet Measurement Conference 2018 (Boston, MA, USA) (IMC ’18). Association for Computing Machinery, New York, NY, USA, 91–104. https://doi.org/10.1145/3278532.3278542


[26] Endmund Landau. 1895. Zur relativen Wertbemessung der Turnierresultate. Deutsches Wochenschach 11 (1895), 366–369.


[27] Qingwei Lin, Ken Hsieh, Yingnong Dang, Hongyu Zhang, Kaixin Sui, Yong Xu, Jian-Guang Lou, Chenggang Li, Youjiang Wu, Randolph Yao, Murali Chintalapati, and Dongmei Zhang. 2018. Predicting Node Failure in Cloud Service Systems. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Lake Buena Vista, FL, USA) (ESEC/FSE 2018). ACM, New York, NY, USA, 480–490. https://doi.org/10.1145/3236024.3236060


[28] Caitlin Long. 2019. Bitcoin, The Dollar And Facebook’s Cryptocurrency: Price Volatility Versus Systemic Volatility. https://www.forbes.com/sites/caitlinlong/2019/06/29/bitcoin-the-dollar-and- facebooks-cryptocurrency-pricevolatility-versus-systemic-volatility/#2e58478088b8 Accessed: 2020-10-12.


[29] Antônio Madeira. 2020. Ethereum gas fees reach 500𝐾𝑎𝑠𝐸𝑇 𝐻𝑝𝑟𝑖𝑐𝑒ℎ𝑖𝑡𝑠𝑎2020ℎ𝑖𝑔ℎ𝑎𝑡486. https://cointelegraph.com/ news/ethereum-gas-fees-reach-500k-as-eth-price-hits-a-2020-high-at-486. [Online; accessed 02-December-2018].


[30] Matteo Marescotti, Martin Blicha, Antti E. J. Hyvärinen, 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.


[31] Christoph Molnar. 2019. Interpretable Models. Lulu. https://christophm.github.io/interpretable-ml-book/


[32] Nachiappan Nagappan, Thomas Ball, and Andreas Zeller. 2006. Mining Metrics to Predict Component Failures. In Proceedings of the 28th International Conference on Software Engineering (Shanghai, China) (ICSE ’06). Association for Computing Machinery, New York, NY, USA, 452–461. https://doi.org/10.1145/1134285.1134349


[33] Mark Newman. 2018. Networks (second ed.). Oxford University Press.


[34] Gustavo A. Oliva, Ahmed E. Hassan, and Zhen Jiang. 2020. An Exploratory Study of Smart Contracts in the Ethereum Blockchain Platform. Empirical Software Engineering (EMSE) (03 2020). https://doi.org/10.1007/s10664-019-09796-5


[35] G. A. Pierro and H. Rocha. 2019. The Influence Factors on Ethereum Transaction Fees. In 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB). 24–31. https://doi.org/ 10.1109/WETSEB.2019.00010


[36] Rolando P. Reyes, Oscar Dieste, Efraín R. Fonseca, and Natalia Juristo. 2018. Statistical Errors in Software Engineering Experiments: A Preliminary Literature Review. In Proceedings of the 40th International Conference on Software Engineering (Gothenburg, Sweden) (ICSE ’18). Association for Computing Machinery, New York, NY, USA, 1195–1206. https://doi.org/10.1145/3180155.3180161


[37] 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’sd for evaluating group differences on the NSSE and other surveys?. In Annual meeting of the Florida Association of Institutional Research. 1–3.


[38] S. Rouhani and R. Deters. 2017. Performance analysis of ethereum transactions in private blockchain. In 2017 8th IEEE International Conference on Software Engineering and Service Science (ICSESS). 70–74. https://doi.org/10.1109/ICSESS.2 017.8342866


[39] A. J. Scott and M. Knott. 1974. A Cluster Analysis Method for Grouping Means in the Analysis of Variance. Biometrics 30, 3 (1974), 507–512. http://www.jstor.org/stable/2529204


[40] Christopher Signer. 2018. Gas Cost Analysis for Ethereum Smart Contracts. Master’s thesis. ETH Zurich, Department of Computer Science.


[41] Paulo Silva, David Vavricka, João Barreto, and Miguel Matos. 2020. Impact of Geo-distribution and Mining Pools on Blockchains: A Study of Ethereum (Practical Experience Report. In 50th IEEE-IFIP International Conference on Dependable Systems and Networks (DSN).


[42] Chakkrit Tantithamthavorn, Shane McIntosh, Ahmed E. Hassan, and Kenichi Matsumoto. 2017. An Empirical Comparison of Model Validation Techniques for Defect Prediction Models. 1 (2017).


[43] Sebastiano Vigna. 2019. Spectral Ranking. arXiv:0912.0238v15 [cs.IR]


[44] Gavin Wood. 2019. Ethereum: A secure decentralised generalised transaction ledger Byzantium version 7e819ec - 2019-10-20. https://ethereum.github.io/yellowpaper/paper.pdf


[45] Joseph Young. 2020. Ether Price Hits 2020 High: Key Reasons Why ETH Outperforms Others. https://cointelegraph.co m/news/ether-price-hits-2020-high-key-reasons-why-eth-outperforms-others. [Online; accessed 02-December-2018].


[46] Abdullah A. Zarir, Gustavo A. Oliva, Zhen M. (Jack) Jiang, and Ahmed E. Hassan. 2021. Developing Cost-Effective Blockchain-Powered Applications: A Case Study of the Gas Usage of Smart Contract Transactions in the Ethereum Blockchain Platform. ACM Trans. Softw. Eng. Methodol. (TOSEM) (2021). To appear.


[47] T. Zimmermann, A. Zeller, P. Weissgerber, and S. Diehl. 2005. Mining version histories to guide software changes. IEEE Transactions on Software Engineering 31, 6 (2005), 429–445.


[48] 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.


Authors:

(1) MICHAEL PACHECO, Software Analysis and Intelligence Lab (SAIL) at Queen’s University, Canada;

(2) GUSTAVO A. OLIVA, Software Analysis and Intelligence Lab (SAIL) at Queen’s University, Canada;

(3) GOPI KRISHNAN RAJBAHADUR, Centre for Software Excellence at Huawei, Canada;

(4) AHMED E. HASSAN, Software Analysis and Intelligence Lab (SAIL) at Queen’s University, Canada.


This paper is available on arxiv under CC BY-NC-ND 4.0 DEED license.


Trending Topics

blockchaincryptocurrencyhackernoon-top-storyprogrammingsoftware-developmenttechnologystartuphackernoon-booksBitcoinbooks