DOI QR코드

DOI QR Code

Cost Minimization of Solidity Smart Contracts on Blockchain Systems

  • Lee, Wan Yeon (Dept. of Computer Science, Dongduk Women's University)
  • Received : 2020.05.07
  • Accepted : 2020.05.15
  • Published : 2020.06.30

Abstract

Recently the blockchain technology has been actively studied due to its great potentiality. The smart contract is a key mechanism of the blockchain system. Due to the short history of the smart contract, many issues have not been solved yet. One main issue is vulnerability and another main issue is cost optimization. While the vulnerability of smart contract has been actively studied, the cost optimization has been rarely studied. In this paper, we propose two cost optimization methods for smart contracts running on the blockchain system. Triggering a function in a smart contract program code may require costs and it is repeated continuously. So the minimization of costs required to trigger a function of smart contract while maintaining the performance equally is very important. The proposed two methods minimize the usage of expensive permanent variables deployed on the blockchain system. We apply the proposed two methods to three prevalent blockchain platforms: Ethereum, Klaytn and Tron. Evaluation experiments verify that the proposed scheme significantly reduces the costs of functions in the smart contract written with Solidity.

Keywords

References

  1. Satoshi Nakamoto, Bitcoin: A Peer-to-Peer Electronic Cash System, Cryptography Mailing list at https://metzdowd.com, 2009.
  2. Gavin Wood (2014) Ethereum: A secured decentralized generalized transaction ledger, Ethereum project yellow paper 151: 1-32.
  3. Ethereum Smart Contract Security Best Practices, https://consensys.github.io/smart-contract-best-practices/
  4. EOS Smart Contract Security Best Practices, https://github.com/slowmist/eos-smart-contract-security-bestpractices/blob/master/README_EN.md
  5. S. Kalra, S. Goel, M. Dhawan and S. Sharma, "ZEUS: Analyzing Safety of Smart Contracts," Annual Network and Distributed System Security Symposium, vol. 25, Feb. 2018, DOI: https://doi.org/10.14722/ndss.2018.23092
  6. Sunbeom So, Myungho Lee, Jisu Park, Heejo Lee and Hakjoo Oh, "VERISMART: A Highly Precise Safety Verifier for Ethereum Smart Contract," IEEE Symposium on Security and Privacy, vol. 41, May 2020.
  7. OpenZeppelin, https://openzeppelin.com/contracts/
  8. Ting Chen, Xiaoqi Li, Xiapu Luo, Xiaosong Zhang, "Under-optimized Smart Contracts Devour Your Money," IEEE International Conference on Software Analysis, Evolution and Reengineering, vol. 24, Feb 2017, DOI: https://doi.org/10.1109/SANER.2017.7884650
  9. Wan Yeon Lee and Yun-Seok Choi, "Vulnerability and Cost Analysis of Heterogeneous Smart Contract Programs in Blockchain Systems," Current Trends in Computer Sciences and Applications (Mar. 2020), vol. 2, no. 1, pp. 142-145, DOI: https://doi.org/10.32474/CTCSA.2020.02.000126
  10. Estimating Transaction Costs of Ethereum, http://ethdocs.org/en/latest/contracts-and-transactions/account-typesgas-and-transactions.html#estimating-transaction-costs
  11. Transaction Fees of Klaytn, https://docs.klaytn.com/klaytn/design/transaction-fees
  12. Step Estimation of ICON, https://www.icondev.io/docs/transaction-fees
  13. EOSIO Developer Portal, https://developers.eos.io/
  14. Hyperledger Fabric, https://www.hyperledger.org/projects/fabric