Introduction to smart contracts in Blockchain

Introduction to smart contracts in Blockchain

Blockchain technology allows you to facilitate transactions between people who do not know each other and do not necessarily trust each other, without the need of a trusted third party. A Blockchain is a decentral database, which functions as an online, distributed ledger. All participants of the Blockchain have access to this ledger.

The capture of transactions in a Blockchain is performed using smart contracts. The smart contracts consist of the conditions attached to the transactions in the Blockchain. The smart contract is computer software which checks and executes the rules which have been agreed upon between the participants of the Blockchain.

People work nowadays with multiple contracts. These are usually drawn up due to lack of trust in each other. This is why people who do business with each other agree on the terms and capture them on paper and both put their signature on the paper. When one of the participants didn’t keep its part of the agreement, you can go to a central authority and let the central authority decide how to settle the dispute between the participants.

When using Blockchain these written agreements and their terms can be programmed in software. The programming can be done in such a way that all terms you agree upon will be automatically executed. This software is called a smart contract.

Characteristics of smart contracts:

-      Smart contracts are deterministic computer programs

-      Smart contracts are executed autonomously

-      Smart contracts are decentralised

-      Smart contracts usually use an oracle

Smart contracts are deterministic software programs

Smart contracts are basically deterministic computer programs which is replicated and executed on the Blockchain. A computer program is deterministic when it, given a certain input and certain start values, always will provide identical outcome. The execution is fully predictable. 

Smart contracts are executed autonomously

The participants agree upon the terms of their agreement and this is programmed in the software. The program includes all possible outcomes of the agreement. This enables the smart contract to be executed without any human intervention after both participants activate the smart contract. The smart contract will be executed automatically and perform actions based upon the terms of the agreement.

It is not possible to roll back a smart contract, it will automatically execute itself based upon the programmed agreement. There is no third party necessary to check whether the agreement has been honoured during the execution of the smart contract. The smart contract can be seen as the judge. There is no possibility to appeal against the  judgment of the smart contract.

Smart contracts are decentralised

There is no separate third party who stores the contract or checks whether the participants are in compliance with the agreement. The smart contract is registered on the Blockchain and is visible for all participants. This enables all participants to monitor whether the participants are in compliance with the terms which have been included in the program code.

Smart contracts usually use an oracle

The smart contract usually uses an oracle. The oracle is either a technical source like a database or a person to whom this role is assigned. The oracle is the source of truth for the smart contract. The participants of the smart contract all trust the oracle to provide the correct information for the execution of the smart contract. However, they cannot check in the Blockchain whether this was indeed the correct information. When the participants do not trust a single source, they could also provide votes to multiple sources. Think for instance on using a single website to determine the weather on a specific location, or using multiple websites and then use the average result of these websites.

The oracle is can only be used as a source of information, it cannot be involved in the execution of the smart contract. The oracle doesn’t need to have any insight in the usage of the provided information by the smart contract.

An oracle doesn’t necessarily need to be a technical source. It could also be a person or institution whom signature is necessary for the execution of the smart contract.

Let me provide an example of using an external objective source. We all know people who sport for charity, like cyclists who climb the Alpe D’huzes as many times as possible on their bike. They will make an agreement with sponsors to pay a certain amount for each time the climb the Alpe D’Huzes. The organisation of this event will measure the times a sporter climbs the Aple D’Huzes and publish the results on their website.

The smart contract can use this website as its oracle to calculate how much money the sponsor has to pay to the charity. The smart contract can automatically take care of this payment to the charity.

Legal implications of smart contracts

Some people see smart contracts as the technology which will take away the need for lawyers. The smart contracts empower the participants to create unchangeable program code which will be executed in an automated way based on the terms being met.

This indeed will have big advantages in certain applications. However, the DAO affair in Ethereum has demonstrated that this can go wrong. Someone earned million dollars due to noticing and exploiting an error in the program code.

This brings us to the question what should be leading, the meaning of the agreements between the participants which are included in the smart contract, or the actual program code of the smart contract. Another question is the liability of the concerned parties for the smart contract. Who is responsible when something goes wrong. The programmer, the Blockchain platform, or the client of the programmer. Not always will it be clear from the beginning which national law will be applicable and which judge.

In the DAO affair in Ethereum the program error was solved by a change in the Blockchain software in which the smart contracts are executed.

A smart contract can represent a legal act, which raises the question whether law can be caught in program code. Law could be seen as an algorithm, certain actions have certain consequences. Which can be caught in the well-known IF THEN ELSE algorithm.

Large parts of execution of laws and regulations are supported with information systems. Does this mean than all laws and regulations can be caught in program code? The idea of code is law will lead to some problems. Our defective insight in facts lead to defective insight in standards. Reality can always surprise us, which can be caused by the unexpected, but also by the unthought (that what already existed, but wasn’t taken in consideration).

This could lead to undesired results of maintaining the agreed standards.

As mentioned before a smart contract will be executed autonomously, meaning we cannot change the rules while the smart contract is executed.

In our law we have several solutions in case the reality surprises us. This will enable judges to change the standards based on for instance reasonableness and fairness, principles of proper governance and unlawful act.

Despite above mentioned, we can use smart contracts to represent a lawful act. In some cases we could use the regularities and in some cases we should consider irregularities.

The oracles can be used to pause a smart contract process, which leads to space for human intervention. Smart contracts which execute a transaction in a lawful way, will have to include a role for a human actor. Who is enabled to, in exceptional cases, influence the execution of a smart contract or even roll back the smart contract.

When you would like to know more about Blockchain or schedule one of our 2-hour introductory workshops at your location, please contact me via Linkedin. 

Edwin Kappert is Managing Consultant at Delta Science BV

To view or add a comment, sign in

More articles by Edwin Kappert

  • Main Blockchain Platform Types

    The Blockchain I described in my previous blog, described the properties of a public Blockchain. At the moment, there…

  • Introduction to Blockchain

    Blockchain and Distributed Ledgers are a newcomer in the Gartner top 10 strategic technology trends for 2017. As this…

    1 Comment

Others also viewed

Explore content categories