The Story of Smart Contracts
The idea of ‘smart contracts’ was first coined by Nick Szabo, a computer scientist and cryptographer, in a paper published in 1996. Also called as self-executing contracts, or blockchain contracts, smart contracts are simply scripts of self-operating codes that run exactly as programmed, allowing for transactions or agreements to be carried out in a trustworthy manner. (No more chasing after people who didn’t hold their end of the bargain, or hiring lawyers to fight your case!)
This eliminates the need of services from a middleman, and cuts down on the possibilities of conflicts, downtime, fraud or interferences from third-parties. Thus, the implementation of smart contracts delivers superior security and low transaction costs as compared to traditional contracts.
From smartphones to smart watches, there is a repertoire of smart devices. And, appropriately so. This is the age of automation, after all.
And that’s precisely what a smart contract does.
It converts a traditional contract into computer code to automatically facilitate the exchange of value (be it money, property, shares, assets or content) when specific conditions are met or ‘triggered.’ These conditions could be internal or external (this would require an external source of knowledge called as an ‘oracle.’ For instance, a weather sensor to check for potential damage to crops from rain).
Not only do smart contracts incorporate all rules and legalities surrounding an agreement, but also enforces the terms of a relationship between the buyer and seller through the code. Simply put, smart contracts smoothens out the execution of tasks, and leaves little room for contentions.
The code is the law.
Smart contracts function on the blockchain and incorporate the use of cryptocurrency/ tokens. Think of it like a vending machine- You put money into it, feed the code, and obtain your snack of choice. A smart contract works with a similar framework. In a nutshell, it works on ‘If This Then That’ ethos. For instance, here’s a very simplified example: “if you send this payment, then that car is yours.” This settlement is witnessed by the entire network, and cannot be tampered with. Failure to pay would result in a failure of delivery, and vice versa.
Although such contracts can be written for any blockchain (FYI: Bitcoin laid the groundwork of transacting on blockchains, but has limited abilities when it comes to smart contracts. As of now, there are a handful of different projects implementing smart contracts), the Ethereum blockchain is the pioneer behind the rising popularity and use of smart contracts. With the creation of Decentralized Applications (DAPPs) and Decentralized Autonomous Organizations (DAOs), Ethereum was specially designed to support smart contracts. Ethereum Virtual Machine (EVM) runs on the Turing Complete program which gives unlimited computing capabilities, as opposed to other blockchains. Smart contracts on Ethereum are coded using the language called Solidity, and the EVM executes them using ‘bytecode.’ You can specify as many conditions and requirements in smart contracts as you wish. However, each function on a smart contract utilizes a certain amount of fee i.e. gas. This is paid in Ether tokens, and defines the computational difficulty to execute the particular function.
Smart contracts have the potential to be used in a diversity of applications and scenarios. From secure voting procedures during elections, applications in Internet of Things, renting your apartment, management of supply chains, funding crowdsales, insurance companies processing claims, to banks using it to issue loans automatically- The list is endless!
But, why use smart contracts? Since smart contracts are distributed, stored and supervised on a blockchain, this property makes them immutable, so the code cannot be tampered/ changed without your prior knowledge. It increases transparency, speed, and cost effectiveness of the process by removing intermediaries and paperwork, all the while offering timely delivery of assets. It is also more accurate since one doesn’t have to fill out heaps of form, safe because hacking is difficult, and has an additional backup plan by creating duplicates of the contract across all the nodes.
On the downside, however, smart contracts do have their share of defects. For example, human errors could incorporate flaws in the coding, to become a cause for loopholes in the agreement. This was best experienced with The DAO, a human-less firm in-the-making, which costed the company millions of dollars after a hacker siphoned all the money away because of a fault in the code. Moreover, pre-determination of all factors and scenarios makes smart contracts rather rigid, and leaves little room for improvement and additions, especially regarding grey areas. The code isn’t interactive, as it doesn’t take into account new variables other than the ones specified beforehand. Although experts are trying to sort these hurdles constantly, the nascent technology does dissuade many a people from adopting it.
Opposed to media frenzy and hype, smart contracts wouldn’t put lawyers or realtors out of employment. Smart contracts could be a revolutionary tool to not bridge trust between parties, but also link legal firms and computer programming together. To name a few aspects of the technology, this could create standardized smart contract templates, or lead to automated auditing. Another avenue could also see smart contracts merging into a hybrid of paper and digital content.
As rightly said by Gavin Wood, the CTO of Ethereum:
“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.”