Saturday, November 14, 2015

Blockchain Technology, Smart Contracts and Smart Property

Blockchain technology is at the heart of cryptocurrencies like Bitcoin. Most people have heard of Bitcoin and some are excited by the prospect it raises of a decentralised, stateless currency/payment system. But this is not the most interesting thing about Bitcoin. It is the blockchain technology itself that is the real breakthrough. It not only provides the foundation for a currency and payment system; it also provides the foundation for new ways of organising and managing basic social relationships. This includes legal relationships such as those involved in contractual exchange and proprietary ownership. The most prominent expression of this potential comes in the shape of Ethereum, an open source platform that allows developers to use blockchains for whatever purpose they see fit.

This might sound a little abstract and confusing. Blockchain technology is exciting, but many people are put off by the technical and abstruse concepts underpinning it. Proponents of the technology talk about strange things like cryptographic hash functions and public key encryption. They also refer to obscure mathematical puzzles like the Byzantine Generals problem in order to explain how it works. This is daunting. Many wonder whether they have to master this obscure conceptual vocabulary in order to understand what all the fuss is about.

If they want to engage with the technology at the deepest levels, they do. But to gain a high level understanding of how it works, and to share some of the excitement of its proponents, they don’t. My goal in this post is to provide that high-level understanding, and to explain how the technology could provide an underpinning for things like smart contracts and smart property. With luck, this will enable people to see the potential for this technology and will pique their interest in its political, legal and ethical implications.

I appreciate that there are many other articles out there that try to do the same thing. I am merely adding one more to the pile. I do so in the hope that it may prove useful to some, but also in the hope that it helps me to better understand the phenomenon. After all, most writing is an exercise in self-explanation. It is through communication that we truly begin to understand.

The remainder of this post is divided into three main sections. The first talks about the ‘Trust Problem’ that motivates the creation of the blockchain. The second tries to provide a detailed but non-mathematical description of how the blockchain works to solve the trust problem. The third explains how the technology could support a system of smart contracts and smart property.

1. The Trust Problem and the Motivation for the Blockchain
All human societies have a trust problem. In order to survive and make a living, we must coordinate and cooperate with others. In doing so, there is potential for these others to mislead, deceive and disappoint. To ensure successful ongoing cooperation, we need to be able to trust each other. Many societies have invented elaborate rituals, laws and governance systems to address this trust problem. At its most fundamental level, blockchain technology tries to do the same.

To illustrate, let’s use the example of a currency and payment system. This seems appropriate given the origins of blockchain technology in the development of such systems. I’m going to use the example of a real-world currency system: the currency used (historically) on the Island of Yap. Some people will be familiar with this example as it is beloved by economists. The only problem is that example has become heavily mythologised and abstracted from the actual historical reality. I’m not an expert on that history, so what I am about to describe is also likely to be highly mythologised and simplified. I hope that’s okay: the goal here is to explain the rationale behind blockchain technology, not to write an accurate monetary history of the Island of Yap.

Anyway, with that caveat in mind, the Islanders of Yap had an unusual monetary system. They did not use coins as money. Instead, they used stone discs of varying sizes. These discs were mined from another island, several hundred miles away. This ensured the discs that had been mined and brought back to the island retained their value over time. The picture below provides an example and illustrates just how large these discs could get. People would exchange these large discs in important transactions. But obviously the islanders could not just hand the discs to one another to finalise the transaction. The discs remain fixed in place. In order to know who-owned-what, the islanders needed to keep some kind of ledger, which recorded transactional data and allowed them to figure out which stone disc belongs to which islander.

One way to do this would have been to use a trusted third party ledger. In other words, to find some respected tribal elder or chief and make it a requirement that all transactions be logged with him/her. That way, whenever a dispute arose, the islanders could go to the elder and he/she could resolve the dispute. The elder could confirm that Islander A really does own the disc and is entitled to exchange it with Islander B, or vice versa. This is illustrated in the diagram below.

