Smart contracts are agreements between two or more parties that follow instructions from lines of code, to ascertain particular terms of applications. A blockchain holds and executes these lines of code across a distributed and decentralized network of users. The role of the programmable lines of code is to control the execution of the agreements. Hence, making a smart contract self-executing, tractable, and irreversible.
Smart contracts initially came into existence after the invention of “Bit Gold” by Nick Szabo.
Szabo, a cryptographer and computer scientist wanted to actualize a digital concept for currencies as had first been idealized by a Stanford Computer Scientist, Roy Amara.
The American computer scientist described these contracts as programmable transaction protocols that execute terms of a contract between various parties. In his 1998 paper, Nick Szabo proposed their application would cut across synthetic assets such as bonds and derivatives.
Well, so you’d ask what are their benefits? Presently, these contracts enable automatic execution of two transaction types.
- Making sure payment of funds upon satisfaction of certain events and
- Implicating parties that fail to meet any of the obligations of the events by imposing penalties.
As you might have noted, neither cases require the intervention of a judicial system or an escrow service. A process that reduces the operational and deployment costs of any contracting process.
Applications of these contracts are by far diverse. Situations like the exchange of anything of value such as money, property, and services would benefit widely from their application. Smart contract transactions would take place across vast continents while at the same time facilitating transparency, eradicating middlemen, and eliminating the question of trust among participants.
After parties have entered into a contract, the program implements the terms and conditions agreed upon by the parties. And then records information about the terms and conditions in a blockchain. It is worth pointing out that Bitcoin was the first cryptocurrency to implement basic contracts.
Unfortunately, Bitcoin lacked the limitless application of the technology as it was limited to only currency.
Ethereum came into existence and replaced bitcoin’s restrictive programming language with a specific language. Therefore, giving Ethereum developers an upper hand in developing Ethereum smart contracts.
The Ethereum white paper refers to these contracts as autonomous agents. The codes are then run over the Ethereum virtual machine and processed in Byte-code. Without contracts, node networks would not validate bitcoin or Ethereum transactions. Note: a blockchain will only validate transactions if particular conditions are met. For example, Ethereum will run a smart contract only when a user instructs it to do so, but on the condition, they have sufficient transaction fees.
Imagine a product just arrived at a warehouse. A warehouse agent scans the product and the code requests the approval of the product. Once after obtaining approvals, the contracts immediately transfers buyer funds to the seller. The efficiency here is eradicating the tedious process of soliciting for payment among buyers, while buyers would cut down payable account costs.
Don’t you think this process would positively affect working capital requirements and ease financing operations? Furthermore, they are also enforcement tools. Take the instance of a programmable instruction for shutting down access to a server system following payment defaults. For example, the right to access premium content would automatically be inhibited following a customer failing to honor payment obligations.
How do Smart Contracts Work?
Smart contracts work by executing certain procedures when a function meets the predefined criteria of a parameter. The advent of blockchain and the decentralized system has hyped the implementation of this innovation. This is mainly because the initial challenge for adoption resulted from scalability issues. With blockchains, computer scientists found a means of solving the scalability equation.
Ideally, these contracts work like a vending machine. You only drop a given amount of digital currency into the vending machine; and your driving license, estate property ownership, or escrow processes your account. If the parties to a contract default any terms of applications, the contract enforces a predefined set of instructions.
What Makes Smart Contracts Enforceable?
Imagine that two parties entered into a set of agreements. The event that these agreements are legally binding to both parties, translates them to being enforceable; let’s say by state laws or by a court of law. To figure out the enforceability of an agreement, courts usually scrutinize the common legalities of offer, acceptance, and consideration.
A state court will make sure that both parties have or are willing to satisfy these legalities. In a jurisdiction or traditional agreement, parties achieve these basic legalities through ancillary contracts. Take for instance an insurance agency developing a flight insurance product. This product would automatically issue a payout to an insured if flights get delayed by a given number of hours.
The product application would calculate the delay by way of delineating how the delay took place. Meanwhile, this is set forth by employing a text-based contract which contains the actual formation of the contract. The formation of the contract initiates after payment of the premium.
Furthermore, the execution of contracts could take the shape of an automatic payout, which happens after a verifiable delay. An ancillary contract handles the initiation and execution of the agreement. In this case, the insurance agency has delineated an offer to provide flight insurance and has one of the considerations as the payment of premium.
Contracts are Interdependent
Smart contracts could work either on their own or alongside any number of other contracts. The implementation is configured in a way that they are dependent on each other. Sometimes, the successful execution of one, will trigger the initiation of the other, and so on.
Blockchain developers have already implemented this interdependence on the Bitcoin network and several other decentralized digital systems. Thereby, the underlying network has various predefined laws that can execute independently or autonomously, without the need of third parties.
Contracts are Tamper-Proof
Tamper-proof records are those records that second parties or third parties cannot modify. The autonomy of smart contract functions should execute without interference by any participants to the agreement.
Successful execution of a transaction on the bitcoin blockchain will grant the subsequent execution of the following transactions. The blockchain will record the subsequent transaction without modifying the electronic record. Tamper-proof execution of any transaction ensures that the performance of a system is autonomous and only relies on the initiation and execution of the preceding function.
Are Smart-Contracts Contracts?
As the name quips one would wonder, is a smart-contract, a contract at all? What are the crossroads between code and contract? We all to some extent, understand what contracts execute and what a computer executes.
Whether they are indeed contracts lies in the fact, whether an interconnection lies between both code and contract. In case this interconnection does not exist, can the gap be bridged? It’s is worth noting the development of such a solution requires addressing a unique legal question and cracking a technical problem.
Therefore, a successful agreement will execute technologically and still make sense legally. Additionally, it must be transparent, simple, and trustworthy enough for any network to uphold it. After all, it is legally binding and smart because it deploys an agreement by way of executing code.
Code and Contract
There is no general similarity between enforcement of a legal agreement and the execution of machine instructions. The idea for these contracts was to bridge the gap between the execution of machine code and enforcement of legal contracts. Deployment of such coded contracts would rely on the following domains.
Human language text
Coded into machine executing software using machine language
Parties draft agreements using human language
Comes into effect after electronic execution and deployment
Comes into effect following an agreement by parties
Machine software/computers conduct the process
Human parties enforce the process
Execution follows particular instructions set to execute performance
Execution is per human language interpretation
Automatic execution of process
Parties can either agree or disagree on an error
Lacks ambiguity (Code is only executable if it’s clear)
The foundation of any contract would, therefore, embody both parts of machine code and legal contracts. But only by eliminating the limitations on either side. This was Nick Szabo’s original idea. As you can observe, a major similarity is the implementation of a specialized language. The implementation of these languages follows a multiplicity of formal structures and executes following a well-defined logic set. A perspective worth considering when evaluating the contract-ness of any agreement is to ignore this underlying gap. Does it matter that a smart contract has the same or different enforceability as a traditional contract? If it does matter; others would argue it out as baseless, given both contracts perform similar functions.
Features of Smart Contracts
There are three fundamental parts to consider.
- Signatories to an agreement.
- The subject of an agreement.
- Specific terms of an agreement.
Signatories to an agreement – More than one party, either agreeing or disagreeing with an agreement. For the parties to agree/disagree, there must be terms and conditions. Additionally, the signatories must either agree/disagree using digital signatures.
The subject of an agreement – The subject to an agreement exists within the bounds of any contract. The code should have simple, unrestrictedly, and clear access to the three objects. The most important object among the three, since the inception of contracts, was the subject of an agreement. The restriction part of contracts would only be solved until the birth of bitcoin, in 2009.
Specific terms of an agreement – Any contract will have a set of requirements from both parties of an agreement. These requirements have to be organized logically and described arithmetically using machine language. In addition to the requirements, the contracts must function alongside rules. These rules ought to have rewards and implications, depending on how participants adhere to the terms of the agreement.
Smart Contract Environment
Smart contracts will function appropriately when they have a suitable environment. This environment must support the deployment of cryptographic functions and the implementation of public keys. Furthermore, users must be able to sign off transactions using unique cryptographic keys. Keenly, this is the very underlying concept of most cryptocurrencies.
Additionally, another important component is a database. The database must be decentralized, trustworthy, autonomous, and transparent. Ideally, the entire contract system will need to be decentralized. The perfect environment for deploying a contract is a decentralized blockchain such as the Ethereum ecosystem.
A contract must rely on reliable digital data sources. The reliability would be dependent on speed, trust, and security. Therefore, this would entail the implementation of HTTPS, SSL Security certifications, and a plethora of automatic software (secure -connection) protocols.
Why are Smart Contracts Important?
Autonomy – These contracts eliminate third parties from intermediating transactions and processes. This gives contracts full control over their agreement.
Trust – These contracts encrypt data and safely store it on a secure, shared ledger. The use of this contract eradicates the need to trust participants to an agreement. Unlike traditional contracts, these contracts do not have a bias. Therefore, no need for people to trust you or you to trust them.
Savings on Costs – These contracts eliminate middlemen such as estate agents, notaries, and any other intermediary services. Therefore, also eliminating additional costs associated with their services.
Safety and Security – These contracts have extreme security protocols and are therefore difficult to hack. Complex cryptography surrounds the deployment of blockchain technology. Thereby ensuring participant data is secure.
Efficiency – Smart contracts save the hustle of manually processing paperwork, storage, and distributing them to particular locations.
Backups and Duplicates – Blockchain technology is innovated to accommodate numerous duplicates and data backups to avoid loss of information. Therefore, users remain assured their data is in safe hands.
Traditional Contracts vs Smart Contracts
Days to process vs Minutes to process
Autonomous remittance vs Manual remittance
Escrow must be present vs No need for escrow
Expensive costs vs Negligible costs
Law presence is necessary vs Lawyer presence not necessary
Physical presence vs Virtual presence
Where are Smart Contracts Used
Smart contracts are used in the deployment of secure transaction records. Cryptocurrencies are the most exciting application of smart contracts. Automation and authentication of blockchain systems also rely on the implementation of smart contracts. You are going to observe the vast application of smart contracts in the examples below.
Moscow City is currently deliberating on the need for blockchain to conduct a national referendum. Despite using electronic digital systems to vote, a lot of elections have been flaunted for inaccuracies. Computer scientists propose smart contracts as the single best solution for election fraud. Validating a voter’s identity and recording the identity on a blockchain would go in handy in preventing manipulative elections. The contracts would then be used to execute actions once the election is over. It is worth noting that a blockchain network is impossible to modify, and would, therefore, go a long way in eliminating many cases of election fraud
Peer to Peer Transactions
The birth of Bitcoin and Ethereum stems from the application of smart contracts in peer to peer transactions. Individuals and businesses can take advantage of smart contracts to engage in transactions such as securing service deployment. Blockchain companies also launched Initial Coin Offerings (ICOs) form the backbone of smart contracts. There is a possibility of autonomous peer to peer transactions replacing traditional currencies.
Trade and Finance
According to a study by Santander, blockchain technology will contribute to $20 billion of savings by the year 2022. Smart contracts are used to automate workflows and increase the efficiency of clearing calculations. Presently and within the bounds of traditional finance, these processes are slow and labor-intensive. Smart contracts will, therefore, automate many functions and cut down work hours. Thereby contributing to huge amounts of savings and fewer errors.
Improvement of how insurance agencies process insurance claims. By following a set of procedures, the system will outline payouts and double-check errors. This will save the insurance industry from the loss of millions of dollars and prevent fraudulent claims. Meanwhile, the insurance industry will benefit from efficiency, reduction in processing time, reducing errors, and cutting down costs.
The innovation of pay-as-you-go insurance cover will also depend on smart contracts and the Internet of Things (IoT). Pay-as-you-go insurance policies enable immediate execution of insurance claims following an accident. Smart contracts would, therefore, be used in the processing and validating driving licenses, identification information, policy details, driving records, and accident reports in a speedy manner.
A backlog of data plagues the medical field. The privacy and sensitivity of medical data, especially from patients, is of great importance. Encrypting medical information on the blockchain is one way to secure this information. This is not only subjective to patient information but also new drug formulas and test results. Therefore, the technology would be used in handy while securing and deploying these data across blockchains.
Smart contract code should be perfect and absent of bugs. If this is not the case, ambiguity might occur among contract parties. Additionally, cybercriminals could easily exploit vulnerabilities and penetrate smart contract systems. The code should be fail-proof.
The regulation of these networks is also under scrutiny. The technology is still nascent and many authorities are figuring out ways to regulate. Blockchain smart contracts perform instructions under a policy dubbed “Code is the law.” However, questions exist about what happens if they fail to execute according to terms of an agreement. Could a fundamental execution failure be rescinded in a court of law? How about taxation? Will authorities tax-smart contracts?
Without a doubt, however, these challenges only exist within the confines of the technology being young. Meanwhile, smart contracts will perfect over time and the innovation will be a key part of society.