Banerjee, AvikAvikBanerjeeEgge, CarlCarlEggeSchulte, StefanStefanSchulte2024-09-192024-09-192024-05Proceedings 2024 IEEE International Conference on Blockchain and Cryptocurrency (ICBC): 365-367979-8-3503-1675-9979-8-3503-1674-2https://hdl.handle.net/11420/49129Second-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.enblockchaincode-miningsiamese neural networksmart contractsSolidityMLE@TUHHTechnology::620: EngineeringTowards the optimization of gas usage of solidity smart contracts with code miningConference Paper10.1109/ICBC59979.2024.10634345Conference Paper