Smart contract
A program stored on a blockchain that runs exactly as written when a transaction calls it, and can hold and move crypto by its own rules.
A smart contract is code deployed to a blockchain at an address of its own. Anyone can send it a transaction, and every node runs the code and records the result, so the outcome does not depend on trusting any single party. Ethereum made smart contracts widely used; many other blockchains now support them.
Tokens, decentralised exchanges, lending protocols and non-fungible tokens are all smart contracts. Each operation they perform costs a fee in the blockchain’s own coin, which on Ethereum is called gas.
Despite the name, a smart contract is not a legal contract, and it is only as good as its code. Once deployed it usually cannot be changed, unless it was written to allow upgrades, so a bug can be exploited by anyone who finds it, and funds taken that way are rarely recovered.
Also called: smart contracts, self-executing contract, dapp, decentralised application
See it on this site
Related terms
- Blockchain A shared record of transactions kept by many computers, in which transactions are grouped into blocks and each block is linked to the one before it by a cryptographic hash.
- Gas fee The fee paid to have a transaction processed on Ethereum and similar blockchains: the computing work used, measured in gas, times a price per unit of gas.
- Token A crypto asset created by a smart contract on an existing blockchain, as opposed to a coin that is native to its own blockchain, such as bitcoin or ether.
- Decentralised finance (DeFi) Financial services such as lending, borrowing and trading built from smart contracts on public blockchains, which run without a bank or broker holding users’ money.
- Decentralised exchange (DEX) A crypto exchange run by smart contracts on a blockchain, where users trade straight from their own wallets and no company holds their funds.
- Non-fungible token (NFT) A token on a blockchain that is unique and cannot be swapped one-for-one with another, used to record ownership of a particular item, such as a digital artwork.