Papers1 provider · 1 record
August 14, 2023· Research Square
preprint
Open access

Sound analysis and extraction of data from Smart Contract

Abstract

Abstract With the addition of multiple blockchain platforms in the ecosystem, the Dapp owners need to migrate their smart contracts from one platform to another to remain competitive , cost-effective, and secure. A smart contract is a piece of code that contain logic and data. To migrate a smart contract, whether it’s on the same blockchain platform or a different one, we need both its source code that represents the logic and data which indicate the state of the contract. The source code can be easily set up, but to complete the migration, we have to extract the current state of the contract. In this paper, we have developed an advanced state extraction technique that uses static analysis to analyze the smart contract’s call graph and events, and extracts the entire storage state from the storage trie, along with the proper associations across function calls, enabling users to visualize, manage, and transform the state as desired for migration. The soundness of the extracted state was confirmed using the method of abstract interpretation. Further, the migration adapter is designed that transform extracted state into slot-value pair and migrated it to the target blockchain. Our new approach has allowed us to analyze 14% more smart contracts with the extraction of 15% more data from 67,993 contracts, and migrate some of them to the Polygon test-net.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.