Smart Contracts in Blockchain


A smart contract is a robust and autonomous computer program that embodies an agreement, capable of being executed and enforced automatically. It indicates that a smart contract is essentially a program crafted in a language comprehensible to a computer or designated machine.

It also represents agreements between parties through business logic. A key aspect is that smart contracts execute automatically based on the coded instructions, such as when specific conditions are met. They are enforceable, meaning that all terms of the contract are carried out as intended, even in the face of opposition.

What is Enforcement in Smart Contracts?

Enforcement here is a comprehensive term that includes traditional legal enforcement, as well as the application of specific measures and controls that facilitate the execution of contract terms without the need for external intervention. Ideally, smart contracts should operate independently of conventional enforcement methods.

They should adhere to the principle that code serves as the law, eliminating the necessity for an arbitrator or third party to oversee, control, or influence the execution of a smart contract. Unlike traditional contracts, smart contracts are self-enforcing rather than legally enforceable. While this concept may seem like an idealistic vision, it is entirely feasible and aligns with the fundamental essence of smart contracts.

How did Smart Contracts Emerge?

In the 1990s, Nick Szabo introduced the concept of smart contracts in his article titled "Formalizing and Securing Relationships on Public Networks." This idea emerged nearly two decades prior to the widespread recognition of the potential and advantages of smart contracts, which came about with the creation of Bitcoin and the later emergence of more sophisticated blockchain platforms like Ethereum.

Szabo defines smart contracts as follows −

"A smart contract is an electronic transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitrations and enforcement costs, and other transaction costs."

The functionality of smart contracts was first implemented in a limited manner with Bitcoin in 2009. Bitcoin features a constrained scripting language known as script, which facilitates the transfer of bitcoins between users. However, this language is not complete and does not allow for the development of arbitrary programs. It can be likened to a basic calculator that performs simple arithmetic, while smart contracts function as general-purpose computers capable of executing any program.

Features of Smart Contracts

A smart contract possesses several key characteristics, which are mentioned as follows −

  • Self-Performing − It operates autonomously on a blockchain without the need for external intervention.
  • Enforceable: All terms of the contract are automatically upheld.
  • Secure − Smart contracts are designed to be tamper-proof or resistant, benefiting from the security assurances provided by the underlying blockchain. However, the programming language and the code of the smart contract must also be accurate, valid, and verified.
  • Consistent and Efficient − This feature guarantees that a smart contract will consistently yield the same result for a given input. While this can be seen as part of the security aspect, highlighting it separately emphasizes its significance.
  • Syntactically sound − Smart contracts are constructed to be complete and meaningful for both humans and machines.
  • Resilient and Durable − They are resilient against adversarial actions or adverse conditions, ensuring that once initiated, smart contracts execute their functions deterministically within a defined timeframe.

Example Usage of a Smart Contract

Let us take an example of a financial contract. It may not necessarily require semantic clarity and immutability; however, it must be capable of automatic execution, enforceability, determinism, and security.

Conversely, a title deed must possess semantic integrity and completeness. Consequently, for it to function effectively as a smart contract, the language used must be comprehensible to both humans and machines.