What is a blockchain, actually?
How it works, what has gone wrong, and what it can't do. No real money or wallet.
-
Why now
Most of the stolen money left in about twenty minutes, by one count
Attackers took more than $6 billion in crypto (digital money) from Binance, an exchange where people trade it. Source One firm that tracks stolen crypto says the money started leaving at 20:05 UTC (world standard time), and that most of it left in about twenty minutes, across ten blockchains. Source Another tracking firm says the money left over a few hours, across 11 blockchains. Source Two days later the FBI said North Korea was responsible and asked companies to block transactions linked to the attackers' wallet addresses, which work like account numbers for crypto. Source North Korea denies it. Source
Your first question is probably the right one. You've heard a blockchain can't be hacked. So what got hacked?
Guess first. What do the reports say was attacked?
- The math that secures the blockchain Not according to any report we read.
- The blockchain's own rules No report we read says this either. The chains kept working as designed, and that is part of the problem, because they carried out the attackers' transfers too.
- The company's systems for holding crypto That's where the reports point.
Binance said its own hot wallets were hit. A hot wallet is a crypto wallet kept online. Binance's initial report, on November 3, says attackers got into engineers' computers, one of them through a fake job interview. The report says that from there they reached an internal service, a company system that signs wallet transactions. Signing a transaction is how a wallet approves a transfer.
-
Step by step
It starts with a fingerprint
A blockchain is built on something called a hash function. Bitcoin's hash function is named SHA-256. It takes any text, from one letter to a whole book, and gives back a fingerprint, also called a hash, of exactly 64 characters. Source
The fingerprint of
hellostarts with2cf24dba. The fingerprint ofhellpstarts withfdd7585e. One letter changed, and the two share almost nothing.If a text is long and can't be guessed, you can't work backward from its fingerprint to find it. Finding two different texts with the same fingerprint is out of reach today. Such pairs must exist, because there are more possible texts than fingerprints, but nobody has found one. A hash uses no secret key, so it isn't encryption, which hides a message behind a key. It also carries no signature, so it doesn't say who wrote anything.
A fingerprint matches the one you saved last week. What does that tell you?
- Who wrote the text in the first place A hash has no key and no signature, so it can't tell you who wrote the text.
- The text almost certainly hasn't changed That's what a fingerprint is for. Any change to the text gives a different fingerprint, with very high probability.
- The text is true and can be trusted A false sentence has a perfectly good fingerprint too. Hold on to that idea, because it comes back later.
-
Step by step
Each block carries the fingerprint of the one before
A block is a batch of records, such as payments. It also holds the fingerprint of the block before it. That link is what makes it a chain. Source
You can check this on the real thing. Bitcoin's first block, dated January 3, 2009, has a fingerprint starting with
000000000019d668. The next block has that exact value written inside it. SourceSo if you change one old record, that block's fingerprint changes. Now the next block is holding a fingerprint that no longer matches. Update the next block to fix that, and its own fingerprint changes, which breaks the block after it, and so on all the way to today.
Someone quietly edits a record in an old block. What happens?
- Nothing happens, because nobody ever looks back at old blocks The next block contains that block's fingerprint, so the mismatch is visible to anyone who checks.
- Only that one block is affected, and the rest stay fine That block's fingerprint is written into the next block, so the mismatch shows right there. Fixing the next block just moves the problem to the block after it.
- The next block stops matching, and repairing it breaks the one after Researchers at NIST, the US government's standards agency, call this tamper evident, meaning a change can be noticed. They say calling a blockchain immutable, meaning impossible to change, is "not strictly true," and we'll see why.
-
Try it
Mine a block, then break it
The fingerprints below are real SHA-256 fingerprints, made on your device. To make a block harder to fake, a block here only counts if its fingerprint starts with
000. Each block also holds a number called the nonce, and changing the nonce changes the fingerprint. The only way to find a fingerprint that starts with000is to keep guessing new nonces. That guessing is called mining.This experiment needs JavaScript. You can build the same thing in the project at the end of this lesson. For a block that says "Alice pays Bob 5," the first nonce that works is 1,780, which is the 1,781st guess because counting starts at 0. Change one word and that nonce stops working.
You changed Block 1 and didn't touch Block 2. What happened to Block 2?
- It stayed valid, since its own text didn't change Block 2 has a line called "Fingerprint of the block before," which holds Block 1's fingerprint, and that changed.
- It went invalid, since the fingerprint it carries changed That's the chain working. To cover your tracks, you would have to mine it again, and every block after it.
- It disappeared, since the chain removes bad blocks It's still there. It just no longer passes the check, and anyone can see that.
-
Step by step
Why rewriting a chain is expensive
Your blocks needed 3 zeros. Each extra zero multiplies the guessing by 16. The fingerprint of a Bitcoin block from November 3, 2026 starts with 20 zeros. That day, finding a valid block took about 6.4 × 1023 guesses on average, somewhere between needing 19 zeros and needing 20. Source Yet anyone can check a winning guess by working out one fingerprint. Source
Computers on the network follow the version of the chain with the most total work behind it. So to change an old block, you must redo it and every block after it, then get ahead of everyone else, who keep adding blocks. Source
That's also how Bitcoin stops someone from spending the same coin twice. All transactions are announced, and everyone agrees on one history. Say a seller waits for 6 more blocks before trusting your payment, and you want to undo it. If you held 10% of the network's computing power and had been building your own version of the chain in secret the whole time, your odds of catching up would be about 0.024%. Source
Why doesn't a cheater just rewrite old blocks to undo a payment?
- They would have to redo the work and pass everyone else NIST says a majority attack, where one side controls most of the computing power, isn't technically hard, only expensive. The cost grows the further back in the chain you go.
- The law forbids it, and that keeps cheaters from trying Maybe it does, but the design doesn't depend on the law. It depends on cost.
- The math makes it impossible, even with huge computers It's possible and it's expensive. Smaller chains have actually had this happen.
-
Step by step
Not every chain burns electricity
The guessing you just did is called proof of work. What it spends is electricity, which comes from outside the chain. Researchers at the University of Cambridge estimate how much electricity Bitcoin uses. In early November 2026, their best guess was about 167 terawatt-hours a year. Their range was 86 to 321, because the estimate depends on assumptions. The numbers change daily. Source A terawatt-hour is a billion kilowatt-hours, and a kilowatt-hour is the unit on a home electric bill.
Proof of stake puts something from inside the chain at risk instead: the chain's own coins. Ethereum, another blockchain, has used proof of stake since September 15, 2022. A computer that helps confirm blocks, called a validator, locks up a deposit of 32 ether, Ethereum's coin. It can lose that deposit for breaking the rules. Source
Switching to proof of stake cut Ethereum's energy use by more than 99.9%. Source It did not make the fees for using Ethereum cheaper. Source These are two designs with different tradeoffs, and people argue about which is better.
What's the main difference between proof of work and proof of stake?
- One of them is a blockchain and the other one isn't Both are ways for a blockchain's computers to agree on the next block. Bitcoin uses proof of work, and Ethereum uses proof of stake.
- Proof of stake made the fees on a chain much cheaper Ethereum's own website says the switch was never meant to lower fees, because it did not significantly change capacity, the number of transactions the chain can handle.
- One spends electricity, and the other puts a deposit at risk Both make cheating costly, and they do it in different ways.
-
Step by step
So what has actually gone wrong?
It helps to sort the failures into three groups, starting with the chain itself and moving outward.
- The chain's own rules. In 2010, a bug in Bitcoin's software briefly created about 184 billion bitcoins. A fix came within hours. Source Smaller chains have had old blocks rewritten, some of them by attackers. An MIT project that monitored these chains detected over 40 rewrites of 6 or more blocks in 2019 and 2020. Source
- Programs and new coins built on top of a chain. In 2016, an attacker used a flaw in the code of The DAO, a money-raising project on Ethereum, to divert about 3.6 million ether. Source Terraform was a company that made its own crypto coins. The US Attorney in New York, a federal prosecutor, calls the Terraform case a $40 billion fraud. Source
-
Step by step
The third group is companies and keys
The third group of failures is in the companies that hold crypto and the secret keys that control it. The exchange Mt. Gox reported that about 650,000 bitcoins were lost. Source The US Attorney in New York says the founder of the exchange FTX stole over $8 billion from customers. Source The FBI blames North Korea for about $1.5 billion taken from the exchange Bybit. Source
A private key is the secret that lets you spend the crypto in a wallet. Steal someone's key, and the chain will obey you as if you were them. Binance first said it found no sign that its keys had leaked. Source Its initial report, which outside experts will review, says attackers reached the internal service that signs its wallet transactions. Source One tracking firm thinks the attackers got Binance's own systems to sign transfers for them, rather than stealing its keys. Source
Across all three groups, where did the biggest losses happen?
- In the fingerprint math, when SHA-256 was broken None of these losses required breaking SHA-256.
- In the code, companies and keys around the chain In these cases the fingerprint math held. The weak parts were the places where people and programs connect to the chain.
- In large proof-of-work chains that were rewritten Rewriting happened to smaller chains, for much smaller amounts of money.
-
Step by step
What a blockchain can't do
A block saying "Ana owns the moon" passes every check. A chain can show that a record was written and hasn't changed. It can't show the record is true. NIST calls this the Oracle Problem. Records come into the chain from sensors and people, and a sensor can break and a person can type anything. Source
A blockchain also isn't exactly anonymous. The chain holds no names, but its record is public. Names can get attached from outside the chain, for example when someone posts their wallet address online. Source It isn't fully traceable either. Mixers, services that blend different people's crypto together, can make money harder to follow. Source
A valid block says "Ana owns the moon." What does that prove?
- Someone wrote it, and it hasn't changed since That's all it proves. A record can be tamper evident and still be false.
- Ana owns the moon, because the chain says so Ana will be glad to hear it. The chain has no way to check.
- NASA has been informed that Ana owns the moon It has not.
-
The honest part
Who can change a blockchain, and who controls it?
The claim that nobody can change anything has limits. After the attack on The DAO, a hard fork, which is a rule change that splits a chain, moved The DAO's funds to a recovery address. Source Part of the money stolen from Binance was in stablecoins, digital coins meant to hold a steady value. Companies that issue them, including Tether and Circle, froze billions of dollars' worth. Source Binance says about $2.85 billion of the stolen money was frozen or intercepted. Source Bitcoin has no issuer like that, so no company can freeze it on the chain itself. Source
People also call a blockchain decentralized, meaning no single group is in control. Miners often work together in groups called mining pools. Over the past year, the top 3 Bitcoin mining pools found 59% of blocks, and the top 6 found 82%. Source A pool often doesn't own the machines in it, and miners can leave a pool. NIST calls the belief that "no one controls a blockchain" a misconception. Source
-
The honest part
What is a blockchain good for?
Bitcoin is slow. It confirms about 7 to 9 transactions a second, and the card network Visa averages about 8,200. Source NIST's report on blockchains also includes a US government flowchart for deciding whether a project needs one. It asks six questions. Answer no to any of them, and it points you to something else, usually a database, the ordinary way to store records. Source
Real uses are hard to measure. The World Food Programme, the UN's food aid agency, reports using a blockchain to coordinate aid for 6.3 million households, by its own count. Source The European Central Bank, which runs the euro, launched a system in September 2026 linking blockchain-style platforms to its payment services. Source That system is too new to show how much it will be used. About 80% of stablecoin transactions are made by bots, which are automated programs, so activity isn't the same as usefulness. Source
We explain how this works. We never say what to buy, and this lesson uses no real money or wallet.
What's the fairest thing to say about a blockchain?
- It will replace banks and databases, because its records can't be changed Bitcoin is far too slow to handle as many payments as a card network, and that US flowchart lists six things a project must need before a blockchain fits.
- It's all a scam with no real use, and no serious institution touches it Plenty of fraud has gone on around it, but the design does real work, and some institutions use it.
- It makes secret changes hard, at a real cost, and that fits some jobs That claim is specific, measured and a bit dull, which is usually a good sign.
-
Step by step
The blocks you mined and the real thing
So you don't walk away with a wrong picture, here's where the two blocks you mined in the experiment differ from Bitcoin.
- Your Block 2 updated its copy of Block 1's fingerprint for you. A real chain stores that copy inside the block, so a mismatch stays until someone repairs it.
- Bitcoin runs the fingerprint math twice on each block. Yours runs it once.
- Bitcoin takes the fingerprint of an 80-byte header, a short summary of the block in raw computer data. Yours takes the fingerprint of plain text.
- Bitcoin reads the fingerprint as a number and checks that it's at or below a target. Yours just counts zeros.
- A real miner runs out of nonces to try and has to change something else in the block too. Yours never runs out.
The idea is the same, but the scale is not. Your blocks needed 3 zeros, and the Bitcoin block from November 3 had 20.
-
Your project
Build a blockchain, then attack it
- You will have A working mini blockchain you wrote in Python, plus proof of how it can be fooled.
- Time About 60 minutes.
- You need A computer and JupyterLite, a free tool that runs Python code in your browser with no account. The project uses no real money, no wallet and no blockchain network. The "points" that people pay each other in this project are just text.
Show the starting code
import hashlib, json FIELDS = ('index', 'data', 'prev', 'nonce') def block_hash(b): text = json.dumps({k: b[k] for k in FIELDS}, sort_keys=True) return hashlib.sha256(text.encode()).hexdigest() def mine(index, data, prev, difficulty=3): b = {'index': index, 'data': data, 'prev': prev, 'nonce': 0} while True: h = block_hash(b) if h.startswith('0' * difficulty): b['hash'] = h return b b['nonce'] += 1 def valid(chain, difficulty=3): for i, b in enumerate(chain): if block_hash(b) != b['hash'] or not b['hash'].startswith('0' * difficulty): return False, i if i and b['prev'] != chain[i-1]['hash']: return False, i return True, None- Build. Paste in the starting code and run it. Make the first block by running
chain = [mine(0, 'start', '0')]. Add the next one withchain.append(mine(1, 'Ana pays Ben 5 points', chain[-1]['hash'])), then add one more the same way, with 2 in place of 1.valid(chain)should say(True, None). - Tell a lie. Add a block saying "Ana owns the moon." Does
valid(chain)still say(True, None)? - Tamper. Change the data in the second block, which is at index 1 because counting starts at 0, by running
chain[1]['data'] = 'Ana pays Ben 500 points'.valid(chain)should now say(False, 1). - Cheat harder. In your own copy of the chain, mine that block again, and every block after it. What does
valid(chain)say now? What does that tell you about a single copy of a chain checking only itself? - Compare with a friend. Have a friend build an honest copy, or build one yourself. Then compare its last block's
hashwith the last one in your cheating copy. They won't match, and that's why many copies matter. - Feel the wait. Mine a block with difficulty 3, then 4, then 5, and time each one. Copy your code somewhere before you close the tab.
Before you start, you might like to see this online demo by Anders Brownworth, where changing a block turns the later blocks red.
-
Done
The Binance transfers are still there
They are on the chains. Anyone can look them up, and they should read the same next year.
They don't say who was at the keyboard.
Next lesson What happens when you tap your phone to pay?Sources
- AP via PBS, Oct. 31, 2026, and Yonhap via Korea Times, Nov. 1, 2026: the Binance theft and the FBI's attribution.
- Binance's initial report, Nov. 3, 2026: its own account of the attack, which it says outside experts will review. AP via ABC News, Nov. 2, 2026: North Korea's denial.
- TRM Labs and Elliptic: tracking firms that both sell tracing services. Their totals and timelines differ, so we say "more than $6 billion."
- NIST FIPS 180-4: SHA-256. NIST IR 8202, 2018: NIST's report on blockchains, covering tamper evidence, the Oracle Problem, misconceptions and the US government flowchart.
- Bitcoin whitepaper and developer reference.
- Bitcoin's first block and block 974,452, the one from November 3, 2026; mining pool data, read Nov. 3, 2026.
- ethereum.org: proof of stake, and its Merge page.
- Cambridge: Bitcoin electricity index, read Nov. 4, 2026, and Ethereum after the Merge.
- SEC on The DAO, the US Attorney's Terraform and FTX sentencing releases, the Mt. Gox notice (Japanese, with an English translation), and the FBI on Bybit.
- Bitcoin Wiki (a community source) on the 2010 bug, and MIT's project on smaller chains.
- IMF, 2025, on stablecoins (citing Visa's dashboard for the share made by bots); Visa's annual report (10-K) for its fiscal 2025 total; Blockchain.com for Bitcoin's transaction rate; World Food Programme; the ECB on Pontes, the system it launched in September 2026.
The block format in the experiment is our own teaching design, not a standard. Totals for the Binance theft are still changing.
Last checked . Torah Tech researched and wrote this lesson with the help of Claude, an AI made by Anthropic. Any mistakes are ours.