Papers1 provider Ā· 1 record
December 18, 2022Ā· 2022 IEEE International Conference on Advanced Networks and Telecommunications Systems (ANTS)
conference-paper

Gas Fee Reduction by Detecting Loop Fusible Patterns in Ethereum Smart Contract

Authors:Kawaldeep KaurShubham TomarMeenakshi Tripathi

Abstract

Smart contracts are full-fledged programs that runs on Blockchains. The largest Blockchain-based platform is Ethereum. It facilitates Smart Contracts, written in a programming language called Solidity, to run on the virtual machine. Ethereum charges developers an execution fee in the form of Gas used to purchase computing resources. In this paper, we discovered that the Solidity compiler could not do loop optimization, Code refactoring, and Dead code elimination. Solidity can not perform other optimization like detecting duplicate writes, inefficient use of data types, Inefficient use of global variables, etc. Furthermore, thus Smart Contracts which are not optimized cost more Gas. Smart contracts contain costly Gas byte codes, contributing to various Gas expensive patterns. In this study, we found that many Smart Contracts contain mergeable loops. Based on symbolic execution, we developed a method called GASaVER to detect merge-able loops that can merge to reduce the bytecode size and the Gas fee charged, achievable because costly Gas patterns have a sequence that can be replaced by ones with the same semantics but requires less Gas.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.