Blockchain ledgers based on the extended UTxO model support fully expressive smart contracts to specify permissions for performing certain actions, such as spending transaction outputs or minting assets. There have been some attempts to standardize the implementation of stateful programs using this infrastructure, with varying degrees of success. To remedy this, we introduce the framework of structured contracts to formalize what it means for a stateful program to be correctly implemented on the ledger. Using small-step semantics, our approach relates low-level ledger transitions to high-level transitions of the smart contract being specified, thus allowing users to prove that their abstract specification is adequately realized on the blockchain. We argue that the framework is versatile enough to cover a range of examples, in particular proving the equivalence of multiple concrete implementations of the same abstract specification. Building upon prior meta-theoretical results, our results have been mechanized in the Agda proof assistant, paving the way to rigorous verification of smart contracts.
@InProceedings{vinogradova_et_al:OASIcs.FMBC.2024.10, author = {Vinogradova, Polina and Melkonian, Orestis and Wadler, Philip and Chakravarty, Manuel and Krijnen, Jacco and Jones, Michael Peyton and Chapman, James and Ferariu, Tudor}, title = {{Structured Contracts in the EUTxO Ledger Model}}, booktitle = {5th International Workshop on Formal Methods for Blockchains (FMBC 2024)}, pages = {10:1--10:19}, series = {Open Access Series in Informatics (OASIcs)}, ISBN = {978-3-95977-317-1}, ISSN = {2190-6807}, year = {2024}, volume = {118}, editor = {Bernardo, Bruno and Marmsoler, Diego}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/OASIcs.FMBC.2024.10}, URN = {urn:nbn:de:0030-drops-198757}, doi = {10.4230/OASIcs.FMBC.2024.10}, annote = {Keywords: blockchain, ledger, smart contract, formal verification, specification, transition systems, Agda, UTxO, EUTxO, small-step semantics} }
Feedback for Dagstuhl Publishing