What Is A Smart Contract In Blockchain

Cover Image for What Is A Smart Contract In Blockchain

Trust is the most important thing when it comes to friendships, relationships, etc. But when it comes to business trust alone is not enough. Here comes the role of a contract.

A contract is a legal agreement between two or more parties. It tells about all the terms and conditions to which both parties agree to. This is done so that no one can later neglect the terms which were stated before.

What is a Smart Contract

A smart contract is just like any other contract but the terms are written in code and stored on the blockchain network. It is a self-executing contract which means it does not require a 3rd party to do that.

Let us take an example and understand. Suppose there is a guy Anil who is a freelancer. He got a project and he made a contract with the client that he would deliver the project in 6 months and then he would get his final payment of Rs 50,000. Now Anil and his client made a smart contract and the terms were if the project is delivered then the funds are released. Now when Anil completes the project and the client receives it, the funds are released. The contract is completed.

The idea of a smart contract is similar to bitcoin. The idea of Bitcoin was sending and receiving money between two parties without a middleman like a bank. Similarly, smart contracts are contracts which are created and executed without a middleman like a lawyer.

Are they safe?

Yes of course they are safe because smart contracts are stored in blockchain.

It has 2 properties:

  1. Immutable

  2. Distributed

Immutable

In Blockchain if write something once it is nearly impossible to change which makes it a lot more secure. If a smart contract is written once and the terms and conditions are specified it cannot be changed again. This increases its security and no one can change the terms and conditions in between.

Distributed

Blockchain is a distributed network which is run by many people all around the world. Suppose someone wants to release the contract without having met the terms and conditions, he/she cannot do that because for it to happen it has to be validated by all the nodes running the network around the world.