We make use of such trusted third party systems everyday. Indeed, modern political, legal and monetary systems are almost entirely founded upon them. When you make a payment via credit or debit card, that transaction must first be logged with a bank or credit card company, who will verify that you have the necessary funds and that the payment came from you, before the payment is finally confirmed. The same goes for disputes over legal rights. Courts function as trusted third parties who resolve disputes (ultimately via the threat of violence) about contractual rights and property rights (to give just two examples).

But that is not the only way to solve the trust problem. Another way would be to use a distributed consensus ledger. In other words, instead of logging transactional data with a trusted third party, you could require all the islanders to keep an ongoing, updated, record of transactions. Then, when a dispute arises, you go with either the majority or unanimous view of this network of ledger-keepers. As far as I am aware (and this is where my caveat about historical accuracy needs to be borne in mind) this is what the Islanders of Yap seem to have done. Each islander kept a mental record of who owned what, and this distributed mental record could be used to resolve transactional disputes.

Blockchain technology follows this distributed consensus method. It tries to create a computer-based protocol for resolving the trust problem through a distributed and publicly verifiable ledger. This is known as the blockchain. We can define it in the following way (from Wright and De Filippi, 2015):

Blockchain = A distributed, shared, encrypted database which serves as an irreversible and incorruptible public repository of information.

2. How the Blockchain is Built
But how exactly does the technology build the ledger? This is where things can get quite technical. In essence, the blockchain works by leveraging the networking capabilities of modern computers and by using a variety of cryptographic tools for verifying transactional data.

A network is established consisting of many different computers located in many different places. Each computer is a node in the network. You could have one node in South Africa, one in England, one in France, one in the USA, one in Yemen, one in Australia and so on. The network can, in theory, be distributed across the entire world. This network is then used for logging, recording and verifying transactional information. Every computer on the network keeps a record of all transactions taking place on the network. This record is known as the blockchain. It is comprehensive, permanent, public and distributed across all nodes in the network. The network can thus function as a decentralised authority for managing and maintaining records of transactions.

It is easy enough to see how this works in the case of two people exchanging money. Suppose Person A wants to transfer 100 bitcoin (or whatever) to Person B. Person A has a digital ‘wallet’ which contains a record of how much bitcoin they currently own. They sign into this and agree to transfer a certain sum to Person B. They do this by broadcasting to the network that they wish to transfer the money to Person B’s digital wallet. Details of this proposed transaction are then added to a ‘block’ of transactional data that is stored across the network. The ‘block’ is like a temporary record that is in the process of being added to the permanent record (the blockchain). The ‘block’ represents all the transactions that took place on the network during a particular interval of time. In the case of bitcoin, the block includes information about all the transactions taking place in a ten minute interval.

At this stage, the transaction between A and B has not been verified and does not form part of the permanent distributed ledger. What happens next is that once all the data has been collected for a given interval of time, the network works on verifying the details in those transactions (i.e. does A really have that amount of money to send to B? Did A really initiate the transaction? etc). Each computer on the network participates in a competition to verify the transactional data. The winner of this competition gets to add the ‘block’ to the ‘blockchain’ (i.e. they get to update the ledger). When they do so, they broadcast their ‘proof of work’ to the rest of the network. This shows the network how the winning computer verified the transactional data. The other computers on the network then check that proof of work and confirm that the record is correct. This is where the ‘distributed consensus’ comes in. It is only if the winning ‘solution’ is confirmed by the majority that it becomes a permanent part of the blockchain.

This verification process is technically tricky. I have a given a simple descriptive account. For the full picture, you would need to engage with the cryptographic concepts underpinning it.

There are a couple of interesting things about this, over and above its ‘distributed consensus’ nature. The first has to do with the role of trust. Some people refer to the blockchain as a ‘trustless’ system. I think people say this because it is the computer protocol and its combination of cryptographic verification methods that underpin the ledger. Thus, when you are using the system, you do not have to trust or place faith in another human being. This makes it seem very different from, say, the situation faced by the islanders of Yap, who really do have to trust one another when using their distributed ledger. But clearly there is trust of a kind involved in the process. You have to trust the technology, and the theory underpinning it. Maybe that trust is justified, but it still seems to be there. Also, since most people lack the technical know-how to fully understand the system, there is a stronger sense of trust involved for most users: they have to trust the technical experts who establish and maintain the network.

