Loading [MathJax]/extensions/MathZoom.js
Static Profiling and Optimization of Ethereum Smart Contracts Using Resource Analysis | IEEE Journals & Magazine | IEEE Xplore

Static Profiling and Optimization of Ethereum Smart Contracts Using Resource Analysis


In this work we adapt a generic resource analyzer to use it as a static profiler, generating upper-bound expressions that can distribute the cost between the different pa...

Abstract:

Profiling tools have been widely used for studying the behavior of the programs with the objective of reducing the amount of resources consumed by them. Most profilers co...Show More

Abstract:

Profiling tools have been widely used for studying the behavior of the programs with the objective of reducing the amount of resources consumed by them. Most profilers collect the information with dynamic techniques, i.e., execute an instrumented version of the program with some specific input arguments to profile the measures of interest. This article presents a novel static profiling technique for Ethereum smart contracts that, using static resource analysis, is able to generate upper-bound expressions that can be used to produce profiling information about the measure of interest. Unlike traditional profiling tools, we get upper-bounds on the measures of interest expressed in terms of the input arguments or the state variables of the smart contracts. The information that can be obtained by the upper-bounds allows us to detect gas-expensive fragments of a Solidity program or to spot resource-related vulnerabilities at specific program points of the program. Moreover, in this article we propose an automatic optimization of Solidity programs which reduces their gas consumption replacing the accesses to state variables by gas-efficient accesses to local variables. We have experimentally evaluated our technique and we have detected that 6.81% of the public functions analyzed can be optimized and 1.43% are vulnerable to execute arbitrary code.
In this work we adapt a generic resource analyzer to use it as a static profiler, generating upper-bound expressions that can distribute the cost between the different pa...
Published in: IEEE Access ( Volume: 9)
Page(s): 25495 - 25507
Date of Publication: 05 February 2021
Electronic ISSN: 2169-3536

Funding Agency:


References

References is not available for this document.