Saving Deployment Costs of Smart Contracts by Eliminating Gas-wasteful Patterns
- Authors
- Park, JaeYong; Lee, Daegeon; In, Hoh Peter
- Issue Date
- 12월-2017
- Publisher
- SCIENCE & ENGINEERING RESEARCH SUPPORT SOC
- Keywords
- Smart contract; Ethereum; Solidity; Gas; Cost; Pattern
- Citation
- INTERNATIONAL JOURNAL OF GRID AND DISTRIBUTED COMPUTING, v.10, no.12, pp.53 - 64
- Indexed
- SCOPUS
- Journal Title
- INTERNATIONAL JOURNAL OF GRID AND DISTRIBUTED COMPUTING
- Volume
- 10
- Number
- 12
- Start Page
- 53
- End Page
- 64
- URI
- https://scholar.korea.ac.kr/handle/2021.sw.korea/81283
- DOI
- 10.14257/ijgdc.2017.10.12.06
- ISSN
- 2005-4262
- Abstract
- 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%.
- Files in This Item
- There are no files associated with this item.
- Appears in
Collections - Graduate School > Department of Computer Science and Engineering > 1. Journal Articles
Items in ScholarWorks are protected by copyright, with all rights reserved, unless otherwise indicated.