University of Toronto
Verification and Optimization of Smart Contracts using Model Checking Framework
Abstract
dc:description.abstractSmart contracts have emerged as a fundamental component in the dynamic realm of blockchaintechnology, facilitating automated transactions and agreements within an environment devoid of trust. Nevertheless, the irreversible characteristic of blockchain ensures that any vulnerabilities in the code of a smart contract are not only permanent but also potentially exploitable; this emphasizes the critical requirement for thorough verification. This thesis presents the notion of utilizing a model checking framework as an essential instrument in the process of verification. Model checking provides an all-encompassing and automated methodology for identifying errors, vulnerabilities, and deviations from intended behavior in smart contracts. This ensures the dependability and security of such contracts in the era of digitalization. This thesis presents VeriSolid, a model verification framework designed specifically for inter- acting smart contracts. A Solidity Deployment Diagram (SDD) is incorporated into the framework to enable the direct deployment of verified contracts to a blockchain. This endeavor is dedicated to the verification and establishment of standards pertaining to templated contracts, such as ERC20 and ERC721. The experimental findings indicate that 4% of ERC20 contracts and 18% of ERC721 contracts on the Ethereum blockchain fail to satisfy the stipulations of the aforementioned standards, rendering them susceptible to attacks. The subsequent area of emphasis in this thesis pertains to the construction of a framework for model checking based on natural language. This framework has the capability of generating verified smart contracts that validate to a specification. The aforementioned framework additionally incor- porated the modeling of access control policies and the establishment of a rigid sequence for smart contract actions when required via the Contract Priority Diagram (CPD). Using this framework, four categories of Move smart contracts have been generated and verified. A gas optimization methodology for smart contracts has been proposed. An implementation of the approach utilizing off-the-shelf tools is presented. 72 solidity smart contracts were optimized. The average reduction in gas expenses per transaction is around 23, 943 gas units.
Degree
thesis:*- Department dc:contributor.department
- Electrical and Computer Engineering
- Year dc:date.issued
- 2024
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Keerthi, Nelaturu
- Advisor dc:contributor.advisor
-
- Veneris, Andreas
Subjects
dc:subject × 6Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/1807/140973