跳到主要导航 跳到搜索 跳到主要内容

GaSaver: A Static Analysis Tool for Saving Gas

  • Xi'an Jiaotong University
  • Swiss Federal Institute of Technology Zurich
  • CRRC Corporation Limited

科研成果: 期刊稿件文章同行评审

8 引用 (Scopus)

摘要

Smart contracts are programs running on Ethereum, whose deployment and use require gas. Gas measures the cost of performing specific operations as an index designed to quantify the computing power consumption. Existing unoptimized smart contracts make contract developers and users spend extra gas. To save gas and optimize smart contracts, this paper proposes a new tool named GaSaver for automatically detecting gas-expensive patterns based on Solidity source code. Specifically, we first identify 12 gas-expensive patterns in smart contracts and classify them into three categories: storage-related, judgment-related, and loop-related. Then, we deploy gas-expensive patterns and group them into three levels according to gas waste degree. By conducting extensive experiments on real data sets, we find that 89.68% of the 1172 smart contracts suffer from gas-expensive patterns, 94.27% of 1100 new smart contracts are gas-expensive, and 80.56% of 72 widely used smart contracts are affected. Finally, the experiment results show that the proposed GaSaver can effectively optimize smart contracts. Besides, the proportion of gas-expensive cases in widely used smart contracts is lower than that in the newly released smart contracts.

源语言英语
页(从-至)257-267
页数11
期刊IEEE Transactions on Sustainable Computing
8
2
DOI
出版状态已出版 - 1 4月 2023

联合国可持续发展目标

此成果有助于实现下列可持续发展目标:

  1. 可持续发展目标 7 - 经济适用的清洁能源
    可持续发展目标 7 经济适用的清洁能源

学术指纹

探究 'GaSaver: A Static Analysis Tool for Saving Gas' 的科研主题。它们共同构成独一无二的指纹。

引用此