Smart Contract
A smart contract is a program that runs on a blockchain and automatically executes its defined rules when the conditions are met. Once deployed, it runs exactly as written, without a company operating it.
How smart contracts work
A developer writes code, for Ethereum usually in a language called Solidity, and deploys it to the blockchain, where it gets its own address. Anyone can then call its functions by sending a transaction. Every node runs the same code and agrees on the result, so the outcome does not depend on trusting a single server.
A simple example is a contract that holds funds and releases them only when two of three named parties approve. More complex contracts run entire exchanges or lending markets. Despite the name, a smart contract is not necessarily a legal contract; it is software.
What they make possible
Smart contracts are the foundation of tokens such as ERC-20 tokens and NFTs, stablecoins, decentralized exchanges, lending protocols and DAOs. The term was coined by computer scientist Nick Szabo in the 1990s, and Ethereum, launched in 2015, made general-purpose smart contracts widely available. Many other blockchains support them today.
Limits
A contract can only see data on its own blockchain. To react to real-world information, such as an asset price, it needs an oracle, an external data feed, which adds its own trust and manipulation risks. Running a contract costs fees, called gas, and complex operations cost more.
Risks
Code is law cuts both ways: if there is a bug, the contract executes the bug. In 2016 an attacker exploited a flaw in The DAO, an early Ethereum investment contract, and drained a large share of its ETH, which led to a contested hard fork of Ethereum. Since then, exploits of DeFi contracts and cross-chain bridges have caused large losses. Audits reduce but do not eliminate risk. Many contracts are also upgradeable or have admin keys, meaning a team can change the rules or freeze funds, which is a trust assumption users should check.
Ask Coach about it
Coach is the AI on AtenaCrypto. It explains crypto with live market data, in plain words.
What should I check about a DeFi smart contract before depositing funds into it?Ask Coach →
Frequently asked questions
Can a smart contract be changed?
A plain contract cannot, but many projects use upgradeable designs or admin functions that let a team modify behavior. Whether that is possible should be checked for each contract.
Are smart contracts legally binding?
Not automatically. They are programs; whether an agreement executed through one is legally enforceable depends on the jurisdiction and circumstances.
Does an audit make a smart contract safe?
No. An audit lowers the chance of known types of bugs, but audited protocols have still been exploited.
Related terms
Learn it step by step
AC Learning explains these ideas in interactive lessons — the first eight sections are free.
Open AC Learning → Create a free accountAll glossary terms · Educational reference only — not investment, legal, tax or financial advice.