Blockchain Basics Series (5 part series — PART 1)
Blockchain and smart contracts go hand in hand just like the internet and the email. Smart contracts are the key to decentralization and are a crucial trustless mechanism that connects Blockchain to the real world. But what is a smart contract?
Let’s start by understanding what a contract is in a traditional sense.
What is a Contract?
A contract is a legally enforceable agreement, by law, between two or more parties, that is either verbal or written. It states the rules and the consequences of either abiding or not abiding by the agreement. It is either formal or informal.
Why do we need contracts?
Contracts protect the parties involved in making the contract by ensuring the terms of the agreement are clear and what is agreed upon will happen and if not, the penalties to be expected. Therefore contracts, provide security of transactions, minimize conflict and disputes, and protect parties’ properties and much more.
When do we need contracts?
Most of the times parties decide to make a contract when they are a little uncertain or insecure about an agreement. And because contracts are legally enforceable, they provide a sense of security.
Now that we have a general understanding of what a contract is, let’s delve dipper and understand what smart contracts are.
So, What is a Smart Contract?
A smart contract is a code in the Blockchain that stores rules of an agreement, automatically verifies fulfillment and eventually executes the agreed terms.
Therefore, smart contracts enable parties involved in making an agreement to do so directly with each other without relying on third parties.
Let’s use the example of crowdfunding.
Kickstarter is a centralized crowdfunding platform that acts as an intermediary between a product team and its supporters. Therefore to use Kickstarter you will both have to trust the platform and be willing to part with a fee for the platform’s services.
But a smart contract eliminates the reliance of a third party when making an agreement. Because it can be programmed to execute all the crowdfunding actions, which include, sharing projects, setting goals and collecting donations. Therefore, should the project raise the entire required amount before the deadline, the funds raised are automatically sent to the product team. However, should the project fail, then the money is automatically sent back to the supporters.
Since smart contracts operate inside a Blockchain, there is no middleman to control the money here. Perhaps you may ask: why should smart contracts be trusted?
Why Trust a Smart Contract?
A smart contract is built and implemented within a Blockchain, and therefore they possess Blockchain properties, which include;
Immutability: smart contracts can never be changed by anyone.
Distribution: everyone in the network gets to validate the outcome of the contract. Therefore, attempting to tamper with the contract will alert every participant to the contract who will then mark it as invalid.
How does Smart Contract Work?
Remember a smart contract is a code that contains specific terms of an agreement that are executed once specified agreed events are done. Let’s use an example to illustrate how smart contracts work.
Let’s consider a situation where Jane wants to rent out her apartment to Luke.
Now, if they decide to go the third party reliance route of renting there is bound to be extra charges for using the platform, and in case of any misunderstanding, dispute resolution will be time-consuming.
But if they choose the smart contract route, the smart contract based on its algorithm will guarantee the fulfillment of all the agreed terms and conditions. And since they are immutable, Jane and Luke cannot cheat.
In the smart contract between Jane and Luke, the following terms and events can be set:
- Creation of Independent storage that allows both Jane and Luke to put value but not take out easily.
- Luke puts money for rent in storage.
- Jane puts the address and code to her apartment in storage.
- Jane gets payment confirmation, and Luke receives the address and apartment code.
- If Luke accepts the apartment and the address and code provided by Jane are right, Jane gets the payment.
- If Luke doesn’t accept the apartment, Alice gets her damages payment, and Luke gets the rest of what he paid.
- Finally, the end of the agreement signifies fulfillment of the contract in which case the contract remains stored in the blockchain network.
Setting up agreement terms in the smart contract code ensures that both parties are happy and satisfied with the transaction.
Jane can also create a universal agreement for all future renters in which case she won’t have to keep creating a new smart contract for each new renter. With a universal agreement potential renters on the blockchain network can rent Jane’s apartments following the same algorithm Luke followed above.
A Smart contract can also be programmed such that it’s not only Jane who uses it but also anyone who wants to rent out their apartments. It can be programmed to contain specific conditions like partial payments, automatically adjusted prices and anything else a tenant would want.
What are the benefits of a Smart contract?
Smart contracts eliminate reliance on intermediaries when making an agreement. And without the presence of intermediaries’ smart contracts cut down on the cost of processing and executing agreements.
Without intermediaries, you and the intended party are the only participants in making the contract. The network automatically executes the contract. Therefore you have the assurance of freedom of transacting without any third party interference of indulgence.
Since smart contracts are automated you are assured of the absence of human error. And without human errors, the accuracy of the documents is not debatable.
Blockchain distributed ledger negates the use of central point of access to your documents. Without a central point of access, it becomes hard for any hacker to access your documents. Not to forget the encryption behind blockchain technology that also makes it hard to intrude in the network.
Smart contracts ensure your documents are safe through encryption and distribution on the distributed ledger. Therefore it creates trust in an individual that the documents will not be tampered with by anyone.
Smart contracts when stored on the Blockchain can be duplicated many times to ensure availability of the documents at any time. Therefore even if you lose one document, there is always another duplicate stored on the Blockchain.
Where can Smart Contracts be used?
Smart contracts can be in almost all industries. Here are a few notable examples:
Smart contracts can play a role in improving the healthcare sector through quick access to healthcare insurance and medical data across hospitals globally.
For example, Dentacoin is smart contracts that aim to create a community among dentists and patients so as to make dental health affordable globally.
Smart contracts can improve the banking industry through efficient and cost-effective transactions. The smart contracts automated transactions will help the banking industry increase productivity. Without the reliance on intermediaries or third parties, there is bound to be a decrease in fraudulent transactions which cost exorbitant losses to the industry.
For example, KYC-Chain uses smart contracts to enable easy sharing of clients’ regulatory information from one company to another. Therefore it reduces both time and costs of restarting the regulation process from company to company.
Smart contracts can be used by Governments to ensure easy and efficient delivery of government services. Without the traditional means of government transactions, citizens will be able to access quick and sufficient service delivery. Smart contract will also be able to reduce fraudulent activities in Government because of the easy accessibility of the contracts for verification by any person.
For example, Horizon State is an Australian company aiming to help the democratic process by providing an efficient voting system. The blockchain-based voting system is to support, secure and cost-effective voting parameters. Therefore it will enable transparent and unbiased voting in all countries globally.
Smart contracts usher in a new and improved way of business relations. By using Blockchain technology, it incorporates the use of Blockchains advantages such as immutability and distributed storage making it credible and more reliable than traditional agreements.
In a nutshell, smart contracts enable you to exchange money, shares, property and many other things of value in a transparent and conflict-free manner without the services of a third party.