Until recently, smart contracts were little more than theory. In general, there were two fundamental challenges that needed to be addressed before smart contracts could be used in any real-world setting.

(1) How would a smart contract actually control real assets so that it could enforce an agreement? A vending machine, to return to Szabo’s example, controls property by physically securing it inside of itself. But how could code do the same? In our options contract above, the “exercise” function transfers money and assets between the two parties. But how can a computer program control real-world assets like cash and shares?

(2) What computer would be trusted to “execute” those terms in a way that both parties could rely upon? Parties must not only agree on the code of their contract, but also the computer which interprets and executes that code. A shared standard, at the minimum, would have to exist, and be used in a way that was verifiable by each party — ideally, without requiring the parties to physically inspect the computer in question.

In the last few years, solutions to both of these problems have come into sight. Emerging research and development surrounding what is called “blockchain technology” may provide a basis to make smart contracts a reality in the near future.

The first use of blockchain technology was the digital currency bitcoin, made famous by its mysterious creator and sudden price increase in late 2013. In the last few years, the underlying “blockchain” technology has been intensely studied and adapted to expand its use beyond simple digital currencies. Startups, open-source communities, and large financial institutions alike are improving and expanding the technology with the aim of one day using it to facilitate exchange of fully digital assets.

A blockchain is an authoritative database. It is a database that, by virtue of the way it is maintained and updated, has very high trust properties. Blockchains are not controlled by a single party. There is no single company, organization, or person that has ultimate control over a blockchain. Rather, a blockchain is maintained, updated, and secured by a network of participating computers.

Each computer keeps a full copy of the blockchain database, and each copy is kept in synchronization with the others by a system of cryptographically-enforced rules called a consensus algorithm. Crucially, blockchains are append-only databases, meaning that once information is validly added, it can never be removed. Each update to the blockchain is secured by a cryptographic process known as a hash function, which allows the network to immediately detect and reject any attempt to distribute an edited copy of the database.

In this way, blockchains form the foundation for the recording and transfer of fully digital assets. Because the blockchain is always kept in synchronization, there is only ever one true record of ownership — essential to prevent anyone trying to double-spend their assets by sending it to multiple parties at the same time, a problem that plagued previous attempts to create digital assets. Because it is impossible to edit a blockchain once it has been properly updated, parties have mathematically-enforced confidence that the record of their ownership will persist into the future.