The words 'smart contract' sound legal. They are not. A smart contract is a small computer program. It lives on a blockchain, runs when someone triggers it, and cannot be stopped, censored, or edited by anyone (including the person who deployed it).
A simple example
Say you and a friend bet $100 on tomorrow's ETH price. In the old world, you shake hands. In DeFi, you write a smart contract that says: 'Hold $200 from both of us. On date X, check the ETH price. Send the winner all $200.' Once deployed, neither of you can back out.
Nick Szabo, who coined the term in 1994, used a vending machine as the analogy. Insert coins, push button, get soda. No shopkeeper. If the machine works right, no dispute possible. A smart contract is that idea, generalized.
What smart contracts are actually made of
Under the hood, a smart contract is:
- Storage: data the contract keeps (balances, ownership, settings)
- Functions: actions users can trigger (deposit, swap, vote)
- Rules: conditions that must be met (must own token, must be past date)
- State: the current values of everything above
The most common language is Solidity (Ethereum, Polygon, most EVM chains). Solana uses Rust. Cosmos chains use Go. The concepts are the same.
What smart contracts are good at
- Removing middlemen. No lawyer, escrow, or clearing house needed.
- Being predictable. Given the same inputs, they always produce the same outputs.
- Being public. Anyone can read the source code and verify what it does.
- Composability. Contracts can call other contracts, stacking apps like Lego bricks.
What smart contracts are bad at
- Handling anything off-chain. A contract cannot know the weather, the ETH price, or who won the election. It needs oracles for that, and oracles are a weak point.
- Being wrong. A bug is permanent unless the contract was designed with an upgrade mechanism. Multiple $50m+ losses have been single lines of buggy Solidity.
- Dealing with disputes. No judge can rule that a transaction should be reversed. What happened, happened.
How to spot a safe one
The mental model
Think of a smart contract as a very small, very literal, incorruptible robot. You give it money and instructions. It follows them exactly. Forever. There is no take-backsies. That is both the power and the danger.
Koinlytics