Smart Contracts — simply explained

Blockchain Presence
Blockchain Presence
3 min readFeb 24, 2020

Welcome back to our blog series simply explained. Now that we know what blockchain is, we will have a look at smart contracts that take advantage of this technology.
A smart contract is a digital contract based on blockchain technology. It is a contract that executes itself automatically once a certain condition is met. This concept was first described by Nick Szabo back in the 90s. He was a computer scientist and cryptographer. The most famous platform that offers smart contracts is Ethereum, but by now there are many more platforms like EOS and NXT for example that offer smart contracts as well. We can compare a smart contract to a gumball machine. You insert a coin, then a piece of gumball rolls down the machine. This suggests that a smart contract is based on an if-then-rule. If the coin fits, then you will receive your piece of gumball. As mentioned earlier, smart contracts are based on blockchain technology. This means that the contract with the terms and conditions is saved on many different servers and whenever a transaction takes place, all servers get notified and update their version.

Let’s have a look at an example of a smart contract. We have Alice and Bob. They want to bet on the outcome of the upcoming soccer game. Since there is no third party that can make sure that no one is cheating, they decide to write the terms and conditions in form of a smart contract code. The winner will receive both coins. If both are right, they will each get their coin back. If none of them made a correct bet, they will not receive anything. Alice bets on Team A and Bob on a tie. Both pay one coin which the smart contract keeps until the game is played. Team A wins the game. The smart contract pays out both coins to Alice.

The smart contract helps solving issues. As all the terms and conditions are written in the code of the smart contract, Alice and Bob will not be having discussions about the outcomes/division of the coins. In general, it is said that “code is law”. This means that whatever is written in the code of the smart contract is valid and correct. In the example above, the law is that the winner receives both coins, not just one.

The smart contract comes with a lot of advantages. First of all, Alice and Bob can save an intermediary person. This saves them money making a smart contract cheaper. As “code is law” there’s no trust issues. No one can cheat. Another advantage is that smart contracts are based on blockchain technology making them very safe and secure. As we have learned in our last blog post about blockchain the smart contract is for anyone visible. All transactions are documented, transparent and irreversible. This makes the smart contract very reliable and trustworthy. In addition, it is saved on many different servers making it very hard for Bob to change the terms and conditions of the smart contract. In fact, he is only able to change the terms if he can unite more than half of all the servers which is almost impossible. Furthermore, since the smart contract is saved on so many different servers, the contract cannot be lost. A further advantage of a smart contract is its autonomy. Once a certain condition is met, the smart contract executes itself. It is very easy. A last advantage of the smart contract is its time efficiency. It might take some time to code it, but once this is done there is no more work needed.

For a smart contract to be great, safe and secure, the code cannot contain any errors otherwise it can be attacked. This means that it is up to the people programming the smart contract to ensure that it doesn’t have any errors. If there are no errors, there are no problems.

In conclusion we can say that a smart contract is a self-executing contract based on blockchain technology

--

--

Blockchain Presence
Blockchain Presence

Blockchain Presence is an innovative blockchain oracle solution developed by a project team at the University of Zurich between 2019–2020