In years not so far past, to execute a business deal, both parties involved had to draft and sign a contract in the presence of a trusted third party. This contract would stipulate the terms of the deal, what each party stands to gain on the satisfaction of the deal’s conditions, as well as the consequences for failing to fulfill their part of the bargain. This has time and again proven to be a very tedious, time-consuming, and expensive process. Enter smart contracts.
Defining smart contracts
In the 1990s, a computer scientist from the US named Nick Szabo became the first person to coin the phrase “smart contract.” In his definition, he gave the example of a vending machine that accepts currency and releases the user’s snack of choice. He was defining a self-executing contract that requires no third party’s input or oversight.
Smart contracts are self-executing agreements written on computer code that is permanently stored on a blockchain. These contracts work by facilitating a transaction after both parties have satisfied a predetermined set of terms.
In addition to facilitating this transaction without needing a third party, they offer complete transparency and security. What’s more, since the data is immutably recorded on the blockchain, the contract cannot be tampered with or otherwise edited. Further, it promotes confidentiality as the identities of either party are kept anonymous throughout the whole process.
How they work
To better understand how these contracts operate, let’s consider an example. Imagine two friends, Leo and Chris, just before a World Cup final, arguing over what team is going to take the cup home. In the heat of the argument, Chris bets Leo $500 that his team will win the tournament. Leo accepts the bet and matches his offer, betting that his team will beat Chris’s. Unfortunately, neither Chris nor Leo trusts their friend to honor the bet when the match is over, and it is not feasible for them to employ a third party to oversee this contract.
In such a case, they can utilize a smart contract platform like Etherparty. They each create a blockchain identity and set the terms of their contract on the platform. This contract stipulates that when the match is over, the loser pays out $500 to the winner. As soon as the final whistle goes, this platform will search for the results online, identify the winning team and transfer the funds from the loser’s account to the winner’s. After it executes this, the contract will terminate until it is called upon again in the future.
Types of smart contracts
1. Smart legal contracts
This is a type of smart contract that bears legal ramifications in the event either party acts against the terms of the contract. Since smart contracts are a relatively new technology, their legality is up for debate in most countries, while some countries have less stringent regulations that allow for their legal enforcement. If and when smart contracts are globally accepted as legal, they can be incorporated into mainstream finance, real estate, government subsidies, etc.
2. DAOs
DAOs, which stand for Decentralized Autonomous Organizations, are blockchain-based communities. These communities are frequently regulated by a set of rules written in blockchain code. These rules, which are stored in smart contracts, regulate the actions of each individual member of the community in this way. If a member violates these guidelines, a planned course of action is initiated against that member. DAOs are made up of multiple of these smart contracts that work together to oversee and control their communities’ members.
3. Application logic contracts
This type of smart contract contains application-specific code that works in tandem with other blockchain-based programs and applications. Such contracts are used to facilitate the merger between blockchains and IoT. They help in communicating between devices.
Perks of smart contracts
Smart contracts carry with them various perks when compared with their traditional physical counterparts. For one, they are transparent in that both parties know the terms they agree to and the consequences that may befall them should they fail to meet these terms. These contracts also save time as they are executed instantaneously the moment the terms are met. Additionally, since they require no human input, human errors are greatly minimized.
The data in a blockchain is usually encrypted cryptographically. This means that, even though the data is kept publicly, only the data’s owner can access and decode it. As a result, smart contracts ensure that the data contained within them is safe and untampered with. Furthermore, because these contracts are usually completely objective in their implementation, all parties involved may trust the system to be fair, as no collusion is possible. Additionally, because they handle the due diligence that comes with entering into contractual commitments and eliminate the need for a third party, they tend to save money.
Disadvantages of smart contracts
We have established that these contracts are virtually tamper-proof and immutable. This could present hurdles if both parties want to modify existing clauses or add new ones. Additionally, the fact that they keep the involved parties anonymous could prove problematic if any party defaults and need to be tracked down. Since they are still a new technology, smart contracts can also be vulnerable to hackers who exploit their weaknesses.
In a nutshell
Smart contracts are pieces of code that execute autonomously and are permanently stored on a blockchain. They are used to enact transactions once both parties involved have satisfactorily met their contractual obligations. This way, they save time and costs that would have come about had we opted to utilize a traditional contract, which more often than not involves a third party. To that end, there are three types of these contracts, namely DAOs, smart legal contracts, and application logic contracts.