Smart contract
A smart contract is a program that lives on a blockchain and enforces its own rules automatically whenever someone sends it a transaction.

Photo: “Japanese vending machines desktop background” by whale05, CC BY 2.0, via Flickr (edited: cropped and resized).
A smart contract is a program that runs on the Ethereum blockchain: code and data stored at a specific address [1]. It has no private key and acts only when a transaction calls it. Deployed contracts cannot be deleted by default, and interactions with them are irreversible [1].
Key points
- 1A smart contract is a type of Ethereum account controlled by code instead of a private key.
- 2Anyone can deploy one; using one costs gas like any other transaction.
- 3“Smart” does not mean safe: the code runs as written, bugs included.
How does a smart contract work?#
Ethereum has two kinds of account. An externally owned account is controlled by whoever holds its private key. A contract account is a smart contract: it has no private key and is controlled by the logic of its code [2]. When you send it a transaction, the code runs on every node and can move tokens, update records or even create new contracts.
ethereum.org’s favourite analogy, borrowed from Nick Szabo, is a vending machine: put in the right money, pick a snack, and the machine hands it over without a shop assistant [1]. The rules are built in, and anyone who meets them gets the same result.
| Step | Value |
|---|---|
| Possible signers | 7 |
| Signatures needed to move funds | 4 |
| Keys that can be lost while funds stay recoverable = 7 − 4 | 3 |
| Share of signers needed = 4 ÷ 7 | about 57%, a majority |
No single key can move the funds alone, and losing up to three keys does not lock them away for good.
What can’t a smart contract do?#
A contract cannot fetch real-world information, such as a price or a sports score, by itself. That is deliberate, because relying on outside data could break consensus. Tools called oracles bring that data on-chain instead [1]. A single contract is also limited to 24 KB of code [1].
Which words are related?#
- Gas — the fee for running contract code.
- Dapp — a decentralized application: at minimum a smart contract connected to a web interface [4].
- Wrapped token — a token issued by a contract that holds the original asset.
- What is Ethereum — the platform most smart contracts run on.
Frequently asked questions#
Is a smart contract a legal contract?
The name is a metaphor. ethereum.org describes a smart contract as a program that automatically executes agreements, like a self-enforcing digital contract [4]. Whether it also creates legal obligations is a question for the law where you live, not for the code.
Who can create a smart contract?
Anyone who can write one and pay the gas to deploy it. Deploying is a transaction, and it costs far more gas than a simple transfer [1].
Sources#
Grade A = primary source (regulator, protocol specification, client code, original author). Grade B = expert secondary source used for explanation only.
- Aethereum.org. Introduction to smart contracts, 2026.
- Aethereum.org. Ethereum accounts, 2026.
- Aethereum.org. What is Ethereum? (A Complete Guide), 2025.
- Aethereum.org. Ethereum glossary, 2026.