What are smart contracts ?

Cryptoblok
6 min readJul 26, 2021

--

You do not need to know who you are contracting with.

Smart contract is digital contract designed to execute automatically when certain predefined conditions have been satisfied.

With smart contracts, the terms of the agreement between the contracting parties are encoded, and the code is accommodated in a publicly distributed blockchain network.

The self-execution attribute of a smart contract implies that there is no need for a third party such as a lawyer or government to guarantee fulfilment of the contract, contrary to the case for standard paper contracts.

Practically speaking, think about a smart contract to be a digital version of a regular paper contract that has the ability to enforce terms of the agreement and automatically verify fulfilment, entirely by itself.

Smart contracts and how they work?

The original proponent of smart contracts was Nick Szabo, the inventor of an unsuccessful digital currency called “Bit Gold” in 1998.

He defined a smart contract as a computerized transaction protocol that executes terms of a contract.

His intention was to stretch the functionality of electronic transaction methods into the digital sphere (Investopedia).

It is important to know that practicality of smart contracts is facilitated by blockchain technology. A block chain is a decentralized database that stores data in chunks called blocks, that are linked in a chronological order and secured using cryptography.

The database is maintained by all members of the network, who each have a copy of the database. This means that in order to alter data in a database, all other copies of the database must be altered, one-member or bad actor cannot therefore manipulate the database.

The contractual parties have to first define and agree on the terms of a contract. Once they are finalized, they are translated into programming code.

The code embodies instruction on how the contract should be executed through a range of conditional statements. These statements are in the format of “If/when…. then” which describe the conditions to be satisfied.

The code is stored in the block chain wherein copies are replicated throughout the network. The contract is then automatically excecated when the predefined conditions have been met.

Its correctness is verified by computers in the network and the blockchain is updated as soon as the transaction is completed.

The implication is that this transaction is irreversible, all pertaining records are permanently stored, and the results can only be seen by parties with permission.

The actions effected by smart contracts can range from transferring money to an account, transferring ownership of property, registering a car and the possibilities are endless.

For instance, in the case that Lisa has contracted Emmason to develop her a new resource management app for $ 1000 and contract is to be deployed via the Ethereum network.

Lisa would have to approach a programmer who will code the smart contract in Ethereum programming language. The code bears the specifications and the requirements of developing the app such as deadlines, interface etc.

The code is uploaded to the Ethereum virtual machine (EVM). EVM is a component of the Ethereum network, embedded in every Ethereum node to perform execution of smart contracts. Meaning, once the contract has been deployed on an EVM, every node has a copy of the contract.

Once Emmason has developed the app, he submits his work on the Ethereum network where each node will verify if it meets the predefined conditions (embedded in lines of code). Once it is verified, the contract is automatically executed, the $1000 thereby being transferred to Emmason in Ether.

Smart contract benefits.

No third parties involved

Fun fact: Did you know that smart contracts will replace lawyers?

The fact that smart contracts are based on block chain technology eliminates the need for intermediaries, legal systems or central authorities while still ensuring trusted execution of contracts.

But what is exactly wrong with using lawyers or third parties? Well, firstly hiring the services of a lawyer is not cheap! Smart contracts are comparably cheaper to execute.

There is no guarantee of transparency with third parties, they can easily be corrupted to alter a contract in order to benefit a party of their interest. With smart contracts, records are shared across parties and cannot be altered once they have been run on the blockchain network.

Security

whenever anything is digitalized, security becomes an aspect of concern. Smart contracts are secure from hacks and data tampering because their records are encrypted and stored in a block chain.

Block chain records are chronologically stored across a distributed ledger, which means that in order to change one record, a hacker would have to change the entire chain, which is not practically possible.

On the contrary, standard contracts records are archived as a piece of paper making them susceptible to tampering or access by unauthorized persons.

Accuracy

Smart contracts are only executed on one condition, that the necessary conditions have been met, if they have not been met, there is absolutely no chance.

A smart contact is only executed inaccurately if there was an error in the written code. It is a computer program, which makes it subject to the garbage in garbage out principle.

A smart contract is automated and is incapable of executing anything outside the instructions embedded in the code. Whereas in standard paper contracts, there are incidences where crafty parties can manipulate terms of the agreement, leading them to be executed differently from what was originally agreed.

Archiving

All contracts have to be documented. Archiving is a serious challenge with paper contracts. Losing a written contract for example a property contract may lead to loss of ownership.

With smart contracts, all transaction records are stored in a block chain data base where it is permanent, cannot be altered, secure and only available and accessible by parties with permission to do so.

Efficiency

By definition efficiency is ability to complete a task in a way that is not costly, does not waste energy or time. The presence of third parties in traditional contracts makes the process hefty, costly and time consuming.

This results from unnecessary bureaucracy, consultation, costs of using legal systems or external enforcement parties, conflict resolution processes and litigation due to inaccuracies amongst other glitches.

With smart contracts, everything is super sleek: agree on the terms, encode the terms and let the blockchain network do the rest. This makes smart contracts less costly, effortless and time saving.

Transparency

Smart contracts enable transactions to take place in a transparent way. The terms of agreement are precise and concise, visible and accessible to all contracting parties and therefore reduces the cases of dispute.

A smart contracts terms are definitive, with no clauses in between the lines that might implicate anything outside the defined agreement.

Note: It should be noted that smart contracts come with draw backs. The complexity of contracts may not be exhaustible by a programming language to the maximum. The fact that all clauses and terms have to be embedded into lines of code subtracts a certain level of flexibility such as implied clauses from contracts. It may therefore be inadequate for execution of certain contracts. Also, once the code is run on the blockchain, it is irreversible yet any mistakes in the code could lead completely different or unwanted results.

Applications of Smart contracts

Smart contracts are applicable to many fields for as long as they can practically rely on block chain technology. One of the most popularly proposed applications of smart contracts along with block chain technology is government voting or any voting process.

Smart contracts are secure which means voting data or results cannot be manipulated. It eliminates current voting system inefficiencies such as the need to line up, identification processes and filling forms.

Logistics and supply chains also benefit much from smart contracts. Supply chains suffer from the laborious processes of paper-based systems, where documents are taken through several channels for approvals, giving lee way for fraud and losses.

Smart contracts solve these problems through digitalization hence making supply chain processes more efficient. Other field include health care and financial services.

Conclusively, smart contracts offer efficiency, transparency, security, accuracy, data storage, and eliminate need for third parties. However, when engaging in smart contracts, parties have to be sure that all complexities of contracts can be accommodated in programming code.

Most importantly, that the terms of agreement have been correctly and accurately translated into programming language.

Now that you are here, what do you think about this article? Please let me know via the comment section.

If you found it helpful, please be generous with a few claps.

And if you want to see more articles like this, let’s do a mock medium smart contract, you leave your email below, and you will automatically receive any articles I publish.

To your very smart life!!!

--

--

Cryptoblok

Everything in the lane of crypto currency and blockchain technology is explained here.