Options
Towards the optimization of gas usage of solidity smart contracts with code mining
Publikationstyp
Conference Paper
Publikationsdatum
2024-05
Sprache
English
Author
Start Page
365
End Page
367
Citation
Proceedings 2024 IEEE International Conference on Blockchain and Cryptocurrency (ICBC): 365-367
Contribution to Conference
Publisher DOI
Scopus ID
Publisher
IEEE
ISSN
IEEE
ISBN
979-8-3503-1675-9
979-8-3503-1674-2
Second-generation blockchains like Ethereum allow users to execute smart contracts. Usually, blockchains charge gas fees for deploying and invocating smart contracts. These costs can be significant and even render some use cases non-economical. Therefore, optimizing smart contracts regarding gas costs is a significant achievement, and several approaches have already been presented. However, existing methods of gas cost minimization are often based on rule-based code optimization techniques, which can perform only a subset of possible optimizations and cannot detect outlying and uncommon code patterns.Therefore, this paper discusses using machine learning methods to detect a more cost-efficient version of a Solidity smart contract. This approach trains a Siamese neural network to detect the similarity between a contract and its optimized version, providing the basis for informing the user about existing optimizing patterns. We evaluate our approach using a repository of 30,432 Solidity smart contracts.
Schlagworte
blockchain
code-mining
siamese neural network
smart contracts
Solidity
DDC Class
620: Engineering