ONE TOPIC · THREE LEVELS OF EXPLANATION

What is a smart contract? An example

After this lesson: Understand what a smart contract executes and what it cannot know on its own.

Choose your explanation

01 / BEGINNER

First, what is it?

A smart contract is a program recorded on a blockchain. It contains rules and can store data. When a transaction calls it, the network executes those rules and checks the result. “Smart” does not mean intelligent: the program follows code, even when that code is badly designed.

Words to know

Contract
Here, a program; not necessarily a legal contract.
Call
A request to execute a program function.
Oracle
A system supplying the program with data from outside the network.

The idea to understand

The benefit is that multiple users can rely on the same execution rule without an employee approving every operation. This shifts trust towards code, the network and anyone retaining upgrade powers.

SEE IT IN PRACTICE

Now, a concrete example

In an ERC-20 token, transfer requests moving units from one account to another. The contract checks its conditions, then updates its accounting. This real mechanism does not prove that the token represents a trustworthy company or a valuable object.

YOUR TURN

The code is public. Does that prove the program is safe?

Form an answer before opening the explanation. You can also discuss it aloud.

Compare with the explanation

No. Transparency enables review but eliminates neither bugs nor dangerous administrative powers. Also check that the code you inspect matches the contract being used.

3 explanation levels

A useful companion: Ethereum explained: ETH, contracts and gas

THE SHORT ANSWER

A smart contract is a program stored on a blockchain, executed when a transaction calls its functions. It applies rules written in code. It can contain bugs and does not, by itself, establish legal rights or prove that external data is true.

Sources and further reading

Page updated on
Documentation checked on · WhyTheBlockchain · Editorial approach