Smart contract
A program deployed on a blockchain that runs automatically according to rules written in advance.
A program nobody can stop
A smart contract is a program published on a blockchain. Once deployed, its code is public and runs exactly as written, and nobody can block it: if the conditions are met, the transfer happens. It is the building block of decentralised exchanges, lending protocols and stablecoins.
“Smart” is misleading: the contract interprets nothing. A bug in the code is executed as faithfully as the rest, and it is the main source of losses in DeFi.
Oracles and upgrades
A contract cannot see the outside world: to know the ETH price it queries an oracle, such as Chainlink. A manipulated oracle can fool the contract. Many contracts can also be changed with an admin key: you need to know who holds it.
The DAO, 2016
In June 2016 a flaw in The DAO contract let an attacker divert about 3.6 million ETH, nearly a third of the funds. The community chose to rewrite history to return the funds: the chain split into Ethereum and Ethereum Classic, which kept the original history.
Common mistakes
- Taking an audit as a guarantee: audited protocols have been hacked.
- Signing an unlimited spending approval and never revoking it.
Questions and answers
Is a smart contract legally binding?
Not in itself: it is a program. It can carry out a legal agreement, but contract law still applies to the parties.
Can a transaction be reversed?
No, unless the contract includes a function for it. That is why a wrong address or a fraudulent signature is usually final.
Notitia newsroom · education, not investment advice.