![]() ![]() In this paper, we propose the first system named STAN to generate descriptions for the bytecodes of smart contracts to help users comprehend them. Although a few decompilers for smart contracts have been recently proposed, it is still not easy for users to grasp the semantic information of the contract, not to mention the potential misleading due to decompilation errors. However, less than 1% of deployed smart contracts are open-source, and it is difficult for users to understand the functionality and internal mechanism of those closed-source contracts. More than eight million smart contracts have been deployed into Ethereum, which is the most popular blockchain that supports smart contract. Manual investigation demonstrates that only 2.5% of discovered gas-inefficient instances are false positives. ![]() ![]() The empirical study demonstrates that lots of real smart contracts contain various inefficient code. Extensive experiments show that GasChecker scales well with the increase of workers. To make our approach scalable to analyze millions of smart contracts, we parallelize SE by tailoring it to the MapReduce programming model, and propose a new feedback-based load balancing strategy to effectively utilize cloud resources. More precisely, we first summarize ten gas-inefficient programming patterns and propose a new approach based on symbolic execution (SE) to detect them in the bytecode of smart contracts. In this paper, we propose and develop the first tool, named GasChecker, for automatically identifying gas-inefficient code in smart contracts, and conduct the first empirical study on the prevalence of gas-inefficient code in the deployed smart contracts. Consequently, smart contracts with inefficient code will waste money. The amount of transaction fee depends on the size of that contract and the operations executed by that contract. Ethereum, the largest blockchain for running smart contracts, charges the people who send transactions to deploy or invoke smart contracts for thwarting resource abuse.
0 Comments
Leave a Reply. |