Glossary
What is a smart contract?
In one sentence
A smart contract is a program stored on a blockchain that runs exactly as written, automatically, with no one able to intervene.
A smart contract is code deployed to a blockchain. It has an address, it can hold funds, and anyone can call its functions. When called, it executes deterministically — every node runs it and reaches the same result.
“Exactly as written” is the crucial phrase, and it cuts both ways. There is no judge, no intent, no appeal. If the code contains a flaw, the flaw is the contract’s behaviour, and an attacker exploiting it is doing precisely what the code permits. Funds drained this way are usually unrecoverable.
Most contracts are also immutable once deployed, so bugs cannot simply be patched. Some are upgradeable through admin keys — which fixes that problem and introduces another, since whoever holds those keys can change the rules.
Audits reduce risk but do not eliminate it. Plenty of audited contracts have been exploited, and an audit is a point-in-time review by fallible humans, not a proof of correctness.
For example
Approving a token allowance is calling a smart contract — and a malicious one can be written to drain your wallet.