Smart Contract
- A smart contract is a program stored on a blockchain that executes automatically when its predefined conditions are met, with the outcome enforced by the network rather than a bank, broker or court.
- Once deployed to a platform such as Ethereum, anyone can call its functions, and every node runs the same code to reach the same result so it cannot be quietly changed.
- Smart contracts are the building blocks of DeFi, NFTs and DAOs, but their public code means bugs are exploitable and a flaw can be drained before it is fixed.
A smart contract is a program stored on a blockchain that runs automatically when predetermined conditions are met, without needing a person or company to execute it manually. It can hold funds, enforce rules and interact with other contracts, all governed by code that is typically visible and, once deployed, difficult or impossible to change.
Why it matters
Smart contracts are what make decentralized finance, decentralized exchanges and many token systems possible, letting agreements execute automatically instead of relying on an intermediary. That automation is also a risk: if a contract’s code contains a bug or an exploitable flaw, it will execute exactly as written, bug and all, and losses from that kind of exploit have historically been difficult or impossible to reverse.
Example
A decentralized exchange swap, described in our entry on DEX, is executed by a smart contract rather than a human trader matching orders.
This is educational information, not financial advice. Coingsty does not recommend buying or selling any asset.
What makes a smart contract "smart"?
Can a smart contract be changed after it is deployed?
Are smart contracts risky?
Other glossary terms connected to this one.
Go deeper than the definition — explainers, live data and free calculators.