A smart contract is a self-enforcing piece of so ware that is managed by a P2P network of computers. Smart contracts are rights management tools that provide a coordination and enforcement framework for agreements between network participants, without the need of traditional legal contracts. They can be used to formalize simple agreements between two parties, the bylaws of an organization, or to create tokens.
Smart Contracts are written and spoken agreements between two or more parties that are enforceable by law. In our society contracts have been popular for decades.
However, in this era of technology, especially, decentralized technologies, contracts have become “smart.”
The word smart contract has been thrown around quite a lot in the blockchain ecosystem but it is often confusing and difficult to understand.
In simple words, a smart contract is a self-executing contract, the behavior of which is defined by its creator programmatically. Smart contracts, unlike real-world contracts, do not need to be enforced, rather they enforce themselves automatically. They aim to reduce costs and provide security that is superior to traditional contracts.
The term smart contracts were first used by Nick Szabo in 1994. Nick Szabo was a computer scientist, law scholar, and a cryptographer.
Smart contracts function on one simple logic – IFTT – which means “If This Then That” logic. In simpler terms, it implies that every action done by the user pertaining to a smart contract has a subsequent action to be performed. Vending Machines are a popular example to explain this technology.
In a vending machine, you enter some money and then you enter a code to determine what item you want to purchase. Then that particular item falls off the shelf. Putting it into the IFTT logic – “IF the person enters enough money and types a code, THEN drop that item off of the shelf.”
The smart contract is stored inside the blockchain which makes it immutable, decentralized and worthy of trust. Let us now take a real-life example to see how smart contracts actually function.
Kickstarter is a popular crowdfunding platform wherein people put their projects and interested users contribute to support them. If the funding goal is reached, the projects can get their funds. The interaction is made possible due to the presence of Kickstarter which also take its cut for its services. If we replicate this model with the help of smart contracts, Kickstarter is no more required to facilitate such transactions.
The smart contract can be programmed to hold the funds until the funding goal is reached. If the goal is achieved the money can go to the project owners and if not, then it can be returned to the contributors. This makes the system efficient and cheap.
These examples are just the beginning of what this technology can achieve. It has a variety of use cases in healthcare, automobile, real estate, law, accountancy and other use cases that we have not even thought of. As the Ethereum CTO, Gavin Wood says,
“The potential for [smart contracts] to alter aspects of society is of significant magnitude. This is something that would provide a technical basis for all sorts of social changes, and I find that exciting.”