Finder makes money from featured partners, but editorial opinions are our own. Advertiser Disclosure
What is a smart contract?
The basics, history and benefits of smart contracts, the technology on which DeFi hinges.
Even if you’re just dipping your toes into the cryptocurrency waters, you’ve likely come across the term smart contract. It’s one of many hot, new crypto buzzwords coined almost 30 years ago.
Smart contracts are popular again because of their use cases on Layer 1 blockchain networks such as Ethereum, Binance Smart Chain and Solana.
What is a smart contract?
A smart contract is a set of code that enables a specific service without needing to interact with a human.
An electronic vending machine is the simplest real-world example of an entity that uses smart contract technology. If you insert money into a vending machine and select an item from the machine’s keypad, then the machine dispenses the selected item.
Smart contracts operate on this if-then principle. If certain conditions are met within the rules set in code, then an item or service is provided.
Yet smart contracts are neither smart nor legal. Rather, they are only as intelligent as the if-then parameters that are programmed into them. And unlike traditional contracts, they are not legally binding agreements.
The origin of smart contracts
The term smart contract was coined by computer scientist and cryptographer Nick Szabo in 1994. Inventor of the decentralized currency “bit gold,” predecessor to Bitcoin, Szabo believed that smart contracts could formalize and secure computer networks through the use of these if-then protocols.
Szabo believed that these protocols could establish a trustless state. In such a state, rules are set in code, and counterparty risk — or the likelihood that the person you’re transacting with defaults — is eliminated. Szabo saw the potential for smart contracts to reshape the nature of contractual agreements, especially in the world of finance.
Smart contracts on the blockchain
Vitalik Buterin, a founder of the popular digital asset network Ethereum, picked up where Szabo left off in 2015. Ethereum was the first blockchain protocol to incorporate smart contracts into its network.
By employing smart contracts, Ethereum set the world of decentralized finance — or DeFi — in motion.
One of the first use cases for smart contracts on Ethereum was to issue an initial coin offering (ICO), which is like an initial public offering (IPO) but for cryptocurrency. Ethereum’s token, Ether, was first issued through an ICO.
Another use case for smart contracts on Ethereum is the development of decentralized apps — more commonly called dApps — such as decentralized exchanges (DEX). On a DEX, people trade digital assets directly with one another — also called peer to peer.
The opposite of a DEX is a centralized exchange (CEX) like Coinbase. On a CEX, a third party is required to complete transactions, and data is stored on centralized servers. CEXs do not employ smart contracts.
Smart contracts are also featured within DEX code. DEX users provide the cryptocurrencies available for trade on DEXs through liquidity pools (LPs), which are formed when two digital assets are locked into a smart contract.
In each LP is a trading pair, or a combination of two digital assets that can be exchanged for one another through a DEX. For example, when you use a DEX to lock some of your Aave and Ether tokens into a smart contract, you create an LP. That LP can then be used as fuel for an automated market maker (AMM).
Users are rewarded with digital asset tokens for providing LPs to AMMs. These rewards are sent from smart contract addresses. If people deposit their LPs into AMMs, then they receive certain tokens as a reward, according to the smart contract code. Popular AMMs on Ethereum include Curve Finance and Balancer, while a popular AMM on Solana is Saber.
Smart contracts are also used to mint nonfungible tokens — more commonly called NFTs. After NFTs are minted, smart contracts also are used to verify their ownership and to keep records of their transfers.
Benefits of smart contracts
- Transparency. Smart contract code is made public through websites like GitHub. If you’re like me and don’t know how to read such code, check the “security score” of smart contract platforms on auditing sites such as Certik.
- Trustworthiness. Smart contracts are audited by developers who validate proposed smart contract code independently of one another.
- Inclusivity. Smart contracts don’t require know-your-customer (KYC) protocols or background checks.
- Minimal bureaucracy. Because smart contracts don’t require a middle person, savings are often passed on to you. For example, trading fees on DEXs are often less than those on CEXs.
Drawbacks of smart contracts
- They’re irreversible. After a transaction occurs in a smart contract, it can’t be reversed. Developers like to say “Code is law,” but, as is also true in the real world, laws sometimes need to be changed.
- Code can be flawed. Code is only as good as the developers who write it. And coding errors can expose contracts to hacks, malfunctions or even “rug pulls” — bugs through which developers can steal funds.
- They’re unregulated. Smart contracts are not regulated by the SEC or other financial protection agencies. You have no legal recourse if your smart contract is hacked.
Smart contracts are digital agreements set in code that operate according to an if-then protocol. Yet they can’t think for themselves, nor are they legally binding agreements.
Also, no regulatory oversight exists for smart contracts. You’re expected to trust the reputation of a blockchain and its developers when engaging with smart contracts.
Smart contracts may be used on a broader scale in the future — and could even replace traditional contracts. Yet government oversight and more thorough auditing processes may be needed before they can be more broadly implemented.
For now, though, they are widely used in DeFi, the Wild West of finance.
More guides on Finder
How to buy cryptocurrency in Puerto Rico
How to start buying and investing in cryptocurrency in Puerto Rico.
How to buy cryptocurrency in Wyoming
Wyoming may have regulations on crypto, learn how to buy cryptocurrency legal in Wyoming.
How to buy cryptocurrency in West Virginia
West Virginia may have regulations on crypto, learn how to buy cryptocurrency legal in West Virginia.
How to buy cryptocurrency in Wisconsin
Wisconsin may have regulations on crypto, learn how to buy cryptocurrency legal in Wisconsin.
How to buy cryptocurrency in Washington
Washington may have regulations on crypto, learn how to buy cryptocurrency legal in Washington.
How to buy cryptocurrency in Virginia
Virginia may have regulations on crypto, learn how to buy cryptocurrency legal in Virginia.
How to buy cryptocurrency in Vermont
Vermont may have regulations on crypto, learn how to buy cryptocurrency legal in Vermont.
How to buy cryptocurrency in Utah
Utah may have regulations on crypto, learn how to buy cryptocurrency legal in Utah.
How to buy cryptocurrency in Tennessee
Tennessee may have regulations on crypto, learn how to buy cryptocurrency legal in Tennessee.
How to buy cryptocurrency in South Dakota
South Dakota may have regulations on crypto, learn how to buy cryptocurrency legal in South Dakota.
Ask an Expert