What Are Smart Contracts?

In this lesson, we’ll take a look at the utility and potential of smart contracts, and give you a brief overview of some of the ways smart contracts are being used today.
June 6, 2022

What are SMART Contracts?

Initially conceptualized in 1994 by the now renowned computer scientist and cryptographer Nick Szabo, smart contracts are a type of minimalistic self-enforcing program that can carry out a variety of tasks without requiring human intervention. 

Like regular contracts, smart contracts define the terms of an agreement between one or more counterparties. But rather than being enforced by intermediaries, the terms are automatically enforced and carried out by the contract.

These exist as decentralized programs that are stored on a blockchain ledger, and can be thought of as powerful tools for automatically carrying out actions, usually in response to an external trigger.

Most smart contracts are immutable, which means that once they’re deployed, they cannot be retroactively modified or deleted. However, some newer-generation smart contracts are upgradeable, through the use of so-called proxy patterns

Smart contracts are now being used for a huge variety of different use cases, and can be argued as a potential era-defining technology for the 21st century.  

In this lesson, we’ll take a look at the utility and potential of smart contracts, and give you a brief overview of some of the ways smart contracts are being used today.

How Do They Work?

Smart contracts are deployed to the blockchain through a transaction that includes its compiled code. Once this transaction is confirmed within a block, the code is executed and its initial operating state is established based on the parameters defined in its code. From here on, users and other authorized smart contracts can interact with it, calling functions by submitting the correct transaction to the blockchain.

These smart contracts are executed by a decentralized virtual machine included as part of the blockchain’s technology stack. The most popular decentralized virtual machines are fully sandboxed runtime environments that use specific opcodes to execute tasks contained within smart contract code. As of writing, the most popular blockchain-based virtual machine is known as the Ethereum Virtual Machine (EVM), which is used by the Ethereum blockchain, as well as a growing number of so-called EVM chains — including Binance Smart Chain and Avalanche (C-Chain). 

Depending on the platform, smart contract code can be written in a variety of programming languages, some of the most popular include Solidity, Rust, and Vyper. This code is then compiled into a form that can be executed by the virtual machine. 

Smart contracts execute their functions when one or more predetermined conditions are met. This might be a user-triggered command, receipt of specific data from blockchain oracles, at a specific date or time, based on the outcome of an event, or in response to any number of predefined different inputs. 

These operate on one or more smart contract platforms, such as Ethereum, Solana, or Binance Smart Chain — each of which provides a suitable decentralized virtual machine capable of running smart contract code. 

When smart contracts are connected to a user-facing front-end, such as a web user interface or mobile application, then these form a decentralized application (DApp). Similar to regular applications, DApps can be used for a huge variety of purposes, the main difference is that they’re hosted on a decentralized computer network, rather than a centralized server or device. 

Their Advantages

Often billed as a potentially revolutionary technology, smart contracts have a wide variety of advantages over traditional contracts and are rapidly growing in their capabilities. Their benefits can be best grasped by looking at their six main unique properties:

How Are They Being Used?

Early smart contracts were relatively rudimentary and were used to carry out very simple tasks, such as crowdfunding via initial coin offerings (ICOs), lottery games, mass token distribution, and timelock contracts (used to lock assets for a fixed period of time).

