Guaranteed Execution with Smart Contracts
Tags: Blockchain, Cryptocurrency, Smart Contracts, Bitcoin, Horizen

We have looked at blockchain in two different ways. First as a data structure and second as a protocol to transfer value. For the last article of this chapter about what a blockchain is we want to talk about smart contracts. Besides AI, IoT, and blockchain, smart contracts have been one of the hottest topics over the last two years in the tech world. They are software on the blockchain.

A blockchain can not only host simple data like transactions, but also small programs. We call these programs smart contracts. A contract, in general, is an agreement between parties that binds them to something happening in the future. The “smart” comes from the automatic execution of these digital contracts. Simply speaking they consist of many “if, then” statements that are written in and enforced by code. The contract executes automatically if the contract conditions are met.

The Promise of Smart Contracts

Smart contracts promise to reduce the need for middlemen, such as lawyers or notaries, and thereby reduce the cost of transacting. Disposing of middlemen can also save a lot of time. You don’t have to wait for opening hours or through banking holidays. Smart contracts can not only be used to govern the transfer of digital assets such as cryptocurrencies, but they could govern many other types of value transfer, such as trading of shares and other traditional financial instruments or even transactions involving physical property (like real estate).

A landlord and a tenant could use a smart contract to govern a rental agreement. The smart contract could automatically lock the tenant out of the apartment if the tenant fails to pay rent. The if-then statement, in this case, could look like this:

If the contract address receives amount X by the 3rd of each month from address Y, then grant Y access to the apartment. If payment fails for 2 consecutive months, then revoke the right of Y to unlock the apartment.

Are They Really Trustless?

The promise of smart contracts is to allow trustless execution with automatically enforced rules without the need for middlemen. But can they actually live up to this promise?

All types of assets are subject to the local jurisdiction you are in. This means a contract, no matter if smart or not, requires additional trust in the jurisdiction besides the trust put in the contract itself. Possession in a smart contract does not equal possession in the real world. Just as with regular contracts, the terms can be subject to changing circumstances and interpretation thereof. An illegal contract is not legally binding.

One must consider that writing traditional contracts takes years of studying the legal framework regulating the different areas of contractual law. Writing smart contracts is even more difficult, as one also needs to understand the technical dimension behind them. We will need to see an entirely new generation of tech-savvy lawyers emerge to enable a meaningful adoption of legally binding smart contracts.

There is another major challenge to overcome. The digital world needs to learn about real-world events in order for a smart contract to function and execute. An oracle is an entity submitting data to a smart contract. The trust problem that comes with this role is referred to as the oracle problem. Imagine a smart contract running a betting platform in a trustless environment. The oracle needs to submit the result of a game in order to have the smart contract distribute funds to the winners. Because an oracle determines what a smart contract sees, it also controls what it does.

Centralized oracles are not considered a solution to the oracle problem. No matter what the actual implementation looks like, the incentives to untruthfully submit data might outweigh the benefits of acting honestly in some decisions. And what is the point of having trustless execution on the basis of information provided by a trusted third party?

No matter if centralized or decentralized, an oracle will always come at a cost. Acting honestly must always be the most profitable strategy and therefore strong incentives must be in place. This is another problem that needs game-theoretic evaluation and incentive design, just like the incentives for miners that we talked about in our last article.

As Jimmy Song puts it: “A smart contract that trusts a third party removes the killer feature of trustlessness.” There is a long way to go before we will see the broad use of trustless smart contracts across different domains, but they are most definitely a concept worth exploring.

Read the full article and other great articles like this one on the Horizen Academy.