In our last article on Ethereum, there was a brief mention of smart contracts. Since it is a critical aspect of the Ethereum protocol, I have described it in simple terms below. I hope this article will help lay the foundation for future articles on Ethereum.
A contract is an agreement between two or more parties. Some contracts are verbal, and some are written. Most contracts are legally binding. A contract creates, defines, and governs mutual rights and obligations among its parties. It involves the transfer or a promise to transfer goods, services, money, etc., but is not limited to this.
For example, getting invited to the wedding reception of a friend. You are actually getting into a verbal contract between you and your friend. Based on this oral contract, everyone is taking time and effort to ensure their presence and participation at the reception. The contract may involve the date and time of the event, the theme, the attire, etc. If you accept the invitation, you actually agree to the contract. You should be on time and match the theme or dress code of the event.
Similarly, buying a movie ticket is a written contract between you and the Multiplex. The Multiplex agrees to screen the movie you have chosen at the specified time, subject to certain conditions. A close inspection of your ticket or a visit to the Multiplex's website will reveal the details of the contract. What happens if they are unable to screen the entire movie? What happens if they double sell your seat? What will happen if they catch you filming or attempting to pirate the movie? Almost every conceivable scenario is written into this contract. Unlike the previous example of attending your friend's reception, your agreement with the Multiplex is legally binding.
There is one major flaw in the above examples. It assumes that all parties can be trusted to follow through with the contract's outcomes. Take the example of your friend's reception. Even if you arrive late, you may be allowed to join the party. But what if the contract has financial outcomes linked to it? Let's look at an example between Bill and Ted.
Bill bets Ted Rs. 5000/- that he will finish the Mumbai Full Marathon in under 4 hours. Ted is so confident that Bill will not achieve this goal that he agrees to the bet. Come race day, Bill has worked hard and executed a perfect race strategy to complete the race in 3 hrs and 55 mins. Bill is the clear winner of the bet. But Ted refuses to pay him, claiming that Bill must have cheated. This illustrates the problem with non-smart contracts or agreements. Even if the conditions of the agreement are met, both parties must trust each other to fulfil the deal. I am confident that you have experienced a similar breach of contract (or trust) at some point in your life.
But what if we could automatically execute the outcome of the contract when the conditions are met? Using computer code, a smart contract digitizes the terms of an agreement to automatically run when the contract terms are met.
For example, when purchasing a new vehicle, you could get into a tri-party smart contract between your bank, the automobile company and yourself about the purchase terms. The use of the car will be governed purely based on this contract. So if you have missed your monthly loan repayment, the car will refuse to work, and the bank will be notified of its location. Of course, the contract would include conditions to ensure that the vehicle didn't stop working while being driven or was parked in a dangerous place.
Let's take another case. Maybe you have supplied some goods to a company, and both parties agreed that a portion of the payment would be released after the warranty period. This is done with a bank guarantee, or the money is just held with the client. The vendor is at the mercy of the client and has to hope that they will get their money after the defects liability period. What if such an agreement is executed using a smart contract? The balance money would be released immediately against the completion of the warranty period. In fact, the goods supplied could even have a direct link with the contract through sensors and internet connectivity. It could relay the relevant information to the smart contract and send signals to execute it.
Yet another example is of a contractor. Very often, the payment terms with the client are based on stagewise work completion. The contractor does not know if the client has the requisite funds to pay before starting each stage of the work. What if both parties enter into a smart contract. At each stage, the contractor is notified that the client has transferred the requisite funds into an escrow account. The payment will be credited to the contractor when they complete the stage.
You could create a smart contract that executes the conditions mentioned in your will immediately upon receiving your death certificate. You could design the will to be executed automatically after death or after completing your last rights.
In the era of online commerce and trade, new ways to formalize the relationships between institutions are necessary. The possibilities are endless. It is essential to acknowledge that the human factor fundamentally separates smart contracts from traditional contracts. A new breed of "smart" contracts far more functional than their inanimate paper-based ancestors is required.
Ethereum was created to facilitate this new need for smart contracts. How this was achieved, we will discuss in the following article. We will also explore some of the most exciting forms of smart contracts that have been developed on the Ethereum blockchain.
Thank you for reading, and don't forget to subscribe to the newsletter by clicking below and entering your email ID below.