The paperExchangeCrypto WikiWikiAcademywiki.notitiaplatform.com
Sign in
● LIVE
CAC 408 347,4▼ 0.22%S&P 5007 297,1▼ 1.47%EURO STOXX6 201,5▼ 0.31%BTC/USD46 095▲ 6.16%ETH/USD1 437,9▲ 8.87%EUR/USD1.08▲ 0.02%BRENT91.63▼ 1.41%GOLD3 783,3▲ 0.33%OAT 10Y5.02%▼ 1.06%VIX21.67▲ 17.39%CAC 408 347,4▼ 0.22%S&P 5007 297,1▼ 1.47%EURO STOXX6 201,5▼ 0.31%BTC/USD46 095▲ 6.16%ETH/USD1 437,9▲ 8.87%EUR/USD1.08▲ 0.02%BRENT91.63▼ 1.41%GOLD3 783,3▲ 0.33%OAT 10Y5.02%▼ 1.06%VIX21.67▲ 17.39%
 
Europe edition
Notitia

Smart contract

A program deployed on a blockchain that runs automatically according to rules written in advance.

The life of a smart contract
1Codewritten and audited2Deploymentpublished on chain3Calla user signs a transaction4Executionby every node, for a fee

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.

An escrow contract: the rules run by themselves
Buyer10 000 USDCContractfunds lockedSellerif deliveredArbiterif disputedRefundafter 30 daysdeposit
Case study

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.