Characterizing efficiency optimizations in solidity smart contracts
IEEE International Conference on Blockchain (Blockchain 2020); 281-290 (2020)
Contribution to Conference
On many blockchain platforms, gas fees have to be paid for deploying and executing smart contracts. These fees depend on the size of the contract code as well as the needed computational steps and required storage space of a smart contract. Because of the large amount of gas cost paid each day, there is an inherent motivation to optimize smart contract code in order to reduce these cost.Within this paper, we discuss the application of 25 strategies for code optimization to Solidity smart contracts. A prototype is developed which detects potential optimizations and partially automatically optimizes the code accordingly. The optimization strategies are evaluated based on 3,018 verified open source smart contracts from etherscan.io. We find 471 rule violations in the test data spread across 204 different contract files.