By now we know that Blockchain is more than Bitcoin and that there are potentially many other applications of the distributed ledger technology. Banks and other big corporations put a lot of money into research and developing solutions that could help them save on cost and time. One of the terms that often comes up is that of a smart contract, but what does it actually mean, how does it work, what can it be used for and what is all the fuss about?
And there is already the first problem: there seems to be a bit of a misunderstanding what the term actually means and the internet is full of definitions (see footnote 1). What we sort of know, is that a guy called Nick Szabo probably coined the term in the mid-nineties to emphasize the goal of bringing what he calls the “highly evolved” practices of contract law and related business practices to the design of electronic commerce protocols between strangers on the Internet. He published his own definition, which goes like this: A smart contract is a set of promises, specified in digital form, including protocols within which the parties perform on these promises (see here).
Szabo apparently is a legal theorist and computer scientist, so might struggle to completely understand what that means, at least I do, so let’s take a step back and see what our friends at Wikipedia have to say on the subject: “Smart contracts are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that make a contractual clause unnecessary. Smart contracts usually also have a user interface and often emulate the logic of contractual clauses. Proponents of smart contracts claim that many kinds of contractual clauses may thus be made partially or fully self-executing, self-enforcing, or both. Smart contracts aim to provide security superior to traditional contract law and to reduce other transaction costs associated with contracting.”
I don’t know about you, but you’re probably none the wiser now after reading these definitions either, so let’s take a practical example to hopefully make the concept a little clearer:
Imagine you want to agree with another counterparty on some kind of derivatives contract, say the right to buy shares in a specific company, for instance Apple at $110 (let’s assume the price is currently around $100, which is more or less where it’s trading) with expiration at the end of the year and you agree a strike price of $90. If the share price drops before the end of the year under $90 you loose your money, if it rises and you decide to ride your option until the end of the year, you will have made some money, when you exercise it at the end of the term. With a smart contract all the details (and more) get written as code into the blockchain. Both parties to the transaction remain anonymous since this information is encrypted, but the contract itself is in the public ledger distributed across the network. If the triggering event like the strike price is hit or the expiration date is reached, the contract executes itself in accordance with the coded terms of the contract (Of course, this example is simplified and disregards certain aspects of options trading, for example the fact that most people sell their options instead of exercising them).
So in very simple terms, it’s nothing else but a contract that gets “translated” into computer code, so that the program can run by itself.
In essence that is similar to what a vending machine does though (it contains pre-set terms, so if you put in the money and choose a bottle of still water, the machine checks whether the correct payment is received and issues the goods, sometimes even the change), so what is so great about it. Well, actually it contains quite a few advantages: For starters, the fact that the contract executes itself not only saves time and potentially money, but potentially leads to fewer opportunities for error, misunderstanding, delay or dispute.
What are the applications?
When you talk to a blockchain developers, they will tell you that the blockchain is the next internet and rave about the almost endless applicability. What are the use cases for smart contracts though?
The examples for potential application in Financial Services alone are several and have the potential to save banks huge amounts. Let’s start with trade clearing and settlement: Smart contracts manage the approval process between the counterparties, calculate the settlement amounts, and transfer the funds automatically. Goldman Sachs estimated in a recent research report that it could save the financial industry around $12 billion globally in clearing and settlement of cash securities alone.
Other use cases include payment of bond coupons or dividends: the smart contract automatically calculates and makes periodic payments, in the case of fixed income products returns the principal amount upon expiration of a bond.
An actual loan could be coded as a smart contract, including with the collateral ownership information. As a result, if the borrower misses a payment, the smart contract automatically revokes the digital keys that grant his access to the collateral.
Since the blockchain technology is theoretically applicable to transfer any kind of value, the use cases for smart contracts outside financial services are equally numerous: to calculate and distribute royalties to artists in accordance with the smart contract; for any kind of record-keeping in life sciences and health care triggering communications or action through the Internet of Things; equally in the public sector, for instance, to register and record land titles, which is currently tested in the Republic of Georgia and Sweden. It could be useful for tracking the origin and movement of items across a supply chain; even voting, where it verifies the voters’ criteria and eligibility, records the vote on the blockchain and communicates the result or whatever other action the smart contract envisages. And the list goes on…
What are the downsides?
So much for the upsides, but like Pythagoras said: If there be light, then there is darkness! Hence, what are the downsides?
The most obvious is human failure: if the coding contains mistakes, the consequences could be enormous. Take for example The DAO, a distributed autonomous organization and probably the most prominent Ethereum project (a decentralised platform for Blockchain applications), which uses a series of smart contracts based on the Ethereum database. The DAOs objective, in simple terms, is to raise funds through crowdfunding in the form of ether, a cryptocurrency similar to Bitcoin, which would then be reinvested on blockchain projects, a little bit like a venture capital fund. During May 2016 it managed in only four weeks to accumulate the equivalent of $160 million. Based on the invested amounts, participants would receive DAO tokens. DAO token holders will have the right to vote on investment proposals (proportional to the number of tokens held) as well as the opportunity to receive rewards generated by the output of the work and the revenue of the funded proposals.
Warnings about gaps in its structure circulated for a while, but depending on who you talk to, the DAO is actually well coded. That seemed to be the consensus though until June 17, when someone drained a substantial amount of ether, somewhere in the region of $50-60 million dollars, using a coding error and transferring the money into a different account. Since then the DAO community has had lively discussions whether it should apply a hard fork, while also working on other measures of damage control. A hard fork, without going into too much technical detail would mean that the community decides that the harmful event should be treated as it never happened, the blockchain that records all transactions be reset to a time shortly before the attack. Obviously, this raises a lot of the legal, ethical and reputational questions, but even without discussing these in full, it is clear that the result is far from perfect.
Another issue is the question of the underlying data or factors that determine the execution of a smart contract: One example that is often used to demonstrate the use of smart contracts beyond cryptocurrencies is that of a smart insurance product, which could link to a weather data source and trigger a crop insurance payout if rainfall amounts drop below a particular level. In practice though this could create problems in respect to the actual accuracy of the data source, similar to traditional insurance contracts. The downside there then is that if the triggering event, i.e. the exact amount of raindrops, is disputed, who decides about it and how do you code it into a smart contract, which is supposed to execute itself without external meddling?
One thing that needs to be considered as well is the lack of flexibility of a smart contract. Its nature is to execute its code exactly as it was agreed upon on the creation of the smart contract. Centuries of drafting traditional contracts, however, have shown that an agreement at its outset is often not precise, since reality sometimes it is unpredictable, for which, for instance, force majeur exist. A smart contract cannot decide though, whether a condition is met or circumstances have changed, so an equivalent mechanism needs to be developed to amend a contract if the parties to it agree to.
And lastly, though less of a legal issue then a practical one for smart contracts is the hype that surrounds all things blockchain and represents it as a silver bullet for all problems. Obviously that’s not the case, but as always when it comes to managing expectations, it is important to understand what can and what cannot be done. Otherwise a lot of time and money is wasted, which in turn could be mean that the concept doesn’t experience the wide spread distribution it is expected to make and, considering the upsides, possibly deserves.
With so many obstacles, what does that mean for the general outlook of smart contracts? Should we rather stay clear of it to avoid a disaster like the DAO hack? Not quite. Smart contracts can be powerful instruments to enable people to do business with other people even without knowing them, but having the security a trusted intermediary would otherwise have to provide.
For now, the application of smart contracts may be limited to simple constructions and it may take time for them to evolve to realise their full potential, but that is and was the case for the written law, too.