What Is a Smart Contract?
Understand how blockchain-based programs work, what they can do, and where their risks come from.
Jump to section
What to remember
- "Smart" describes automated execution, not intelligence or legal enforceability — a smart contract is just code that runs when called.
- A contract can't know facts from outside the blockchain on its own; it needs an oracle or another input to bring in external data.
- Being deployed and publicly visible on-chain doesn't mean a contract has actually been audited for bugs or malicious logic.
- Checking the network, destination, and requested permissions before signing matters because a confirmed transaction is generally difficult to reverse.
A program on a blockchain
A smart contract is code deployed to a blockchain. It stores data and applies programmed rules when users or other contracts call it. The term does not mean the code is intelligent or that it forms a legal contract automatically.
State, calls, and transactions
A contract's state is the data it currently stores, such as balances or permissions. A read call can inspect state without changing it. A transaction requests a state change, must be signed by an account, and consumes network resources that users pay for with a gas fee.
What smart contracts enable
- Exchanging assets according to published rules
- Managing lending, borrowing, or collateral records
- Issuing and transferring tokens
- Coordinating applications whose data and logic can be independently inspected
Important limitations
A contract cannot automatically know facts from the outside world; it needs an oracle or another input. Deployed code may be difficult or impossible to change, depending on its design. Bugs, malicious logic, incorrect permissions, and interactions with other contracts can all create risk.
Deployed on-chain doesn't mean audited or safe
Anyone can deploy a smart contract, and its code being publicly visible on-chain doesn't mean anyone has actually reviewed it for bugs or malicious logic. Visibility makes independent review possible — it doesn't substitute for that review having happened.
How to interact carefully
Check the network, destination, requested permissions, and transaction details before signing. A familiar interface does not prove that a contract is safe, and a confirmed blockchain transaction is generally difficult to reverse.
What to remember
- "Smart" describes automated execution, not intelligence or legal enforceability — a smart contract is just code that runs when called.
- A contract can't know facts from outside the blockchain on its own; it needs an oracle or another input to bring in external data.
- Being deployed and publicly visible on-chain doesn't mean a contract has actually been audited for bugs or malicious logic.
- Checking the network, destination, and requested permissions before signing matters because a confirmed transaction is generally difficult to reverse.
Part of these learning paths
Related research and concepts
How Oracle Price Feeds Actually Work, Step by Step
Read the full guide
Oracle
Read the Oracle glossary definition
Virtual Machine
Read the Virtual Machine glossary definition
DAO
Read the DAO glossary definition
Governance Token
Read the Governance Token glossary definition
Chainlink
Read the Chainlink research page
Ethereum Virtual Machine
Read the Ethereum Virtual Machine glossary definition
Solidity
Read the Solidity glossary definition
The Competitive Landscape of Smart Contract Platforms
Read the research article
Internet Computer
Read the Internet Computer research page
Hedera
Read the Hedera research page
Smart Contract
Read the Smart Contract glossary definition
Gas Fee
Read the Gas Fee glossary definition
What Is Web3?
Read the full guide
Proxy Contract
Read the Proxy Contract glossary definition
Upgradeable Contract
Read the Upgradeable Contract glossary definition