Paste 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 into Etherscan, a free website that shows everything recorded on Ethereum, and you are looking at USDC, a token meant to stay worth one US dollar. As read from the contract itself at 09:43 UTC on 10 November 2026, it recorded about 45.9 billion tokens on that chain. There is no customer database behind that page. The balances live inside a program stored at that address: 2,186 bytes of code that pass every request on to a second, larger program holding the token’s rules. Anyone can read both, at any hour, without asking Circle for permission.
That program is a smart contract. So what is a smart contract, in plain words? It is a piece of code stored on a blockchain at its own address, which does exactly what it was written to do when someone sends it a transaction, and nothing at all the rest of the time. It can hold money, keep records and apply rules. It never wakes up by itself.
The name misleads twice. A smart contract has no intelligence: it cannot judge, guess or change its mind. And it is not automatically a contract in the legal sense, a question answered country by country further down. Ethereum’s own introduction picks a humbler image, a vending machine where “specific inputs guarantee predetermined outputs” (ethereum.org). The picture is older than Ethereum by almost twenty years, and it comes from the man who coined the term.
This beginner’s lesson follows our lessons on how the Ethereum Virtual Machine runs code and on gas fees and EIP-1559. You do not need either to follow it, only to know that every action on Ethereum costs a small fee paid in ether, the network’s own currency.
What is a smart contract: a program at an address that waits
Ethereum has two kinds of accounts. The first is the one in your wallet: an address controlled by a private key, which can send ether and sign requests. The second is a contract account: an address controlled by code. Our guide to the account model covers the difference in more detail. Nobody holds a key that lets them take the money out of it. The only way in is to call one of the functions its code offers, and the code decides whether the request goes through.
That is the first thing to understand about a smart contract: it is passive. It runs only when a transaction arrives, sent either by a person or by another contract that was itself called by a person. A lending contract cannot sell your collateral on its own initiative; somebody has to send it a transaction that asks for the sale, and the code then checks whether the rules allow it.
The same goes for time. A contract cannot set an alarm for midnight. If its rule says “pay out after 1 December”, it pays only when someone calls it after that date; the code then compares the date of the current block with the one it stores. Bots and automation services earn fees by sending those wake-up calls.
The second thing is that a contract is predictable. Thousands of computers run the same code with the same inputs and must reach the same result, otherwise they could not agree on the state of the chain. That is why a contract cannot look up a website or roll real dice: the same call must give the same answer everywhere. The machine that makes this possible is the subject of our lesson on how the EVM works; here, the useful idea is simply that the rules are the code, and the code is the same for everyone.
Who writes these programs? Developers, mostly in a programming language called Solidity, which a later lesson on Solidity for non-developers will introduce without code. Once a contract is deployed, the bytes stored at its address cannot be edited. There is a widely used way around that, the proxy, which the section on limits explains.
From Szabo’s 1994 essay to the vending machine of 1996
The term “smart contract” was not invented for Ethereum. It comes from the computer scientist Nick Szabo, who wrote about it in the mid-1990s, long before any blockchain existed.
1994: a protocol that executes the terms
In his 1994 essay “Smart Contracts”, Szabo gave a one-line definition: “A smart contract is a computerized transaction protocol that executes the terms of a contract” (Szabo, 1994). He saw crude early versions in the electronic tools of the time, such as card payment terminals and the electronic exchange of orders and invoices between companies, and called digital cash protocols fine examples. He also imagined “smart property”, such as a car whose access could be cut off if the loan secured on it went unpaid.
The goals he listed sound familiar today: meet the usual conditions of a deal, reduce mistakes and bad faith, and depend less on trusted middlemen. What he did not have was a shared ledger that nobody controls. Bitcoin arrived about 15 years later, in 2009.
1996: the humble vending machine
The vending machine does not appear in the 1994 text. It comes from a longer essay of 1996, “Smart Contracts: Building Blocks for Digital Markets”, where Szabo calls “the humble vending machine” the primitive ancestor of the idea. The same essay adds that the word smart implies no artificial intelligence (Szabo, 1996).
The comparison is sharper than it looks. A vending machine takes coins, gives the product and the change, and needs no shop assistant. Anyone with the right coins can deal with it, at three in the morning, without showing an ID. Szabo added a condition that people often forget: the machine works because the money in the till is worth less than the cost of breaking into it. The mechanism enforces the deal only within a limited potential loss.
That condition still applies. A contract that holds a few dollars is a poor target. A contract that holds tens of millions of dollars, readable by everyone, is a very attractive one, and the bug section below shows what happens when the lock is weaker than the till is full.
2013 to 2015: the idea moves onto a blockchain
Ethereum’s whitepaper, written by Vitalik Buterin in 2013, proposed a blockchain with a built-in programming language, so that anyone could deploy Szabo-style contracts on a network nobody owns. The network went live with the Frontier release on 30 July 2015, according to ethereum.org’s history page. That story, from the whitepaper to the latest upgrades, is told in our lesson on Ethereum’s history and whitepaper.
What happens when you call a smart contract, step by step
Take a common case: you want to swap 1,000 USDC for ether on Uniswap, an exchange that runs entirely on contracts, through one of its pools. Seen from the chain, here is what happens.
- Your wallet, or the website you use, builds a transaction. It names the contract address, the function to run and the inputs: how many USDC you give and the minimum amount of ether you accept.
- You sign the transaction with your private key. Signing is your consent, and it also commits you to pay the fee, called gas.
- A validator, one of the computers that build Ethereum’s blocks, puts the transaction in a block. Every node on the network then runs the same contract code with your inputs.
- The code checks its conditions one by one: do you hold the USDC, did you allow the contract to move them, is the price still above your minimum?
- If every check passes, balances change in one go: the pool receives your USDC and sends you ether. If one check fails, the whole call is cancelled as if nothing had happened, except that the gas already used is still paid.
- Once the block is final, there is no undo button and no customer service that can reverse the swap.
Gas is cheap at the moment, but never free. At block 26,383,689, mined at 09:43 UTC on 10 November 2026, the base fee was about 0.056 gwei (a gwei is a billionth of an ether), from our own read of a public Ethereum node. As an example only: a plain transfer of ether uses 21,000 units of gas, so it cost about 0.0000012 ETH, roughly a quarter of a cent at an example price of $2,100 per ether, before any tip to the validator. A swap uses several times more gas. How the fee is set, and why it was much higher in 2021, is the subject of the gas and EIP-1559 lesson.
One more point that surprises beginners: the website you click on is not the contract. A decentralised application is a front end, an ordinary website run by a company or a team, plus contracts on the chain. The site can go down or block your country; the contract stays where it is and answers anyone who calls it correctly. Our guide to what a dApp is walks through that split.