But today, smart contracts are being used for a huge variety of purposes, 

  • Supply chain management: Tracking items as they pass through the supply chain is an incredibly powerful example of smart contract utility since it can be used to prove the authenticity and provenance of goods far more efficiently. IBM is currently working with Sonoco to track the movement of temperature-controlled pharmaceuticals through the supply chain — helping to improve transparency and efficiency. 
  • On-chain voting: Smart contracts are a crucial component of decentralized autonomous organizations (DAOs), which are blockchain-based entities that are governed by their communities through on-chain actions. These allow users to vote on governance proposals, events, actions and use smart contracts to automatically carry out the decisions of the community. Moreover, smart contracts have also been used for fraud-proof participation in a consultative vote in the Swiss municipality of Zug — demonstrating the potential for smart contracts in elections, stakeholder voting, and more. 
  • Decentralized trading: Decentralized exchanges (DEXs) allow users to trade in a secure, permissionless environment, helping them exchange assets with other users without risks. Most modern DEXs use decentralized liquidity pools to make trading more efficient, maximize liquidity, and provide a source of revenue for liquidity providers. These include Uniswap and PancakeSwap
  • Permissionless lending: Smart contracts enabled the formation of so-called decentralized money markets like Compound and Aave, which are platforms that bring borrowers and lenders together in a safe environment. These money markets allow users to put up collateral to take out a loan at an agreed interest rate, whereas lenders can deposit their capital to a pool to easily earn interest on their idle funds. Once repaid, user can then retrieve their collateral and the loan is considered complete. 

  • Decentralized stablecoins: Stablecoins are a common fixture in the blockchain space, and several of the most popular are completely decentralized in their issuance and minting. For example, The USD-pegged DAI stablecoin uses smart contracts to mint new DAI units through the MakerDAO platform by creating something known as a "Collateral Debt Position) — which basically entails putting up collateral worth more than the DAI.
  • Insurance: It is now possible to take out insurance cover against a wide range of potential events using smart contract-powered decentralized insurance protocols like Nexus Mutual and InsurAce. These allow users to buy insurance products that cover a wide variety of protocols and risks while allowing counterparties to underwrite insurance risks to earn a yield.

  • Synthetic Assets: Smart contracts can be used to create blockchain-based synthetic versions of real-world assets, like stocks and commodities. These assets are generally known as “synths” and use smart contracts to enforce the relationship between a real-world asset and a blockchain-based derivative token. These tokens can then be freely bought, traded, and sold, allowing users to gain price exposure to real-world assets using blockchain technology. 
  • Decentralized medical records: Right now, medical records are stored on isolated computers, which can make them difficult to securely access remotely and share with necessary parties, such as insurance providers and local healthcare centers. Smart contracts can be used to secure medical records on the blockchain, while providing rules-based access to those with authorization. 

Smart contracts are rapidly gaining popularity among businesses of all sizes thanks to the efficiency and utility they can offer. 

Lesson Recap (TL;DR)

  • Smart contracts are simple snippets of code that are generally deployed on decentralized blockchains. They are executed by virtual machines that ensure they run smoothly.
  • Being tamperproof, transparent, and highly efficient, smart contracts are quickly becoming recognized for their disruptive potential in dozens of different industries. 
  • Today, smart contracts are already being used for a huge variety of use cases, including decentralized trading, voting, insurance, and medical record storage/access. 

Sources:
  1. "Smart Contracts: Building Blocks for Digital Markets." Nick Szabo, 1996, https://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart_contracts_2.html
  2. "Service: City of Zug Blockchain Voting Trial" Ipsoeu.github.io, https://ipsoeu.github.io/ips-explorer/case/50043.html
  3. "Crypto Valley Declares Blockchain Voting Trial a 'Success'." Muyao Shen, Coindesk.com, 2 July 2018, https://www.coindesk.com/markets/2018/07/02/crypto-valley-declares-blockchain-voting-trial-a-success/
  4. "ETHEREUM VIRTUAL MACHINE (EVM)" @HUGHCRT et al., Ethereum.org, 11 August 2022, https://ethereum.org/en/developers/docs/evm/

PAID Academy
PAID Academy is PAID Network’s one stop guide to all things blockchain and crypto. It is an expert-driven collaborative knowledge base between PAID Network, its ecosystem and institutional partners. The aim is to build up a knowledgeable PAID Community and an ecosystem that is confident in making informed industry decisions. PAID Academy provides the building-blocks needed for a future that is built around blockchain, Web3, and the metaverse. Its straightforward, easy-to-understand format is intended to accelerate understanding and discovery, in order to facilitate technological innovation, as well as the adoption and acceptance of blockchain technology globally. PAID Academy is shaping today’s learners to become tomorrow’s innovators.

Read these next

See More

We're building a one-stop guide to all things crypto

Add to the knowledge base
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.