What Is a Smart Contract?
A smart contract is a self-executing program that automates the actions required in an agreement or contract. Once completed, the transactions are trackable and irreversible.
Smart contracts permit trusted transactions and agreements to be carried out among disparate, anonymous parties without the need for a central authority, legal system, or external enforcement mechanism.
While blockchain technology has come to be thought of primarily as the foundation for Bitcoin, it has evolved far beyond underpinning a virtual currency.
What You Need to Know
- Smart contracts are scripts that automate the actions specific to a contract between two parties.
- Smart contracts do not contain legal language, terms, or agreements—only code that executes actions when specified conditions are met.
- Nick Szabo, an American computer scientist who invented a virtual currency called "Bit Gold" in 1998, defined smart contracts as computerized transaction protocols that execute the terms of a contract.
Watch Now: What Is a Smart Contract?
History of Smart Contracts
Smart contracts were first proposed in 1994 by Nick Szabo, an American computer scientist who invented a virtual currency called "Bit Gold" in 1998, 10 years before Bitcoin was introduced. In fact, Szabo is often rumored to be the real Satoshi Nakamoto, the anonymous Bitcoin inventor, which he has denied.
Szabo defined smart contracts as computerized transaction protocols that execute the terms of a contract. He wanted to extend the functionality of electronic transaction methods, such as POS (point of sale), to the digital realm.
In his paper, Szabo also proposed the execution of a contract for synthetic assets, such as derivatives and bonds. Szabo wrote, "These new securities are formed by combining securities (such as bonds) and derivatives (options and futures) in a wide variety of ways. Very complex term structures for payments...can now be built into standardized contracts and traded with low transaction costs, due to computerized analysis of these complex term structures."
Smart contracts do not contain the legal language or terms of a contract between two parties. They are scripts that contain if/then statements, functions, module imports, and other programming that automate the actions specified in a contract.
Many of Szabo's predictions in the paper came true in ways preceding blockchain technology. For example, derivatives trading is now mostly conducted through computer networks using complex term structures.
Smart Contract Uses
Because smart contracts execute agreements, they can be used for many different purposes. One of the simplest uses is ensuring transactions between two parties occur, such as the purchase and delivery of goods. For example, a manufacturer needing raw materials can set up payments using smart contracts, and the supplier can set up shipments. Then, depending on the agreement between the two businesses, the funds could be transferred automatically to the supplier upon shipment or delivery.
Real estate transactions, stock and commodity trading, lending, corporate governance, supply chain, dispute resolution, and healthcare are only a few examples where smart contracts can be used.
Smart Contract Pros and Cons
The primary benefit of smart contracts is similar to the benefit of blockchain technology—they remove the need for third parties. Other benefits of this technology are:
- Efficiency: They speed up contract execution
- Accuracy: There can be no human error introduced
- Immutability: The programming cannot be altered
Some of the downfalls of smart contracts are:
- Permanent: They cannot be changed if there are mistakes
- Human factor: They rely on the programmer to ensure the code addresses the terms of the contract
- Loopholes: There may be loopholes in the coding, allowing for contracts to be executed in bad faith
What Is an Example of a Smart Contract?
The simplest example of a smart contract is a transaction between a consumer and a business, where a sale is made. The smart contract executes the customer's payment and the business's shipment or transfer of ownership.
What Blockchain Has Smart Contracts?
Ethereum has smart contract capabilities inherent to its blockchain. The Bitcoin blockchain received smart contract abilities after its Taproot upgrade, which allowed it to communicate to layers that have smart contracts enabled on their blockchains.
What Are Smart Contracts in Simple Terms?
Smart contracts are apps on a blockchain that make each side of a transaction complete its part. For example, a smart contract could initiate a fund transfer with a third party to verify that the transfer took place.
The Bottom Line
Smart contracts are code written into a blockchain that executes the terms of an agreement or contract from outside the chain. It automates the actions that would otherwise be completed by the parties in the agreement, which removes the need for both parties to trust each other.
Investing in cryptocurrencies and other Initial Coin Offerings (“ICOs”) is highly risky and speculative, and this article is not a recommendation by Investopedia or the writer to invest in cryptocurrencies or other ICOs. Since each individual's situation is unique, a qualified professional should always be consulted before making any financial decisions. Investopedia makes no representations or warranties as to the accuracy or timeliness of the information contained herein. As of the date this article was written, the author does not own cryptocurrency.