The other interesting thing has to do with the incentive to maintain the network. You may wonder why people would be willing to give up their computing resources to maintain such an elaborate system. The technologically-inclined might do so initially out of curiosity, or maybe some sense of idealism, but to have a widespread network you probably need something more enticing. The solution used by most blockchain systems is to reward members of the network with some digital token that can be used to conduct exchanges on the network. In the case of bitcoin, the winner of the verification competition receives newly minted bitcoin for their troubles. This makes it attractive for people to join and maintain the network. Bitcoin adopts a particular economic philosophy in its reward system: the winner takes all the newly-minted bitcoin. This doesn’t have to be the case. You could adopt a more egalitarian or socialist system in which all members of the network share whatever token of value is being used.

3. Smart Contracts and Smart Property
To this point, I have stuck with the example of bitcoin and illustrated how it uses blockchain technology. But as I noted at the outset, this is merely one use-case. The really interesting thing about blockchain technology is how it can be used to manage and maintain other kinds of transactional data. In essence, the blockchain is a decentralised database that can maintain a record of any and all machine-to-machine communications. And since smart devices, involving machine-to-machine communication, are now everywhere, this makes the blockchain a potentially pervasive technology. Smart contracts and smart property are two illustrations of this potential. I’ll try to explain both.

A contract is an agreement between two or more people involving conditional commitments, i.e. “If you do X for me, I will do Y for you”. A legal contract makes those conditional commitments legally enforceable. If you fail to do X for me, I can take you to court and have you ordered to do X, or ordered to pay me compensation for failing to do X. A smart contract is effectively the same, only you use some technological infrastructure to ensure that conditions have been met and/or to automatically enforce commitments. This can be done using blockchain technology because the distributed ledger system can be used to confirm whether contractual conditions have been met.

Suppose I am selling drugs illegally via the (now-defunct) Silk Road. We agree that you will pay me X bitcoin if you receive the drugs by a particular date. That condition could be built into the initial transaction that is logged on the blockchain platform. In this case, the system will only release the bitcoin to me if the relevant condition is met. How will it know? Well, suppose the drugs are of a certain weight and have to be delivered to a certain locker that you use for these purposes. The locker is equipped with a ‘smart’-weighing scales. Once a package of the right weight is delivered to the locker, the weighing scales will broadcast the fact to the network, which then confirms that the relevant contractual condition has been met. This results in the money being released to me.

Notice how the contract here is enforced automatically. I do not have to wait for you to release the bitcoin to me and you do not have to worry about losing your bitcoin and never receiving the drugs. The relevant conditions are coded into the original smart contract and once they are met the contract is automatically executed. There is no need for recourse to the courts (though you could build in conditional recourse to courts if you liked). The increasing number of ‘smart’ devices makes smart contracts enticing. Why? Because these devices allow for more ways in which to record, implement, and confirm the performance of relevant contractual conditions. The advantage of the blockchain is that it provides a way to manage and coordinate these devices without relying on trusted third parties.

Smart property is really just a variation on this. Tangible, physical property in the real world (e.g. cars, houses, cookers, fridges etc) can have smart technology embedded in them. Indeed, this is already true for many cars. Information about these physical objects can then be registered on the blockchain along with details of who stands in what type of ownership relationship to those physical objects. Smart keys could then be used to facilitate ownership rights. So, for example, you might only be able to access and use a car if you had the right smart key stored on your phone. The same could be true for a smart-house. These keys can then be exchanged and the exchanges verified using the blockchain. The blockchain thus becomes a system for recording and managing property rights.

Hopefully, these two examples give some sense of the excitement surrounding blockchain technology.

4. Conclusion
To sum up, the blockchain is a distributed, publicly verifiable and encrypted ledger used for recording and updating transactional data. It helps to solve the trust problem associated with most forms of social cooperation and coordination by obviating the need for trusted third parties. The technology is exciting because it can be used to manage and maintain networks of smart devices. As such devices become more and more widespread, there is the potential for blockchain technology to become pervasive. I’ll try to explore some of the more philosophically and legally interesting questions this throws up in future posts.

1 comment: