What is a smart contract?
A smart contract is a program that runs on Ethereum.1 It is a bundle of code and data that lives at its own address, and by default it cannot be deleted.1
A program at an address
A smart contract is "simply a program that runs on the Ethereum blockchain".1 It is a collection of code, called its functions, and data, called its state. It sits at its own address.1
Smart contracts are a type of Ethereum account. They have a balance, and people can send transactions to them.1 But no person controls them. Once on the network, they run as programmed.1 People use a contract by sending a transaction that runs one of its functions.1
The vending machine
ethereum.org suggests a vending machine as perhaps the best comparison, an idea from Nick Szabo.1 With the right inputs, a certain output is guaranteed: money plus a snack choice gives you the snack.1 A smart contract has its rules programmed into it in the same way.1 A vending machine removes the need for a shop worker. In the same way, smart contracts can replace middlemen in many industries.1
The word "contract" can mislead. The Ethereum whitepaper says contracts are less like agreements to be "fulfilled". They are more like "autonomous agents" that run their code whenever a message or transaction pokes them.2
Who can make one
Anyone can write a smart contract and put it on the network.1 Putting it there is called deploying. It is a transaction, so you pay gas, the network's fee for computing work. Deploying costs far more gas than a simple ETH transfer.1
ethereum.org names two languages: Solidity and Vyper.1 The code must be compiled first. That turns it into bytecode, low-level instructions the EVM can run.1,3
Can it be changed?
By default, a smart contract cannot be deleted, and what you do with it cannot be undone.1 The program at a contract's address cannot be changed once it is deployed.4,5
There is a catch. Developers can build in a way to upgrade. A common one splits the contract in two: a proxy contract that keeps the data, and a logic contract that holds the code.6 Every call goes to the proxy, which passes it on to the logic contract. The logic contract can be swapped for a new one.6,5
With upgrades, users must trust the developers not to change things at will.5 Two safeguards help. A multisig means an upgrade needs several people to sign it. A timelock is a forced delay before an approved change takes effect, so users can leave if they disagree.5
A multisig needs a set number of signatures out of a group of signers. For example, 3 out of 5 is common.1
When the code is wrong
A bug in deployed code usually cannot be patched, and stolen funds are mostly impossible to get back.6 ethereum.org lists the DAO hack, in which 3.6 million ETH was stolen, among the best-known cases.6
To check what a contract really does, look for verified source code. Verification shows that the published code is the same code running at the contract's address.3
Smart contracts also cannot fetch real-world facts, such as prices, by themselves. Tools called oracles bring outside data in.1
- Introduction to smart contracts. ethereum.org developer docs, page updated 25 February 2026.
- Ethereum Whitepaper: A Next-Generation Smart Contract and Decentralized Application Platform. ethereum.org (the original paper by Vitalik Buterin).
- Verifying smart contracts. ethereum.org developer docs, page updated 22 October 2025.
- Ethereum accounts. ethereum.org developer docs, page updated 6 August 2026.
- Upgrading smart contracts. ethereum.org developer docs, page updated 21 October 2025.
- Smart contract security. ethereum.org developer docs, page updated 7 October 2026.
General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.