Skip to main content
Top
Published in:

01-06-2024

Escalating Gas Cost Optimization in Smart Contract

Authors: S. Porkodi, D. Kesavaraja

Published in: Wireless Personal Communications | Issue 1/2024

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

In the technological globe, blockchain technology is expanding tremendously in every field where ledgers and security plays a role. The smart contract, as a significant part of the blockchain that automatically executes whenever the pre-conditions are satisfied for the business to proceed also ensures trust even among unknown parties and completely eradicates the middleman. In order to deploy or interact with a smart contract, the gas cost is to be paid in teams of ether or wei in the Ethereum blockchain network. The gas cost is mainly charged for the effort or computational power required to process the operations present in the transactions of the smart contract. The gas cost becomes overpriced, due to the increasing demand to process a huge number of transactions in the network and the inflation in the price of the cryptocurrency and the normal users of the network does not know how to determine gas price paid to the miners and ended up paying an overprice for processing their transactions quickly. So, there arises a need to optimize the gas cost and find the right strategy balancing both transaction cost and the wait time. In this paper, various approaches such as merge task, Unit256 vs. Uint8, data type preference, unnecessary libraries, dead code elimination, short circuiting and loop operation are proposed and techniques such as Monte-Carlo approach and M/M/1 queuing are experimented to reduce the gas cost in both the phases of contract generation and contract deployment in the Ethereum network. The proposed techniques can be utilized to reduce the overall gas cost also minimize the extortionate smart contract vulnerabilities thus, providing a way to develop optimized smart contracts and provide direction to contribute to future research.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Appendix
Available only for authorised users
Literature
2.
go back to reference Buterin, V., et al. (2014). A next-generation smart contract and decentralized application platform. England: White paper. Buterin, V., et al. (2014). A next-generation smart contract and decentralized application platform. England: White paper.
3.
go back to reference Ministry of Electronics & Information Technology (Meity) Government of India, NATIONAL STRATEGY ON BLOCKCHAIN Towards Enabling Trusted Digital Platforms, (2021) Ministry of Electronics & Information Technology (Meity) Government of India, NATIONAL STRATEGY ON BLOCKCHAIN Towards Enabling Trusted Digital Platforms, (2021)
7.
go back to reference Adelekan, O. A., Adisa, O., Ilugbusi, B. S., Obi, O. C., Awonuga, K. F., Asuzu, O. F., & Ndubuisi, N. L. (2024). Evolving tax compliance in the digital era: a comparative analysis of ai-driven models and blockchain technology in us tax administration. Comp Sci IT Res J, 5(2), 311–335.CrossRef Adelekan, O. A., Adisa, O., Ilugbusi, B. S., Obi, O. C., Awonuga, K. F., Asuzu, O. F., & Ndubuisi, N. L. (2024). Evolving tax compliance in the digital era: a comparative analysis of ai-driven models and blockchain technology in us tax administration. Comp Sci IT Res J, 5(2), 311–335.CrossRef
8.
go back to reference Pandya S, Raiyani A, Vaghela K (2023) A decentralized, secure, and transparent blockchain-enabled E-voting for Indian elections based on UIDAI aadhar identification. In: AIP Conference Proceedings, Vol. 2855, No. 1. AIP Publishing Pandya S, Raiyani A, Vaghela K (2023) A decentralized, secure, and transparent blockchain-enabled E-voting for Indian elections based on UIDAI aadhar identification. In: AIP Conference Proceedings, Vol. 2855, No. 1. AIP Publishing
9.
go back to reference Elisa, N., Yang, L., Chao, F., & Cao, Y. (2023). A framework of blockchain-based secure and privacy-preserving E-government system. Wirel Netw, 29(3), 1005–1015.CrossRef Elisa, N., Yang, L., Chao, F., & Cao, Y. (2023). A framework of blockchain-based secure and privacy-preserving E-government system. Wirel Netw, 29(3), 1005–1015.CrossRef
10.
go back to reference Jaramillo-Alcazar, A., Govea, J., & Villegas-Ch, W. (2023). Advances in the optimization of vehicular traffic in smart cities: Integration of blockchain and computer vision for sustainable mobility. Sustainability, 15(22), 15736.CrossRef Jaramillo-Alcazar, A., Govea, J., & Villegas-Ch, W. (2023). Advances in the optimization of vehicular traffic in smart cities: Integration of blockchain and computer vision for sustainable mobility. Sustainability, 15(22), 15736.CrossRef
12.
go back to reference Roughgarden T (2020) Transaction fee mechanism design for the Ethereum blockchain: An economic analysis of EIP-1559. arXiv preprint arXiv:2012.00854 Roughgarden T (2020) Transaction fee mechanism design for the Ethereum blockchain: An economic analysis of EIP-1559. arXiv preprint arXiv:​2012.​00854
13.
go back to reference Youssef Faqir-Rhazoui, Miller-Janny Ariza-Garzón, Javier A, and Samer H (2021) Effect of the Gas Price Surges on User Activity in the DAOs of the Ethereum Blockchain. In: Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems (CHI EA '21). Association for Computing Machinery, New York, NY, USA, Article 407, pp 1–7. https://doi.org/10.1145/3411763.3451755 Youssef Faqir-Rhazoui, Miller-Janny Ariza-Garzón, Javier A, and Samer H (2021) Effect of the Gas Price Surges on User Activity in the DAOs of the Ethereum Blockchain. In: Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems (CHI EA '21). Association for Computing Machinery, New York, NY, USA, Article 407, pp 1–7. https://​doi.​org/​10.​1145/​3411763.​3451755
15.
go back to reference Zhang P, Feng X and Xiapu L (2020) A framework and dataset for bugs in ethereum smart contracts. In: 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, arXiv:2009.02066 Zhang P, Feng X and Xiapu L (2020) A framework and dataset for bugs in ethereum smart contracts. In: 2020 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, arXiv:​2009.​02066
16.
go back to reference Christof FT, Mathis S, and Radu S (2019) The art of the scam: demystifying honeypots in ethereum smart contracts. In: Proceedings of the 28th USENIX Conference on Security Symposium (SEC'19). USENIX Association, USA, pp 1591–1607 Christof FT, Mathis S, and Radu S (2019) The art of the scam: demystifying honeypots in ethereum smart contracts. In: Proceedings of the 28th USENIX Conference on Security Symposium (SEC'19). USENIX Association, USA, pp 1591–1607
17.
go back to reference Loi L, Duc-Hiep C, Hrishi O, Prateek S, Aquinas H (2016) Making Smart Contracts Smarter. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (CCS '16). Association for Computing Machinery, New York, NY, USA, pp 254–269. https://doi.org/10.1145/2976749.2978309 Loi L, Duc-Hiep C, Hrishi O, Prateek S, Aquinas H (2016) Making Smart Contracts Smarter. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (CCS '16). Association for Computing Machinery, New York, NY, USA, pp 254–269. https://​doi.​org/​10.​1145/​2976749.​2978309
18.
go back to reference Tikhomirov S, Voskresenskaya E, Ivanitskiy I, Takhaviev R, Marchenko E, Alexandrov Y (2018) SmartCheck: Static Analysis of Ethereum Smart Contracts. In: 2018 IEEE/ACM 1st International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB), pp 9–16 Tikhomirov S, Voskresenskaya E, Ivanitskiy I, Takhaviev R, Marchenko E, Alexandrov Y (2018) SmartCheck: Static Analysis of Ethereum Smart Contracts. In: 2018 IEEE/ACM 1st International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB), pp 9–16
20.
go back to reference Chen T et al. (2018) Towards Saving Money in Using Smart Contracts. In: 2018 IEEE/ACM 40th International Conference on Software Engineering: New Ideas and Emerging Technologies Results (ICSE-NIER), pp 81–84 Chen T et al. (2018) Towards Saving Money in Using Smart Contracts. In: 2018 IEEE/ACM 40th International Conference on Software Engineering: New Ideas and Emerging Technologies Results (ICSE-NIER), pp 81–84
26.
go back to reference Easley, D., O’Hara, M., & Basu, S. (2019). From mining to markets: the evolution of bitcoin transaction fees. J Financial Eco, 134(1), 91–109.CrossRef Easley, D., O’Hara, M., & Basu, S. (2019). From mining to markets: the evolution of bitcoin transaction fees. J Financial Eco, 134(1), 91–109.CrossRef
27.
go back to reference Tedeschi, E., Nordmo, T.-A.S., Johansen, D., & Johansen, H. D. (2022). On optimizing transaction fees in bitcoin using ai: Investigation on miners inclusion pattern. ACM Trans Internet Techn (TOIT), 22(3), 1–28.CrossRef Tedeschi, E., Nordmo, T.-A.S., Johansen, D., & Johansen, H. D. (2022). On optimizing transaction fees in bitcoin using ai: Investigation on miners inclusion pattern. ACM Trans Internet Techn (TOIT), 22(3), 1–28.CrossRef
29.
go back to reference Pierro, G. A., Rocha, H., Ducasse, S., Marchesi, M., & Tonelli, R. (2022). A user-oriented model for oracles’ gas price prediction, Future Generat. Comp Syst, 128, 142–157. Pierro, G. A., Rocha, H., Ducasse, S., Marchesi, M., & Tonelli, R. (2022). A user-oriented model for oracles’ gas price prediction, Future Generat. Comp Syst, 128, 142–157.
Metadata
Title
Escalating Gas Cost Optimization in Smart Contract
Authors
S. Porkodi
D. Kesavaraja
Publication date
01-06-2024
Publisher
Springer US
Published in
Wireless Personal Communications / Issue 1/2024
Print ISSN: 0929-6212
Electronic ISSN: 1572-834X
DOI
https://doi.org/10.1007/s11277-024-11066-7