Barclays’ Smart Contract Templates prototype demonstrated at The O2 in London

The Smart Contract Templates application developed by Barclays has starred in the first ever public demonstration of the R3 Corda "fabric" for shared banking ledgers, which took place before an audience of over 800 people at The O2 in London.

The event was the public demo day of the Barclays Accelerator, powered by Techstars, where 11 teams presented, including 10 startups and a Barclays internal team. The team behind the prototype smart contracts application was the internal one headed up by Dr Lee Braine from Barclays Investment Bank's CTO Office.

Braine said: "The technology we have used for our demonstration is the R3 consortium's prototype platform called Corda. What you will now see is the first public demonstration of an application using the underlying Corda platform. This is history in the making."

He explained the banking industry is facing an extremely complex challenge: each bank maintains its own ledger systems, which means there is huge duplication of effort and cost. He elaborated that blockchains, shared ledgers and smart contracts are trying to solve that challenge – but said a missing piece in the puzzle would be filled by standardised yet customisable templates for running automated financial contracts.

"They provide an elegant way to connect the text within legal agreements to the corresponding business logic. I emphasise to you that legal documentation processes can be lengthy, cumbersome and manual. Smart Contract Templates could simplify all of that and, because they are templates designed for reuse, they could drive the industry's adoption of standards that are legally enforceable.

"This has huge potential to enable banks to mutualise costs across the industry by using common components – the potential for a paradigm shift in a field where there are billions of pages of legal agreements."

Ushered in by Daft Punk's "Harder, Better, Faster, Stronger" to signify lean processes and optimisation, Braine began his demo: a prototype of an investment banking application showing the lifecycle of an interest rate swap. The first screen he called the template editor. "You can imagine these templates being maintained by a standards body. Unlike the paper versions, these templates are smart," he said. Some legal text was highlighted in a master agreement and converted into a parameter; then the mouse hovered over some other lines of text to reveal the corresponding computer code.


Braine then used the template to edit an actual agreement: on the left were a series of fields, with an outstanding field in red; on the right, the corresponding legal agreement. Next, he entered a trade for an interest rate swap.


The appropriate governing legal documentation was automatically retrieved and attached to the trade, which was then submitted – and finally affirmed by the counterparty.


The smart contract was then run on a distributed ledger using the R3 Corda technology. Displaying the trade running on the Corda platform, Braine said: "You can see the confirmation on the left, and the legal documents on the right. It's important to note that both parties see the same set of documents. On the schedule tab, our prototype illustrates three months passing, and shows the schedule being updated as the smart contract runs on the distributed ledger.


Braine then replayed the smart contract in action, so to speak, via a visualisation using R3's network monitor. The screen displayed banks as purple nodes, a regulator in white, and service providers in red. The screen showed messages flowing between these nodes.


As per the recently-released specifications of Corda by R3 CTO Richard Brown, the data was not being replicated to every node. Braine added: "Unlike a classic blockchain, the data is going only to those entitled to see it. The business logic here is controlled by the parameters from the smart contract templates."

In closing, Braine said Barclays is at the forefront of this field and that the bank was proud to publicly demonstrate its prototype. He said: "We achieved collaboration that far exceeded our expectations: with R3 on their distributed ledger platform; with University College London's Centre for Blockchain Technologies on a new programming language created by team member Dr Chris Clack who named his language CLACK; with the key standards organisation ISDA for permission to reproduce their legal agreements; with Société Générale for their valuable review feedback; and with Techstars during the last three intense months.

"This type of solution will take time to build. But it has the potential to transform legal documentation and enable legally-enforceable smart contacts. Now that Barclays has planted the seed of Smart Contract Templates, further collaboration is required to grow this idea.

"It will only really work if the industry is behind it. So if you are part of the industry, and you are excited by the prototype, I encourage you to participate in a Smart Contract Templates summit this June that will be organised by R3."

Following the demo, Braine told IBTimes UK: "The typical startup joins an accelerator intent on advancing the pace of their team, their networking and future prospects. Many join with a product and it may even be fully fledged with paying customers.

"However, Barclays Investment Bank's internal team joined the accelerator with just an idea back in January. In the space of these three months, we built a prototype application and also collaborated extensively so that Smart Contract Templates could be showcased within the lifecycle of a standardised financial product.

"Being part of an accelerator culminating in a public demo day undoubtedly inspired our team – and we have been overwhelmed by the positive response."