Saving deployment costs of smart contracts by eliminating gas-wasteful patterns

Jaeyong Park, Daegeon Lee, Hoh Peter In

Research output: Contribution to journalArticlepeer-review

9 Citations (Scopus)


Smart contracts are blockchain-based programs that have developed with the emergence of Ethereum, one of the most well-known blockchains. Gas, paid in Ethers (i.e., the cryptocurrency in Ethereum), is required for the costs to upload and run smart contracts on Ethereum. As cost-inefficiently designed smart contracts result in unnecessary costs, it is vital to eliminate any gas-wasteful code fragments to optimize the deployment costs. In this study, we define five gas-wasteful patterns: ‘Over-public variables’, ‘Redundant initial values’, ‘Loose packing’, ‘Non-base unit types’, and ‘Non-constant variables’, based on the state variables in Solidity, the most commonly used implementation language for smart contracts in Ethereum. We also propose improvement methods related to these patterns and a solution to identify and eliminate the patterns. Furthermore, we analyze 143 real-world contracts deployed on Ethereum and find that 56% of them include the above-mentioned patterns. We also upgrade 43 of the pattern-matched contracts and demonstrate that their deployment costs are decreased on an average by 13.47%, and the most-reduced rate is 64%.

Original languageEnglish
Pages (from-to)53-64
Number of pages12
JournalInternational Journal of Grid and Distributed Computing
Issue number12
Publication statusPublished - 2017

Bibliographical note

Funding Information:
This research was supported by the MIST(Ministry of Science and ICT), Korea, under the National Program for Excellence in SW(2015-0-00936) supervised by the IITP(Institute for Information & communications Technology Promotion).

Publisher Copyright:
© 2017 SERSC Australia.


  • Cost
  • Ethereum
  • Gas
  • Pattern
  • Smart contract
  • Solidity

ASJC Scopus subject areas

  • General Computer Science


Dive into the research topics of 'Saving deployment costs of smart contracts by eliminating gas-wasteful patterns'. Together they form a unique fingerprint.

Cite this