Blockchain and smart contract technology are emerging as among the fastest growing technology innovations in recent times. They continue to attract widespread attention and significant levels of investment.

In this special series of three articles, Henry Davis York's technology expert, partner Matthew McMillan focuses on smart contracts and the transformative potential of this emergent technology.

Are they smart? And are they contracts?

More than 24 countries are now investing in smart contract and blockchain technology. Over USD$1.4 billion has been invested by venture capital firms in the last three years alone.

And rightly so. The technology has the potential to fundamentally transform the way in which financial services, and many other sectors of the economy, do business.

Much has been written and spoken about this transformative potential and the myriad of opportunities afforded by smart contracts operating on a blockchain. By contrast, much less attention has to-date been given to how smart contracts work in the context of the laws and frameworks which apply to commercial contracting more generally.

This series of articles will shine light on this less-explored area, to:

◾demystify what is meant by smart contracts;
◾explore their design, and how they fit within our established legal frameworks;
◾answer the question of whether smart contracts are, or can be, legally effective agreements;
◾identify the key legal and regulatory challenges which smart contracts raise; and
◾unpack what impact smart contracts will have on the business of law.

What is a smart contract?

A smart contract is a computer program that verifies and executes the terms of a contract upon the achievement of certain pre-defined events.

It does this automatically, without human intervention. The code recognises when the achievement of certain events occur and, upon such recognition, triggers automatic execution of the transaction and the movement of value.

A smart contract is both self-executing and self-enforcing.

It could, for example, be a computer program which only allows a trade to execute at a certain time or upon the fulfilment of certain conditions. Or code which automates the execution of steps required to effect a real property settlement and enable the transfer of title.

This is possible because of the conditional logic that is built into the smart code - the idea that if X happens, then Y will occur. This type of conditional logic has some inherent similarities with contractual clauses, which are often constructed on the basis of "if, then" statements.

Smart contracts can replace the role of trusted third parties that are common to many transactions. This is because they perform, without question, whatever it is that they are programmed to do. As such, they are trustless, autonomous and self-sufficient creatures.

But they are not a new concept.

The term 'smart contract' has been around for a couple of decades. It was first coined by Nick Szabo in his 1997 paper, The Idea of Smart Contracts.

He described a vending machine as the most basic form of smart contract - a machine which, when provided with a pre-defined input (eg money), is capable of transferring the ownership of a good (eg a can of Coke) to the consumer.

It is the ability of the vending machine to hold and control the good which enables it to enforce the terms of the contract with the consumer. In essence, it is a machine-enabled contract.

Szabo went on to extend this concept, by proposing that computer code could be used in much the same way to enable transactions of digital property. So, for example, a smart contract could transfer the ownership of real estate or shares, and the code would define what events would trigger and execute the transfer - matters like payment, or the votes of board members.

So why all the hype about smart contRacts now?

The recent hype about smart contracts has its genesis in the discovery of blockchain technology.

Blockchain is the architecture which underlies the smart contracts that we hear about today, in a similar vein to the way in which the internet is the architecture which underlies e-commerce and online contracting.

Until blockchain developed, smart contracts (as conceived by Szabo) faced two obstacles:

◾while a vending machine is capable of controlling goods by holding them inside of itself, digital property is not capable of being secured in the same way; and
◾without the ability to control digital property, a smart contract could not be relied upon to execute itself in a way that both parties could trust.

Blockchain has created solutions to these two obstacles:

◾the control of assets is achieved through the use of cryptographic keys; and
◾trust is achieved because of the decentralised and permanent nature of the ledger, which is visible to all users within the network - and which, therefore, acts as a single source of truth.

Much of the excitement of smart contracts formed on a blockchain has to do with the following:

◾the certainty of code, and its fixed nature, which removes the possibility of misinterpretation;
◾the way in which smart contracts enable trust - something which is so critical for trade to occur - by being self-executing;
◾the efficiency gains which come from dispensing with the need for trusted intermediaries;
◾the ability for two total strangers to transact at arms' length, without the worry of fraud or counter-party risk; and
◾removal of the costs of enforcement (eg record-keeping costs, mediation costs).

The potential use cases for smart contracts are also many and significant, from the automatic transfer of property ownership upon receipt of funds, to the automatic payment of service credits upon a service level breach, to the trading of securities without the need for central clearing parties or central securities depositories.

Is a smart contract actually a contract?

Despite all the hype, we do need to be careful when we talk about smart contracts because the definition I provided earlier in this article is very broad. And, somewhat unfortunately, there is often a lack of clarity around how the expression is used.

It is sensible to think about smart contracts by reference to a continuum.

At one end of the continuum, smart contracts have a distinctly technological meaning - they refer to the actual smart code that is stored, verified and executed on a blockchain. This meaning is common among software developers engaged with blockchain initiatives.

Towards the other end of the continuum, smart contracts are used to describe the application of that smart code in a way which either replaces or complements traditional legal agreements. It is at this point of the spectrum that things start to get interesting from a legal perspective.

At the far end of the continuum, there is a third meaning which enunciates the idea that smart code could be used as a complete alternative to traditional legal agreements.

In today's world, trade is enabled because parties are able to form agreements with one another in the knowledge that there is a legal system which recognises the sanctity of agreements and will come to the rescue in the case of breach by one party and the resulting loss of the other party.

These agreements create an incentive for each of the parties to perform their respective obligations, and the confidence to deal with one another.

Smart contracts, however, may offer an alternative way to create systems of incentive. This may increasingly become the case as we move towards the Internet of Things where, over time, it may even be possible for a washing machine to purchase its own detergent.

This continuum of meaning clearly demonstrates one thing, and that is the interdisciplinary nature of smart contracts. As the world of technology and law collide, there will increasingly be a need for lawyers to learn more from software developers about smart contract technology and the seemingly limitless possibilities that the technology opens up, and for software developers to learn more from lawyers about the purpose, nature and role of contracts in our legal system.

What does a smart contract look like?

To give a practical example, here is a simple option agreement coded as a smart contract:

contract Option {
strikePrice = $100,000
             holder = Jane
             seller = Jack
             asset = 100,000 shares of ABC Pty Limited
             expiryDate = December 31st, 2016
function exercise () {
             If Message Sender = holder, and
             If Current Date < expiryDate, then
                         holder send($100,000) to seller, and
                         seller send(asset) to holder
             }

You can see that the terms have been established:

◾the assets are 100,000 shares in ABC Pty Limited;
◾Jane holds an option over the shares until the expiry date of 31 December 2016; and
◾Jack is the seller.

The smart contract is programmed with conditional logic, so that:

◾if a message to exercise is made by the option holder (ie Jane); and
◾if the date of exercise of that message is before the expiry date of 31 December 2016,

the contract is then programmed to automatically transfer the sum of $100,000 from Jane to Jack, and the transfer of the 100,000 shares from Jack to Jane.