01whole.pdf (11.08 MB)
Towards declarative smart contracts
thesisposted on 2022-03-28, 21:39 authored by Kevin John Purnell
With the exception of some well-funded industries, legal documents remain difficult and expensive to use, and prone to ambiguities. Emerging blockchain technologies hold the promise of changing this, however the tools for coding these 'smart contracts' require programmers and are prone to fraud. To fully realise the benefits of smart contracts, widespread adoption is required, which depends on improving security and replacing programmers with tools that lawyers, business-people and the general public can use. Our objective is to investigate improved approaches to the creation, testing and deployment of smart contracts by demonstrating that pure declarative languages can be used, and that these facilitate achieving improved utility in smart contracts. Our investigation implemented a 'Will and Testament' as a smart contract on a custom simulator, and demonstrated improved utility by auto-generating a smart contract from a status-quo user interface with an untrained user. We found a number of small benefits to using a declarative language like simplification, ease of code auto-generation and ease of testing. We have identified an approach to smart contract creation supportive of adoption because conversion starts with current legal contacts, is tolerant of varying levels of automation, and allows human-in-the-loop interaction. Smart contracts are seen as game changing by many, and should issues with cost, usability and security be solved, the economic impact is likely to be large.