A smart contract is a program. That’s the starting point.
An Ethereum smart contract is code and stored records at an address. It applies programmed rules when called. Reading records differs from changing them, and correct execution does not guarantee the code is safe or fair.

Trace a contract action
Example: reading a token balance
A token contract keeps records of token balances. Reading a balance asks for a record. Sending tokens asks the contract to change records under its rules. These are different tasks. The transaction receipt helps you check whether a requested change succeeded. A nice-looking app does not prove that its contract is safe.
- Input: The action and details sent to the contract.
- Rules: The code and permissions that control what can happen.
- Result: A successful update, or a failure that may still use gas.
Keep in mind: Ask who can change the contract or its settings. An administrator is a person or group with special permissions.
What does a smart contract do?
A smart contract is code and stored records at an address. A transaction can invoke its functions, and Ethereum executes the rules as part of updating shared state. The contract does not think, negotiate, or independently decide whether an outcome is fair.
The vending-machine analogy has limits
A vending machine is useful as an analogy: inputs trigger rules. Real contracts may interact with other contracts, external price feeds, and settings controlled by an administrator. A simple interface can hide a long list of other systems it relies on. The user needs to understand the system, not just the button.
Does reading a contract require a paid transaction?
Reading public state usually does not require a paid transaction from the reader, although a service can charge for access. Changing state consumes gas. A failed transaction may still cost gas because the network performed work before reaching the failure.
Code is not a warranty
Bugs, privileged keys, upgrades, and inaccurate external data can cause losses. An audit examines a scope at a point in time; it does not insure future behavior. Before using a contract, look for clear documentation of permissions and risks. If you want the technical next step, our ecosystem hub links to an Ethereum development reference.
Follow contract dependencies into financial applications.
Check the source
This is an original, AI-assisted educational explanation. Sources and limitations are provided for verification; it is not personalized financial advice. Read the editorial policy or report a correction.