Smart contract examples: six you can open today
The six contracts below are all live on Ethereum. Figures come from our own reads of a public node between 09:41 and 09:55 UTC on 10 November 2026, and from DefiLlama the same morning. They are dated snapshots, not live data.
| Contract | What it does | Address | Dated figure (10 Nov 2026) | Can the code change? |
|---|---|---|---|---|
| USDC token (Circle) | Keeps balances of the USDC stablecoin and moves them | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 | About 45.9 billion USDC recorded on Ethereum, read from the contract at 09:43 UTC | Yes: it is a proxy, and its admin can point it to new logic |
| Uniswap v3 USDC/WETH pool, 0.05% fee | Holds two tokens (USDC and WETH, a token version of ether) and swaps one for the other at a price set by its formula | 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640 | About 48.4 million USDC and 15,194 WETH held, about 09:50 UTC | No proxy found in its storage |
| Aave v3 Pool | Takes deposits, lends against collateral, runs liquidations | 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2 | Aave V3 holds $15.24 billion in all, $12.75 billion of it on Ethereum (DefiLlama) | Yes: a proxy managed through Aave governance |
| ENS registry | Records who controls each .eth name and where it points | 0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e | ENSv2 live since 27 October 2026; a name of five letters or more costs $8 a year | ENSv2 runs on new contracts; upgrading a name is optional and one-way |
| Safe (singleton 1.4.1) | Shared code for multisig wallets, which need several owners to sign | 0x41675C099F32341bf84BFc5382aF534df5C7461a | 23,579 bytes of code, close to the size limit | Owners choose the signers and threshold of their own wallet |
| Chainlink ETH/USD price feed | Publishes an ether price that other contracts read | 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 | $2,095.72, last updated at 09:01:47 UTC | Yes: a proxy that can point to a new price contract |
USDC: a token is a contract that keeps a ledger
A token is not a file that travels from wallet to wallet. It is a line in a contract’s table: address A owns this much, address B owns that much. Sending USDC means asking the USDC contract to lower one number and raise another. The front door at 0xA0b8…eB48 is a small proxy that forwards calls to the logic contract Circle chooses. Our read of the contract showed that both its proxy admin and its owner are ordinary addresses with no code, which means they are controlled by keys, whatever Circle’s internal safeguards are. Circle can therefore replace the rules of USDC and can freeze addresses; it is a centralised token running on a decentralised network.
Uniswap: the pool holds the money itself
The Uniswap pool is a different kind of contract. Nobody at Uniswap holds the 48 million USDC and 15,194 WETH (wrapped ether, ether turned into a standard token) in it: the contract does. Apart from liquidity providers (the users who deposited those tokens) withdrawing their own deposits, the only way to take tokens out is to put the other token in, at the price its formula gives. At 09:43 UTC on 10 November 2026 that price worked out at about $2,103 per ether. Across all chains, Uniswap V3 contracts held $1.48 billion according to DefiLlama, and decentralised exchanges on Ethereum handled about $1.9 billion of trades in the previous 24 hours.
Aave: a loan without a loan officer
Aave is a lending service built from contracts. There, a loan is a sequence of calls to the Pool contract: you deposit collateral, then borrow against it, and the contract tracks the ratio between the two. If the value of your collateral falls too far, anyone may call the contract to repay part of your debt and take some collateral with a bonus. The Pool is a proxy too. The contract that decides which logic the Pool runs is owned by another contract, which Etherscan names “Executor” and labels “Aave: ACL Admin V3 2”: a governance executor, through which Aave’s token holders apply their votes.
ENS: registering a name is calling a contract
The Ethereum Name Service turns long addresses into names like alice.eth. Registering one means calling a contract, paying, and receiving the name as a token in your wallet. ENSv2 went live on Ethereum’s main network on 27 October 2026; a .eth name of five characters or more now costs $8 a year, paid in USDC or DAI, as our report on the ENSv2 launch explains. The old registration contracts are still on the chain, but new registrations through them are switched off. Contracts do not disappear; their owners route users elsewhere.
Safe and Chainlink: shared wallets and outside prices
A Safe is a wallet that is itself a contract. It moves funds only when, say, three of its five owners have signed, which is why companies and DAOs (groups that decide by token votes) use it to hold their funds. The Chainlink feed is the odd one out: it does not hold money, it publishes a price that lending contracts such as Aave read. Its last update, at 09:01:47 UTC, was more than 40 minutes old when we read it, within the hourly refresh the feed allows when the market is calm.
How to check a smart contract on Etherscan without connecting a wallet
Our guide on how to read a block explorer already opens the USDC contract tab. Here is the same kind of walk on a different contract, the Uniswap pool from the table. You need a browser, nothing else. As of 10 November 2026, Etherscan listed 942,818 verified contracts, so the same steps work on most contracts you will meet.
- Go to etherscan.io and paste 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640 in the search bar. Copy addresses from the project’s official documentation, never from a direct message or an advert, and check the first and last characters.
- On the overview, open the token holdings list. You will see the USDC and WETH the pool holds: that is the money the code controls.
- Click the Contract tab. A green tick and the words “Source Code Verified” mean the published source code compiles to exactly the bytes stored on the chain. It does not mean the code is safe; Etherscan itself warns about that.
- Open Read Contract. Each line is a function you can run for free. Try token0 and token1 (they return the addresses of USDC and WETH), fee (it returns 500, meaning 0.05%) and liquidity.
- Look for tabs called Read as Proxy and Write as Proxy. On USDC’s page they are there, which tells you the logic lives in another contract that can be swapped. A contract without them, such as this pool, runs the code you are reading and nothing else.
- Find the Contract Creator line on the overview: it shows which address deployed the contract and in which transaction, so you can see how old it is.
- Do not click Write Contract or “Connect to Web3” just to look. Reading needs no wallet. Writing sends a real transaction, and a site that asks you to connect a wallet merely to “view” a contract is a classic trap.
What smart contracts do better than a middleman
The first advantage is the one Szabo described: execution without a clerk. Nobody has to approve a swap, check a form or open the office. The contract answers at 3 a.m. on a Sunday exactly as it does on a Tuesday afternoon, and a user in Ohio gets the same rules as a user in London or Lyon.
The second is that the rules are public. With a verified contract, you can read the very code that will handle your money, or rely on people who read it for a living. A bank’s internal systems offer nothing comparable.
The third is that contracts can call each other. A wallet contract can call a lending contract, which reads a price contract, which a trading contract also reads, all inside one transaction. Developers call this composability; it is why new DeFi (decentralised finance) services appear quickly, built on top of pieces that already work. As of 10 November 2026, DeFi contracts on Ethereum held $41.8 billion (their total staking or liquidity, measured at current market prices. It is the main size metric in DeFi.">value locked) according to DefiLlama, out of $78.8 billion across all the chains it tracks.
The honest wording is “less reliance on middlemen for execution”, not “no trust needed”. Someone wrote the code, an auditor may have checked it, an oracle may feed it, and an admin may be able to change it.
Where smart contracts fail: irreversible code and expensive bugs
Code that cannot be edited, and the proxy exception
Once deployed, a contract’s code is fixed. That is the source of its value, since nobody can quietly change the rules, and of its danger, since nobody can quickly fix a mistake. If the code lets the wrong person withdraw, the withdrawal is valid as far as the chain is concerned.
Developers soften this with proxies. The address users call holds very little code and forwards every request to a separate logic contract; the admin can point the proxy to a new logic contract later. USDC and the Aave Pool both work this way, as our reads of their storage on 10 November 2026 showed. A proxy makes bugs fixable, but it brings back a person or a committee who can change the rules. A later lesson on upgradeable contracts and admin keys will go into that trade-off.
The DAO, June 2016: the bug that split Ethereum
The DAO (for decentralised autonomous organisation) was an investment fund run entirely by a contract. On 17 June 2016, Vitalik Buterin warned on the Ethereum Foundation blog that an attacker was exploiting a “recursive calling vulnerability” in it: the contract sent ether out before updating its own records, so the attacker could ask again and again. According to ethereum.org, more than 3.6 million ETH were drained. The community chose to change the rules: a hard fork, a software change every node had to adopt, at block 1,920,000 on 20 July 2016 moved the ether out of the faulty contract into a new one whose only function let investors withdraw it. More than 85% of the votes cast backed the fork, according to ethereum.org; miners who refused carried on the old chain as Ethereum Classic. The full story is in our guide to DeFi hacks and exploits.
Parity, November 2017: half a million ETH frozen, not stolen
The Parity case shows immutability at its harshest. On 6 November 2017, an anonymous user found that a shared “library” contract, used by every Parity multisig wallet deployed after 20 July 2017, had never been initialised. The user made themselves its owner, then triggered its self-destruct function, which deletes a contract’s code from the chain. According to Parity’s own postmortem, that blocked 513,774.16 ETH in 587 wallets, plus other tokens.
Nobody took the money. It simply became unreachable, because the wallets depended on code that no longer existed. Parity wrote that the kill function was left over from the original audited contract. Unlike The DAO, no fork came to the rescue.
Truebit, January 2026: old code, no overflow checks
On 8 January 2026, an attacker drained about 8,535 ETH, then worth about $26 million, from a contract of the Truebit protocol. The contract computed the price of the TRU token with arithmetic that could overflow: a number grew so large that it wrapped round to almost zero, so tokens could be bought for nearly nothing and sold back for ether. CertiK’s analysis traces the flaw to Solidity versions below 0.8.0, which lack built-in overflow checks, and BlockSec notes the contract was compiled with version 0.6.10. BlockSec also had to work from decompiled bytecode, because the source code of the logic contract was not public: nobody outside the team could easily read the rules. The contract sat behind an upgradeable proxy, yet that did not help, since CertiK reports the tokens were minted and sold in a single transaction, before anyone could react.
| Date | Contract | What went wrong | Amount | Outcome |
|---|---|---|---|---|
| 17 June 2016 | The DAO | Sent ether before updating its records (recursive calls) | More than 3.6 million ETH drained | Hard fork on 20 July 2016; Ethereum Classic split off |
| 6 November 2017 | Parity multisig library | Uninitialised owner, then self-destruct | 513,774.16 ETH frozen in 587 wallets | Frozen, not stolen; no fork to recover them |
| 8 January 2026 | Truebit | Price arithmetic overflowed (Solidity 0.6.10) | About 8,535 ETH, about $26 million | Contract drained |
Audits reduce the risk without removing it
An audit is a paid review of the code by security specialists, and it catches many problems. It covers a given version of the code, for a given scope, at a given date. The Parity kill function came from audited code that was then reused differently; plenty of audited protocols have been hacked since. Our guide on how to read an audit report explains what a report does and does not promise.

The oracle problem: a contract cannot look out of the window
Since every node must reach the same result, a contract cannot fetch the price of ether from a website: two nodes asking a second apart might get two different answers, and the network could no longer agree. As ethereum.org’s page on oracles puts it, contracts work only with data already on the chain.
The fix is an oracle: a service that writes outside data onto the chain so contracts can read it. Chainlink is the best-known, and its ETH/USD feed from our table is one example. The trouble is that the contract must now trust whoever feeds it. On the morning of 10 November 2026, the feed showed $2,095.72 (last updated at 09:01:47 UTC) while the Uniswap pool implied about $2,103 at 09:43 UTC: a gap of about a third of a percent, normal for a feed that updates only on larger moves or once an hour, but a wrong or manipulated price can trigger liquidations that the code will carry out without question. Our lesson on DeFi oracles covers the failures and the defences in depth.
What “trustless” really means: trust moves, it does not vanish
You will often read that smart contracts are “trustless”. It is more accurate to say that trust moves. You trust the code instead of a clerk, and through the code you trust whoever wrote it, whoever audited it and whoever holds its admin keys.
Those admin keys are real. In our reads, USDC’s upgrade powers sat with key-controlled addresses, and the Aave Pool answered to a governance executor contract. Neither is hidden, and both have reasons to exist (Circle must be able to freeze stolen funds, Aave must be able to fix bugs), but a holder should know they are there. A multisig spreads that power across several signers; it does not remove it. The theft of about $1.5 billion from Bybit in February 2025 went through a Safe multisig: the Safe contracts were not at fault; the attack came through a compromised developer machine at Safe{Wallet}, the interface the signers used, as our guide to hacks recounts.
The front end is another point of trust. The site you use can show you a misleading transaction or be hijacked, even when the contract behind it is sound. Reading what your wallet asks you to sign is part of using contracts safely.
Immutability can also cut the other way. Ethereum developers are discussing a repricing for the Glamsterdam upgrade that would make writing new data to the chain much more expensive, and old contracts that assume fixed gas costs could stop working, with no way to edit them. Two rival drafts meant to protect such contracts were filed on 8 November 2026, and none of this is live on mainnet yet, as our report on Glamsterdam and old contracts explains. Ethereum’s core developers have calls scheduled on 12 and 19 November 2026, according to the same report, and old contracts cannot take part in that debate: whatever is decided, their code stays as it is.
Are smart contracts legally binding?
Short answer: sometimes, and mostly when the code carries out an agreement that ordinary contract law already recognises. A smart contract is a program, not a legal category. Whether there is a contract depends on what the parties agreed, under the law of their country. A few legislators have said that using a smart contract does not make an agreement invalid. And none of this stops a court from ordering a person to do what the code will not do: the chain cannot be edited, but people can be ordered to pay.
| Place | Text | What it says |
|---|---|---|
| Arizona, United States | A.R.S. 44-7061, from House Bill 2417, approved 29 March 2017 | Smart contracts “may exist in commerce”; a contract cannot be denied legal effect solely because it contains a smart contract term |
| England and Wales | Law Commission advice to government, 25 November 2021 | Existing law can already support smart legal contracts, without statutory reform; deeds and private international law need more work |
| France | Code civil (general contract law); ordonnance 2017-1674 of 8 December 2017 | Ordinary contract rules apply to the agreement; the ordinance allows some financial securities to be recorded on a blockchain |
| Italy | Art. 8-ter of decree-law 135/2018, added by law 12/2019 (in force 13 February 2019) | Defines a smart contract and gives it the value of written form once the parties are identified under AgID guidelines |
| European Union | Data Act, Regulation (EU) 2023/2854, art. 36 (applies from 12 September 2025) | Smart contracts that execute data-sharing agreements must meet essential requirements, including safe termination and interruption |
In the United States, contract law is mostly state law. Arizona went furthest in plain words: its statute, added by House Bill 2417, approved by the governor on 29 March 2017, says a contract relating to a transaction “may not be denied legal effect, validity or enforceability solely because that contract contains a smart contract term”, and defines a smart contract as an event-driven program that runs on a distributed ledger and can hold and transfer assets on it (A.R.S. 44-7061).
In England and Wales (Scotland has its own law), the Law Commission concluded in its advice to government of 25 November 2021 that the current legal framework “is clearly able to facilitate and support the use of smart legal contracts”, without the need for statutory law reform. In plain terms, a contract whose terms are written in or carried out by code can be valid under the law as it stands. The Commission named two areas needing more work: deeds and private international law, the rules on which country’s courts hear a cross-border dispute.
In France, the answer comes from the ordinary rules of the Code civil, built on the parties’ consent: the code can perform an agreement, but the agreement is what makes a contract. France did pass a text in 2017, ordonnance 2017-1674, letting certain financial securities be recorded on a shared electronic register, a blockchain. That is a rule about securities, not a general recognition of smart contracts.
Italy defines the term in a statute. Article 8-ter of decree-law 135 of 14 December 2018, added when the decree was converted by law 12 of 11 February 2019, describes a smart contract as a computer program running on distributed ledgers whose execution automatically binds two or more parties on the basis of effects they set in advance. It satisfies the written-form requirement once the parties have been identified through a process that the law leaves to guidelines from AgID, the national digital agency.
The European Union took a narrower route. Article 36 of the Data Act (Regulation (EU) 2023/2854, applicable from 12 September 2025) applies only to smart contracts that execute data-sharing agreements. The vendor of the application, or whoever deploys such contracts for others, must ensure robustness and access control, a way to archive the data and code if the contract is stopped, consistency with the data-sharing agreement, and a mechanism to terminate or interrupt it, then issue an EU declaration of conformity, according to the text on EUR-Lex. That last requirement, often called a kill switch, sits awkwardly with contracts designed to be unstoppable, but it does not cover DeFi in general.
Size limits and other constraints worth knowing
A contract cannot be as large as its authors like: a rule called EIP-170 caps its code at about 24 KB, and our lesson on how the EVM works explains the cap and the proposal to raise it. Big projects already come close: the Uniswap pool in our table weighs 22,142 bytes and the Safe singleton 23,579 bytes, by our reads of 10 November 2026. That is one reason large applications are split into several contracts that call each other.
Every call also competes for space in blocks. At block 26,383,689, a block could hold at most 60 million units of gas and that one was 56% full. A contract that needs a lot of computation for one call costs its users more and, past a point, cannot run in a single transaction at all.
Six questions to ask before you trust a smart contract
None of these questions tells you whether to use a protocol; they tell you what you are trusting if you do.
- Is the source code verified on the block explorer, and is the address the one listed in the project’s official documentation?
- Is it a proxy, and if so, who can change the logic: one key, a multisig, a governance vote with a delay?
- Who owns or administers it, and can that owner pause the contract, freeze addresses or move funds?
- Was it audited, by whom, on which version and with which findings left open?
- Does it depend on an oracle for prices, and what happens if that price is wrong or late?
- How much money does it hold, and for how long has it held that much without incident?
The path continues with token standards, which explain how ERC-20 tokens such as USDC and NFTs (unique tokens, like an ENS name) keep their ledgers, and with a lesson on smart contract risks and audits that applies these six questions to real protocols.



