Verification of Bitcoin Script in Agda using Weakest Preconditions for Access Control
Fahad F. Alhabardi, Arnold Beckmann, Bogdan Lazar, Anton Setzer

TL;DR
This paper presents a formal verification approach for Bitcoin scripts in Agda, focusing on access control properties using weakest preconditions and Hoare triples, demonstrated on standard Bitcoin transaction scripts.
Contribution
It introduces a formal methodology for verifying Bitcoin scripts' access control using weakest preconditions in Agda, bridging the gap between user requirements and formal specifications.
Findings
Formalized operational semantics of Bitcoin scripts in Agda
Developed two methods for deriving human-readable weakest preconditions
Verified correctness of P2PKH and P2MS Bitcoin scripts
Abstract
This paper contributes to the verification of programs written in Bitcoin's smart contract language SCRIPT in the interactive theorem prover Agda. It focuses on the security property of access control for SCRIPT programs that govern the distribution of Bitcoins. It advocates that weakest preconditions in the context of Hoare triples are the appropriate notion for verifying access control. It aims at obtaining human-readable descriptions of weakest preconditions in order to close the validation gap between user requirements and formal specification of smart contracts. As examples for the proposed approach, the paper focuses on two standard SCRIPT programs that govern the distribution of Bitcoins, Pay to Public Key Hash (P2PKH) and Pay to Multisig (P2MS). The paper introduces an operational semantics of the SCRIPT commands used in P2PKH and P2MS, which is formalised in the Agda proof…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
