What Is a Smart Contract? A Non-Technical Explanation
A smart contract is a program that runs on a blockchain and cannot be stopped once deployed. That is its entire appeal and its entire danger.
What this covers
The name is misleading twice over. A smart contract is not smart, and it is not a contract in the legal sense. It is a small program stored on a blockchain that executes exactly as written whenever someone triggers it.
The vending machine comparison
A vending machine holds inventory, accepts a defined input, and produces a defined output without anyone approving the transaction. Put in the money, press the button, get the item. No clerk, no negotiation, no discretion.
A smart contract is the same idea in software. The terms are written in code and deployed to a blockchain. Anyone can trigger it by sending a transaction. The network runs the code identically on thousands of machines and agrees on the result.
Nobody can refuse your request because of who you are. Nobody can change the terms after deployment. And nobody can fix it if the code is wrong. That last one is the part people underestimate.
What makes it different from ordinary software
It is public. Anyone can read the deployed code and every interaction it has ever had.
It is immutable. Once deployed, the code cannot be edited. Developers work around this with upgrade patterns, but those patterns themselves introduce an admin who can change things, which is often exactly what users did not want.
It holds value directly. A contract can custody millions of dollars. A bug is not an inconvenience; it is a vault with a hole in it.
It cannot be switched off. There is no server to unplug. A contract with a flaw keeps running, and keeps being drained, until either the funds are gone or someone convinces users to stop interacting with it.
What they are actually used for
- Token issuance. Most tokens are simply a contract holding a ledger of balances.
- Exchanges. A decentralised exchange is a contract holding pooled assets and a formula for pricing swaps against them.
- Lending. Deposit collateral, borrow against it, get liquidated automatically if the collateral falls too far. No loan officer involved.
- NFTs. A contract recording which address owns which identifier.
- Escrow and vesting. Funds released on a schedule or on a condition, with no trusted middleman.
The part that costs people money
Interacting with a contract usually requires an approval: a separate transaction granting the contract permission to move a specific token from your wallet.
Two things about approvals are dangerous.
First, many interfaces request unlimited approval by default, so it does not have to be re-approved later. Convenient, and it means the contract can move all of that token from your wallet at any future moment.
Second, approvals do not expire. An approval granted to a site you used once in 2023 is still live today. If that contract is later compromised, or was malicious from the start and simply waited, the approval is all it needs.
This is the mechanism behind a large share of wallet drains. Not a stolen seed phrase, but a signature the victim gave willingly, for a reason that seemed fine at the time.
What to do: approve the specific amount rather than unlimited where the interface allows it, and periodically review and revoke old approvals. Block explorers such as Etherscan provide a token-approval checker for exactly this.
“Code is law” and where that argument goes
The original claim was that a contract needs no legal system because the code defines the outcome and executes it regardless of intent.
This survives contact with reality poorly. When The DAO was drained in 2016 through a flaw in its code, the Ethereum community faced a choice: accept that the code had executed as written, or rewrite history to reverse it. They reversed it, and the chain split in two over the disagreement. Both outcomes still exist as separate networks.
The lesson is that immutability is a property of the software, not of the humans around it, and that “the code did what it said” is cold comfort when the code said something its authors did not mean.
What to take away
A smart contract removes the need to trust a counterparty. It does not remove risk; it relocates it, from “will this company behave” to “is this code correct, and what did I authorise it to do.”
For a beginner, the practical version is short. Interacting with a contract means signing something. Read what you are signing, prefer contracts that have been live and audited for a long time, and treat unlimited approvals as a decision rather than a default.