What Are Smart Contracts?

Smart Contracts Explained

Person looking at data on a large computer monitor
Photo:

FreshSplash / Getty Images

Definition
Smart contracts are software applications that work using blockchain technology.

Smart contracts are software applications that work using blockchain technology. Smart contracts can be used to issue new cryptocurrency tokens, operate distributed autonomous organizations (DAOs), and enforce other financial and legal agreements.

Smart contracts have many advantages, including features that make them transparent, efficient, and secure. Keep reading to learn more about smart contracts, how they’re used, and how you may use them in the future.

Definition and Example of a Smart Contract

A smart contract is computer code, often hosted by the Ethereum blockchain, that can store and automatically execute a financial or legal agreement. A smart contract may be a simple bit of computer code or a lengthy, detailed set of instructions comprising up to 24KB of information. 

Note

Since every smart contract has a different purpose and programmer, each smart contract may look very different.

Smart contracts play a key role in the operation of DAOs, which are blockchain-based organizations that operate fully independently without being governed or controlled by any centralized group. While DAOs can exist for a variety of purposes, one example of a DAO that uses smart contracts is the blockchain platform MakerDAO. This DAO, which supports the DAI stablecoin, uses the MKR token to facilitate decentralized governance of the MakerDAO platform.

How Smart Contracts Work

Like cryptocurrencies, smart contracts operate using blockchain technology. Smart contracts, by relying on if-this-then-that logic, are akin to digital vending machines. Let’s delve into how smart contracts work:

  1. Smart contract is created: Anyone with computer programming knowledge can create the code for a smart contract. The programmer defines the rules for how the smart contract functions and manages future transactions. 
  2. Smart contract is added to the blockchain: The smart contract is uploaded to the blockchain, similar to how cryptocurrency transactions are recorded. This typically requires paying a fee, such as the Ethereum gas fee, to use the blockchain network.
  3. Smart contract is confirmed: Once the block containing the smart contract is confirmed, the smart contract is live and publicly viewable through a blockchain explorer. The smart contract is open, pending the conditions of the contract being met.
  4. Smart contract is executed: When all of the terms of the smart contract are all satisfied, the contract executes in accordance with its original programming.

Note

Completed smart contracts on a blockchain are irreversible and can't be changed.

How Smart Contracts Are Used

Smart contracts can have many different applications, including:

  • Financial agreements and financial services: Smart contracts can be used to clear and settle securities trades, and can manage financial documentation.
  • Legal contracts: Smart contracts can automatically enforce legal agreements by facilitating the payment of funds upon certain triggering events or imposing financial penalties if certain conditions are not satisfied.
  • Real estate transactions: Real estate agents may use smart contracts to automate the closing process for home purchases.
  • DAO governance: Decentralized autonomous organizations rely on smart contracts to facilitate broad-based decision-making.
  • Non-fungible tokens (NFTs): Smart contracts can facilitate transactions and storage for non-fungible tokens.
  • Health care management: The management of medical records and medical systems can be automated using smart contracts.
  • Supply chain documentation: Smart contracts can increase the transparency of supply chains by increasing access to documentation.
  • Public-sector record keeping: Governments can use smart contracts to automate how public records are collected and maintained.
  • Voting: Elections can be conducted using smart contracts to verify voter identities, record votes, and determine outcomes.

A savvy developer could build a smart contract to split dining costs with friends or the monthly rent with roommates. You could run an investment club that uses smart contracts to collect and distribute funding. 

Note

Smart contracts can be used to establish and complete almost any agreement.

Pros and Cons of Smart Contracts

Pros
  • Transparent

  • Efficient

  • Secure

Cons
  • Require technical computer knowledge

  • Limited adoption to date

Pros Explained

  • Transparent: Smart contracts are accessible to everyone in a blockchain network.
  • Efficient: Smart contracts can be programmed to execute automatically.
  • Secure: Smart contracts benefit from the security features of blockchain technology.

Cons Explained

  • Require technical computer knowledge: Using smart contracts can be simple, but creating them requires coding knowledge.
  • Limited adoption to date: Smart contracts have immense potential but are not yet widely used outside of the cryptocurrency community, which in practical terms limits their usefulness.

Do I Need Smart Contracts?

You don’t need smart contracts. These types of digital contracts have many uses, and important advantages over traditional agreements, but smart contracts are not yet widespread. Smart contracts will likely become more commonplace in the future, with major digital asset platforms like Ethereum already heavily using them.

Key Takeaways

  • Smart contracts are blockchain-based computer programs that enable the decentralized creation and enforcement of electronic agreements.
  • Smart contracts can signify ownership of NFTs, enable DAOs to operate, and execute many types of financial and legal agreements.
  • Smart contracts are considered to be transparent, efficient, and secure.
Was this page helpful?
Sources
The Balance uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Ethereum.org. “Introduction to Smart Contracts.” Accessed Jan. 13, 2022.

  2. Ethereum.org. “Decentralized Autonomous Organizations (DAOs).” Accessed Jan. 13, 2022.

  3. MakerDAO. “A Better, Smarter Currency.” Accessed Jan. 13, 2022.

  4. Ethereum.org. “Deploying Smart Contracts.” Accessed Jan. 13, 2022.

  5. Deloitte. “Getting Smart About Smart Contracts.” Accessed Jan. 13, 2022.

  6. Harvard Law School Forum on Corporate Governance. “An Introduction to Smart Contracts and Their Potential and Inherent Limitations.” Accessed Jan. 13, 2022.

  7. Propy. “About Propy.” Accessed Jan. 13, 2022.

  8. Ethereum.org. “Non-Fungible Tokens (NFT).” Accessed Jan. 13, 2022.

  9. World Bank Group. “Smart Contract Technology and Financial Inclusion.” Accessed Jan. 13, 2022.

Related Articles