Massimo Bartoletti, Stefano Lande, Maurizio Murgia, R. Zunino
{"title":"Verifying liquidity of recursive Bitcoin contracts","authors":"Massimo Bartoletti, Stefano Lande, Maurizio Murgia, R. Zunino","doi":"10.46298/lmcs-18(1:22)2022","DOIUrl":null,"url":null,"abstract":"Smart contracts - computer protocols that regulate the exchange of\ncrypto-assets in trustless environments - have become popular with the spread\nof blockchain technologies. A landmark security property of smart contracts is\nliquidity: in a non-liquid contract, it may happen that some assets remain\nfrozen, i.e. not redeemable by anyone. The relevance of this issue is witnessed\nby recent liquidity attacks to Ethereum, which have frozen hundreds of USD\nmillions. We address the problem of verifying liquidity on BitML, a DSL for\nsmart contracts with a secure compiler to Bitcoin, featuring primitives for\ncurrency transfers, contract renegotiation and consensual recursion. Our main\nresult is a verification technique for liquidity. We first transform the\ninfinite-state semantics of BitML into a finite-state one, which focusses on\nthe behaviour of a chosen set of contracts, abstracting from the moves of the\ncontext. With respect to the chosen contracts, this abstraction is sound, i.e.\nif the abstracted contract is liquid, then also the concrete one is such. We\nthen verify liquidity by model-checking the finite-state abstraction. We\nimplement a toolchain that automatically verifies liquidity of BitML contracts\nand compiles them to Bitcoin, and we assess it through a benchmark of\nrepresentative contracts.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"101 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-11-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Log. Methods Comput. Sci.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.46298/lmcs-18(1:22)2022","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
Smart contracts - computer protocols that regulate the exchange of
crypto-assets in trustless environments - have become popular with the spread
of blockchain technologies. A landmark security property of smart contracts is
liquidity: in a non-liquid contract, it may happen that some assets remain
frozen, i.e. not redeemable by anyone. The relevance of this issue is witnessed
by recent liquidity attacks to Ethereum, which have frozen hundreds of USD
millions. We address the problem of verifying liquidity on BitML, a DSL for
smart contracts with a secure compiler to Bitcoin, featuring primitives for
currency transfers, contract renegotiation and consensual recursion. Our main
result is a verification technique for liquidity. We first transform the
infinite-state semantics of BitML into a finite-state one, which focusses on
the behaviour of a chosen set of contracts, abstracting from the moves of the
context. With respect to the chosen contracts, this abstraction is sound, i.e.
if the abstracted contract is liquid, then also the concrete one is such. We
then verify liquidity by model-checking the finite-state abstraction. We
implement a toolchain that automatically verifies liquidity of BitML contracts
and compiles them to Bitcoin, and we assess it through a benchmark of
representative contracts.