ACM Transactions on Software Engineering and Methodology · 2022 · 31 citations · 6 references
ComputingComputer ScienceInformation TechnologyData StructuresSecure Software DevelopmentSoftware EngineeringAbstract Syntax TreesControl-flow AnalysisData-flow AnalysisSmart ContractsSoftware ConstructionStatic Code AnalysisAbstract Syntax Tree AnalysisControl Flow GraphsInformation Flow GraphsInheritance ModelingSecure Storage AnalysisSmart Contract SecuritySource Code AnalysisStorage
In migrating and upgrading an Ethereum smart contract, it is necessary to transfer both the code as well as the stored data. Various methods attempt to migrate or upgrade a smart contract, but they are mostly manual, error-prone, and applicable only before deployment. Further, they have challenges in extracting the storage state of complex mapping data structures along with their keys. In this work, we present Smartmuv as an automatic source-code-based static analysis tool to analyze and extract the state from the storage-trie of smart contracts. Based on the abstract syntax tree and the control flow graphs of the Solidity source code, the tool analyzes each state variable including mapping types along the inheritance hierarchy. It also provides the upgrade algorithm that initializes the extracted state in the constructor of new smart contract. Smartmuv safely approximates the origin of the keys used in the mapping to extract values and has been able to extract the mapping state of 23,673 smart contracts with 95.7% overall precision. Moreover, we also validate the Smartmuv’s extracted state with the third-party tool Etherscan.
6
Slither: A Static Analysis Framework for Smart Contracts
2019 · 758 citations · Full text
João F. Ferreira, Pedro E. D. Cruz, Thomas Durieux · 2020 · 144 citations
Gigahorse: Thorough, Declarative Decompilation of Smart Contracts
Neville Grech, Lexi Brent, Bernhard Scholz et al. · 2019 · 128 citations
Verifiable Smart Contract Portability
Martin Westerkamp · 2019 · 28 citations
Precise static modeling of Ethereum “memory”
Sifis Lagouvardos, Neville Grech, Ilias Tsatiris et al. · Proceedings of the ACM on Programming Languages · 2020 · 22 citations · Full text