GaSaver: A Static Analysis Tool for Saving Gas
IEEE Transactions on Sustainable Computing · 01.04.2023 · 8 (2) · 257-267
DOI: 10.1109/tsusc.2022.3221444 ↗Kurz gefasst
Fachartikel in der Zeitschrift IEEE Transactions on Sustainable Computing, erschienen am 01.04.2023. Verfasst von Ziyi Zhao und 3 weiteren Autor:innen. Die Arbeit wurde bisher 9-mal zitiert (Crossref) und nennt 44 Literaturangaben. Gefördert von: National Key R&D Program of China, National Natural Science Foundation of China.
Abstract (Originalsprache)
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.
Förderung
- National Key R&D Program of China
- National Natural Science Foundation of China
Zitieren
APA
Zhao, Z., Li, J., Su, Z., & Wang, Y. (2023). GaSaver: A Static Analysis Tool for Saving Gas. IEEE Transactions on Sustainable Computing, 8(2), 257-267. https://doi.org/10.1109/tsusc.2022.3221444
Vancouver
Zhao Z, Li J, Su Z, Wang Y. GaSaver: A Static Analysis Tool for Saving Gas. IEEE Transactions on Sustainable Computing. 2023;8(2):257-267. doi:10.1109/tsusc.2022.3221444
BibTeX
@article{Zhao2023,
author = {Zhao, Ziyi and Li, Jiliang and Su, Zhou and Wang, Yuyi},
title = {GaSaver: A Static Analysis Tool for Saving Gas},
journal = {IEEE Transactions on Sustainable Computing},
year = {2023},
volume = {8},
number = {2},
pages = {257--267},
doi = {10.1109/tsusc.2022.3221444}
}
EUVIMED