Smart Contract
A smart contract is a program stored on a blockchain that runs automatically when its conditions are met, without a company or person in control.
Also called: smart contracts.
In plain English
A smart contract is code deployed to a blockchain. Once deployed, it runs exactly as written whenever someone sends it a transaction, and the blockchain enforces the result. The code and its state are public, so anyone can inspect what a contract does and verify its balances. Ethereum introduced general-purpose smart contracts in 2015, and most newer chains support them.
Example
Uniswap's swap contract takes your token in, computes the price, and sends the other token out, all in one transaction, exactly as the code says.
Why it matters
A simple example is an escrow. Two parties deposit funds into a contract that releases them only when a condition is met, such as a date passing or a confirmed delivery reported by an oracle. Neither party can take the money early and no third party needs to hold it. The same principle scales up to decentralized exchanges, lending markets, stablecoins, and NFT collections, all of which are smart contracts.
How it works
Smart contracts cannot be edited after deployment unless they are designed with an upgrade mechanism, so bugs are permanent and have led to losses in the billions of dollars. Audits by security firms reduce risk but do not eliminate it. The phrase code is law captures both the strength and the danger: the contract does what it says, including when what it says is a mistake.
What is a smart contract? covers this in 7 minutes (intermediate), with a quiz at the end.
Related terms
Related coins
Reviewed by Coinucation Editorial. Structured as a DefinedTerm for search.
Coinucation