Smart contracts will change the world.
Or will they? The concept of smart contracts has gained a lot of attention in recent years. A lot of positive and creative attention, and a lot of unsubstantiated hype. It’s my job to build businesses in which smart contracts play an important role. From that perspective I’ll give my vision on what’s possible today and where we’re heading.
Remind me, what is a smart contract?
The concept of what a “smart contract” is, has evolved a bit, and unfortunately this has eroded the meaning of the concept. So here’s a quick refresher. Nick Szabo is commonly accredited with the introduction of the concept, in 1994. This was way before blockchains existed. However, Szabo clearly envisions that cryptography plays an important role in realising them and that access to smart contracts would happen through cryptographic keys. Later he gives an example of a car as smart property. Still in the 90’s, by the way.
Going from Szabo’s original ideas we can take this as a broad definition:
A smart contract is a computerized transaction protocol that executes the terms of a contract.
In the blockchain community, the term “smart contracts” is being increasingly used for a narrower concept, roughly for “computer code that is run on a blockchain”. Both the source and the execution of this code is cryptographically verifiable (the latter, by the way, is a Big Thing), its correct execution is ensured by all nodes in the blockchain network and it can affect changes in the data on that blockchain.
The programs that can be run on the Ethereum blockchain are also officially called “smart contracts”, a choice which was later regretted by founder Vitalik Buterin but was kept anyway for reasons of continuity (and was embraced by Szabo as a second definition). For clarity, I will further use the term “Ethereum smart contracts” when referring to these, including derived technologies like the Eris Industries stack and Rootstock. As a narrower definition we’ll take this:
An Ethereum smart contract is a long-lived piece of code which is stored on a blockchain, triggered by blockchain transactions, which reads and writes data in that blockchain’s database, and of which the source and execution are cryptographically verifiable.
Limitations of Ethereum smart contracts
Recently, Gideon Greenspan of Coin Sciences wrote an informative post on some things people think that Ethereum smart contracts can do, but actually can’t. On the whole, I agree with these and I think they are important for understanding how to build useful products and services based on Ethereum and related technologies. Ethereum smart contracts, on their own, are no good for:
- Contacting external services or APIs: they can only read and write data on the blockchain where they reside. No API calls. No money transfers outside the blockchain where they live. No interaction with the physical world.
- Enforcing on-chain payments: they can make payments, but only of funds that they fully hold themselves. Consider them like a smart gold chest: if we put gold in the chest, the smart chest can determine who gets the gold, and under which conditions (again, only looking at data in its own blockchain).
- Hiding confidential data: they can’t hide any data, because all data in Ethereum smart contracts is unencrypted and transparent. Yes, encryption is used in blockchains. No, the data in the blockchain itself is not encrypted, and is as accessible as the blockchain itself. In popular public blockchains like Bitcoin and Ethereum, that means about as accessible and permanent as any data. Don’t put your secrets in there. Seriously.
If Ethereum smart contracts can’t do any of these, then are they good for anything at all? My answer is a strong “yes”. In my vision and daily reality in the development of our ventures, Ethereum smart contracts are part of a greater whole towards realising Szabo’s vision of smart contracts. However they are like a brain that needs hands and feet to interact with the world, and eyes to see it.
Hands and feet for the shared brain
A “world computer” like the public Ethereum network, or a computing environment that is trusted and verifiable between parties in a smaller group like a consortium blockchain, is a tremendously powerful thing. It is, however, more like a shared brain than anything else. A reasoning, remembering, calculating, very trustworthy and transparent brain, and in the current state of the art a very limited and slow one. Ethereum smart contracts are little computer programs that run on that brain.
From that perspective, how can that brain be given eyes to see the world, and hands and feet to manipulate it? Not unlike a human brain, in fact: using external “sensors” and “limbs” with which it communicates through “neurons”. The sensors are any type of online service that provides data, the limbs are any online service that influences the digital or the physical world, and the neurons are the digital pathways that start or end with a blockchain transaction.
So how do we ensure the data that the brain receives is trustworthy, and that its instructions to influence the world are respected? Just like anything in the blockchain is ensured: by making honest behaviour more attractive than dishonest behaviour. That can be in economic terms, but also in terms of the legal system or reputation.
In a follow-up post, I will go into more detail on methods to give Ethereum smart contracts eyes, hands and feet, and the strategies to ensure their honesty and effectiveness through incentives.
Photo credit: Neil Conway