[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to main content

Step on the Gas? A Better Approach for Recommending the Ethereum Gas Price

  • Conference paper
  • First Online:
Mathematical Research for Blockchain Economy

Abstract

In the Ethereum network, miners are incentivized to include transactions in a block depending on the gas price specified by the sender. The sender of a transaction therefore faces a trade-off between timely inclusion and cost of his transaction. Existing recommendation mechanisms aggregate recent gas price data on a per-block basis to suggest a gas price. We perform an empirical analysis of historic block data to motivate the use of a predictive model for gas price recommendation. Subsequently, we propose a novel mechanism that combines a deep-learning based price forecasting model as well as an algorithm parameterized by a user-specific urgency value to recommend gas prices. In a comprehensive evaluation on real-world data, we show that our approach results on average in costs savings of more than 50% while only incurring an inclusion delay of 1.3 blocks, when compared to the gas price recommendation mechanism of the most widely used Ethereum client.

Sam M. Werner—The author would like to thank the Brevan Howard Centre for Financial Analysis for its financial support.

Daniel Perez—The author would like to thank the Tezos Foundation for its financial support.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 103.50
Price includes VAT (United Kingdom)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 129.99
Price includes VAT (United Kingdom)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
GBP 129.99
Price includes VAT (United Kingdom)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Note that via a hard-fork, the Ethereum Improvement Proposal 150  [3] re-aligned gas costs for instructions involving I/O-heavy operations.

  2. 2.

    At the time of writing the average block gas limit was around 10,000,000 units of gas.

References

  1. Ethgasstation. (2020). https://ethgasstation.info/. [Online; Accessed 14-January-2020].

  2. Albert, E., Gordillo, P., Rubio, A., & Sergey, I. (2018, November). GASTAP: A gas analyzer for smart contracts. CoRR, abs/1811.1.

    Google Scholar 

  3. Buterin, V. (2019). EIP 150: Gas cost changes for IO-heavy operations. https://eips.ethereum.org/EIPS/eip-150. [Online; Accessed 05-June-2019].

  4. Buterin, V. (2014). A next-generation smart contract and decentralized application platform. Ethereum, (January), 1–36.

    Google Scholar 

  5. Chen, T., Li, X., Luo, X., Zhang, X. (2017). Under-optimized smart contracts devour your money. In SANER 2017 - 24th IEEE International Conference on Software Analysis, Evolution, and Reengineering (pp. 442–446).

    Google Scholar 

  6. Chen, T., Li, X., Wang, Y., Chen, J., Li, Z., Luo, X., et al. (2017). An adaptive gas cost mechanism for ethereum to defend against under-priced dos attacks. In J. K. Liu & P. Samarati (Eds.), Information security practice and experience (pp. 3–24). Cham: Springer International Publishing.

    Google Scholar 

  7. Cho, K., van Merrienboer, B., Gülçehre, Ç., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning phrase representations using RNN encoder-decoder for statistical machine translation. CoRR, arXiv:1406.1078.

  8. Dannen, C. (2017). Introducing ethereum and solidity: Foundations of cryptocurrency and blockchain programming for beginners (1st ed.). Berkely, CA, USA: Apress.

    Google Scholar 

  9. etherchain.org. (2020). Gas price oracle. https://www.etherchain.org/tools/gasPriceOracle. [Online; Accessed 15-January-2020].

  10. ethernodes.org. (2020). Ethereum mainnet statistics. https://www.ethernodes.org/. [Online; Accessed 15-January-2020].

  11. Etherscan. (2020). Ethereum average block time chart. https://etherscan.io/chart/blocktime. Accessed 28-January-2020.

  12. Github. (2020). Gasstation-express. https://github.com/ethgasstation/gasstation-express-oracle. [Online; Accessed 15-January-2020].

  13. Github. (2020). Official go implementation of the ethereum protocol. https://github.com/ethereum/go-ethereum/. [Online; Accessed 14-January-2020].

  14. Github. (2020). Parity ethereum: The fastest and most advanced ethereum client. https://github.com/paritytech/parity-ethereum. [Online; Accessed 16-January-2020].

  15. Grech, N., Kong, M., Jurisevic, A., Brent, L., Scholz, B., & Smaragdakis, Y. (2018). MadMax: Surviving out-of-gas conditions in ethereum smart contracts. SPLASH 2018 Oopsla, 2(October).

    Google Scholar 

  16. Harz, D., & Knottenbelt, W. (2018). Towards safer smart contracts: A survey of languages and verification methods. arXiv preprint arXiv:1809.09805.

  17. Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.

    Article  Google Scholar 

  18. Kingma, D. P., & Ba, J. (2014). Adam: A method for stochastic optimization.

    Google Scholar 

  19. Marescotti, M., Blicha, M., Hyvärinen, A. E. J., Asadi, S., & Sharygina, N. (2018). Computing exact worst-case gas consumption for smart contracts. In T. Margaria & B. Steffen (Eds.), Leveraging applications of formal methods, verification and validation. Industrial practice (pp. 450–465). Cham: Springer International Publishing.

    Google Scholar 

  20. Nakamoto, S. (2008, December). Bitcoin: A peer-to-peer electronic cash system. https://bitcoin.org/bitcoin.pdf. Accessed: 2015-07-01.

  21. Perez, D., & Livshits, B. (2019). Broken metre: Attacking resource metering in EVM. arXiv preprint arXiv:1909.07220.

  22. Pierro, G. A., & Rocha, H. (2019). The influence factors on ethereum transaction fees. In 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB) (pp. 24–31). IEEE.

    Google Scholar 

  23. Pritz, P. J., Perez, D., & Leung, K. K. (2020). Fast-fourier-forecasting resource utilisation in distributed systems.

    Google Scholar 

  24. PyTorch Contributors. (2019). PyTorch online documentation. https://pytorch.org/docs. Accessed 13-August-2019.

  25. Station, M. E. G. (2017). Gasstation express: A simple gas price oracle for anyone running a full ethereum node. https://medium.com/@ethgasstation/gasstation-express-a-simple-gas-price-oracle-for-anyone-running-a-full-ethereum-node-f1bde46260f5. [Online; Accessed 15-January-2020].

  26. Wood, G. (2014). Ethereum yellow paper.

    Google Scholar 

  27. Yang, R., Murray, T., Rimba, P., & Parampalli, U. (2019). Empirically analyzing ethereum’s gas mechanism. CoRR, abs/1905.0.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sam M. Werner .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Werner, S.M., Pritz, P.J., Perez, D. (2020). Step on the Gas? A Better Approach for Recommending the Ethereum Gas Price. In: Pardalos, P., Kotsireas, I., Guo, Y., Knottenbelt, W. (eds) Mathematical Research for Blockchain Economy. Springer Proceedings in Business and Economics. Springer, Cham. https://doi.org/10.1007/978-3-030-53356-4_10

Download citation

Publish with us

Policies and ethics