Verification of Smart Contracts using the Interactive Theorem Prover Agda

dc.contributor.advisorSetzer, Anton
dc.contributor.authorAlhabardi, Fahad
dc.date.accessioned2024-07-30T07:00:16Z
dc.date.available2024-07-30T07:00:16Z
dc.date.issued2024-07-25
dc.description.abstractThe goal of this thesis is to verify smart contracts in Blockchain. In particular, we focus on smart contracts in Bitcoin and Solidity. In order to specify the correctness of smart contracts, we use weakest preconditions. For this, we develop a model of smart contracts in the interactive theorem prover and dependent type programming language Agda and prove the correctness of smart contracts in it. In the context of Bitcoin, our verification of Bitcoin scripts consists of non-conditional and conditional scripts. For Solidity, we refer to programs using object- oriented features of Solidity, such as calling of other contracts, full recursion, and the use of gas in order to guarantee termination while having a Turing-complete language. We have developed a simulator for Solidity-style smart contracts. As a main example, we executed a reentrancy attack in our model. We have verified smart contracts in Bitcoin and Solidity using weakest precondition in Agda. Furthermore, Agda, combined with the fact that it is a theorem prover and programming language, allows the writing of verified programs, where the verification takes place in the same language in which the program is written, avoiding the problem of translation from one language to another (with possible translation mistakes).
dc.format.extent929
dc.identifier.urihttps://hdl.handle.net/20.500.14154/72739
dc.language.isoen
dc.publisherSwansea University
dc.subjectAccess control
dc.subjectSecurity
dc.subjectVerification
dc.subjectProvable correctness
dc.subjectWeakest precondition
dc.subjectPrecondition
dc.subjectPostcondition
dc.subjectSymbolic execution
dc.subjectAgda proof assistant
dc.subjectSolidity
dc.subjecttheorem prover
dc.subjectModel of Solidity-style
dc.subjectBlockchain
dc.subjectReentrancy attacks
dc.subjectBitcoin
dc.subjectEthereum
dc.subjectInterface
dc.subjectSimulator
dc.subjectBlockchain control flow
dc.subjectOperational semantics
dc.subjectHoare logic
dc.subjectBitcoin script
dc.subjectP2PKH
dc.subjectP2MS
dc.subjectPredicate transformer semantics
dc.subjectSmart contracts
dc.titleVerification of Smart Contracts using the Interactive Theorem Prover Agda
dc.typeThesis
sdl.degree.departmentComputer Science
sdl.degree.disciplineComputer Science
sdl.degree.grantorSwansea
sdl.degree.nameDoctor of Philosophy

Files

Copyright owned by the Saudi Digital Library (SDL) © 2024