Barclays gets into the nuts and bolts of Smart Contract Templates
IBTimes speaks to Dr Lee Braine from Barclays Investment Bank about its new smart contracts research paper.
To cap a year of prodigious blockchain innovation partnering with FinTech start-ups and universities, Barclays has released a second research paper on its Smart Contract Templates initiative. The paper, jointly authored by Barclays and University College London, dives deep into legally-enforceable smart agreements, examining some essential requirements and an array of design options.
The previous paper set out the overarching concept: implementing smart contracts whose execution is both automatable and legally enforceable. The follow-on paper is not meant to be prescriptive, but rather to summarise the design landscape for industry standards bodies such as ISDA and FIA, as well as the banks.
Before delving into candidate design options, the second paper, Smart Contract Templates: essential requirements and design options (available here) lists five essential requirements:
1. Methods to create and edit smart legal agreements, including legal prose and parameters.
2. Standard formats for storage, retrieval and transmission of smart legal agreements.
3. Protocols for legally executing smart legal agreements (with or without signatures).
4. Methods to bind a smart legal agreement and its corresponding smart contract code to create a legally-enforceable smart contract.
5. Methods to make smart legal agreements available in forms acceptable according to laws and regulations in the appropriate jurisdiction.
Word of law
On the blockchain circuit, it's often said smart lawyers should start learning computer programming. In the meantime, the common format for creating and editing legal documents is Microsoft Word.
Dr Lee Braine, of the Investment Bank CTO Office at Barclays and paper co-author, said: "Many lawyers use Word as their default editor. If you look at Word add-ins in the legal profession, there is a very common pattern where you take Word documents, templatise them by identifying fields, and later populate those fields. And that pattern is followed every day for many different purposes, not just standardised legal contracts.
"There are also custom editors for contracts, some of which are specialised to just financial products, and even simple text editors with syntax highlighting can be used for creating standardised contracts. Some of these technologies already use underlying data formats that could potentially be leveraged by smart legal agreements. However, it presents a challenge if we also want to leverage those underlying data formats – whether they are XML, JSON or whatever – through more of the smart contract process.
"Currently, you have one data format for your legal contract and other data formats for later stages in the product life cycle, for example another format to hold trade confirmations and others to hold the data for processing the trades. Ideally you would reduce the number of data transformations required during that end-to-end process, to potentially simplify architectures and allow greater straight-through processing. So, the idea was to inspire people, when they are thinking about smart contracts, to also think about how smart contracts could drive greater use of common data structures throughout more stages of the end-to-end pipeline."
Braine said there may be benefit in exploring whether it makes sense to extend existing data standards, such as ISDA's FpML (Financial products Markup Language), to also include legal prose – as one potential way of extending standards to span more stages in the pipeline. This question can be approached from different angles and it's not obvious yet which is the best approach, he said, so industry collaboration, analysis and experimentation is required.
Ricardian Contracts, plus dual integration
A key part of the work so far on Smart Contract Templates has invoked the classic Ricardian Contract triple of legal prose, parameters and computer code. This type of structure, invented by Ian Grigg, consultant architect at R3, contains within it the hash (which can later be used as an identifier) for the legal prose in the smart contract, for example to help retrieval of the legal documentation for a particular trade.
The Barclays paper also mentions an additional approach known as "dual integration", proposed by Monax (formerly Eris).
Braine said: "What's interesting about the dual integration idea is that it goes one step further. In that case, you effectively create a penultimate version of your smart legal agreement, then instantiate the corresponding smart contract on a distributed ledger but don't start it running yet, then take an identifier for that instantiated smart contract and insert it back into your smart legal agreement to create the final version of your smart legal agreement – and ultimately create your finalised smart contract.
"A lawyer looking to submit information as evidence, for example so that a judgement could be made for a dispute, requires confidence that specific legal agreements cover specific trades. The Ricardian Contract could increase that confidence, including the use of cryptographic hashing to highlight if the agreement had inappropriately been tampered with. And dual integration may provide additional confidence."
Markup, prose and metadata
Markup has a long and distinguished history as a technique for taking text and adding metadata to it. In this context, a typical example might be identifying the word "counterparty" in legal prose and converting that to metadata, for example by giving it a name and a value.
Braine said: "By using markup to add metadata to legal prose, you can create smart legal agreements. You can use it to add presentational metadata (such as bold, underline, etc) and add semantic metadata such as parameters. And, in order to push the envelope on what is a smart contract, you could start migrating the business logic in legal prose into a metadata form that remains admissible for dispute resolution but is also automatically executable.
"We have previously proposed that a good way to do that would be incrementally increase the sophistication of the parameters in smart legal agreements; so instead of just putting simple values, you also start putting business logic in there."
2017 and beyond
Looking ahead to 2017, Barclays aims to participate in trade association forums that are starting to explore smart contracts, such as ISDA. "We look forward to continue participating in industry initiatives that focus on leveraging standardised agreements and common data standards as a basis for smart legal agreements in investment banking," said Braine.
Further in the future, perhaps we can expect smart contracts written in new domain-specific languages. "What we mean by this is the creation and use of new languages that are tightly focused to representing the rights and obligations of legal contracts, but in a highly rigorous format that is also amenable to automatic execution on a computer. You could imagine some lawyers being trained in the use of such languages and notations - and effectively becoming legal programmers," he said.
© Copyright IBTimes 2024. All rights reserved.