The Lab · Blockchain

What is a blockchain, actually?

How it works, what has gone wrong, and what it can't do. No real money or wallet.

  • 12 steps
  • About 20 minutes
  • One experiment
  • Then a project
  1. Why now

    Most of the money left in about twenty minutes, by one count

    Starting at 20:05 UTC, by one tracking firm's count, most of the money left in about twenty minutes, across ten blockchains. Another firm describes a few hours across 11. Attackers took more than $6 billion in crypto from the exchange Binance. Source Two days later the FBI said North Korea was responsible and asked companies to block transactions linked to the attackers' wallet addresses. 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 hit?

    • 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, which is part of the problem.
    • The company's wallet systems That's where the reports point.

    Binance said its own hot wallets were hit, the kind kept online. Its initial report, on November 3, says attackers got into engineers' computers, one through a fake job interview, then reached an internal service that signs wallet transactions.

  2. Step by step

    It starts with a fingerprint

    A blockchain is built on a hash function. Bitcoin's is called SHA-256. It takes any text, from one letter to a whole book, and gives back a fingerprint of exactly 64 characters. Source

    The fingerprint of hello starts 2cf24dba. The fingerprint of hellp starts fdd7585e. They share almost nothing.

    You can't work backward from a fingerprint to a long, unguessable text. Finding two texts with the same fingerprint is out of reach today, though "none has been found" is a smaller claim than "none exists." A hash uses no key and no signature, so it isn't encryption, and 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 A hash has no key and no signature, so it names no author.
    • The text almost certainly hasn't changed That's the job. Any change gives a different fingerprint, with very high probability.
    • The text is true A false sentence has a perfectly good fingerprint too. Hold on to that one, because it comes back.
  3. Step by step

    Each block carries the fingerprint of the one before

    A block is a batch of records. It also holds the fingerprint of the block before it. That's the whole chain. Source

    You can check this on the real thing. Bitcoin's first block, dated January 3, 2009, has a fingerprint starting 000000000019d668. The next block has that exact value written inside it. Source

    So change one old record, and that block's fingerprint changes. Now the next block points at a fingerprint that no longer exists. Repair that one, and you break the one after it, all the way to today.

    Someone quietly edits a record in an old block. What happens?

    • Nothing, because nobody looks 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 Its fingerprint is written into the next block, so the mismatch shows right there, and fixing it pushes the problem forward.
    • The next block stops matching, and repairing it breaks the one after Researchers at NIST call this tamper evident. They say calling it immutable is "not strictly true," and we'll see why.
  4. Try it

    Mine a block, then break it

    These are real SHA-256 fingerprints, made on your device. To make the rule harder to fake, a block here only counts if its fingerprint starts with 000. The only way to find one is to keep guessing a number called the nonce. That's mining.

    This experiment needs JavaScript. You can build the same thing in the project at the end of this lesson. With "Alice pays Bob 5," the first nonce that works is 1,780, which is the 1,781st guess. Change one word and it stops working.

    You changed Block 1 and didn't touch Block 2. What happened to Block 2?

    • It stayed valid, since its text didn't change Look at the first line of Block 2's readout. It holds Block 1's fingerprint.
    • It went invalid, because 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 It's still there. It just no longer passes the check, and anyone can see that.
  5. Step by step

    Why it's expensive to rewrite

    You needed 3 zeros. Each extra zero multiplies the guessing by 16. A real Bitcoin block from November 3, 2026 starts with 20 zeros. The rule then worked out to between 19 and 20 zeros, or about 6.4 × 1023 guesses on average. Checking one takes a single hash. Source

    Computers on the network follow the chain with the most total work behind it. To change an old block, you must redo it and every block after it, then pass everyone else, who keep going. Source

    That's also how it stops someone spending a coin twice. All transactions are announced, and everyone agrees on one history. Say a seller waits for 6 more blocks before trusting a payment. If you held 10% of the network's power and had been racing 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 all that work and outpace everyone else Right. NIST puts it plainly: a majority attack, where one side controls most of the computing power, isn't technically hard, only expensive, and the cost grows the further back you go.
    • It's against the law Maybe so, but the design doesn't depend on that. It depends on cost.
    • The math makes it impossible It's possible and it's expensive. Smaller chains have actually had this happen.
  6. Step by step

    Not every chain burns electricity

    What you just did is proof of work. It spends something outside the system: electricity. Cambridge's best guess for Bitcoin in early November 2026 was about 167 terawatt-hours a year, with a range of 86 to 321, because the estimate depends on assumptions. A terawatt-hour is a billion kilowatt-hours, the unit on a home electric bill, and the figure moves daily. Source

    Proof of stake puts something inside the system at risk. On Ethereum since September 15, 2022, a validator (a computer that helps confirm blocks) locks up a deposit of 32 ether, Ethereum's coin, and can lose it for breaking the rules. Source

    That switch cut Ethereum's energy use by more than 99.9%. Source It did not make fees 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 is a blockchain and the other isn't Both are. They differ in how they agree on the next block.
    • Proof of stake made fees cheaper Ethereum's own account says the switch did not reduce fees, because capacity didn't change.
    • One spends electricity, and the other puts a deposit at risk Both make cheating costly, and they do it in different ways.
  7. Step by step

    So what has actually gone wrong?

    Sort the failures by layer.

    • The chain's rules: a 2010 bug briefly created about 184 billion bitcoins, fixed within hours. Source Smaller chains have been rewritten, some by attackers. MIT's tracker saw over 40 rewrites of 6+ blocks in 2019 and 2020. Source
    • Code on top: in 2016 an attacker used a flaw to divert about 3.6 million ether from The DAO. Source The US Attorney calls the Terraform case a $40 billion fraud. Source
    • Companies and keys: Mt. Gox reported about 650,000 bitcoins lost. Source The US Attorney says FTX's founder stole over $8 billion from customers. Source The FBI blames North Korea for about $1.5 billion taken from Bybit. Source

    A private key is the secret that lets you spend. Steal it, and the chain will obey you. At Binance, the company first said it found no sign its keys leaked. Source Its initial report, which outside experts will review, says attackers reached an internal service that signs wallet transactions. Source One tracking firm thinks they made Binance's systems sign instead of stealing keys. Source

    Where did the biggest losses in this list happen?

    • SHA-256 was broken None of these losses required breaking it.
    • In code, companies and keys around the chain The strong part of the design held. The weak parts are where people and programs touch it.
    • Large proof-of-work chains being rewritten That happened to smaller chains, at much smaller amounts.
  8. 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, since a sensor can break and a person can type anything. Source

    It also isn't anonymous, exactly. The chain holds no names, but its record is public, and real-world links come from outside it, like an address someone posted. Source It's not fully traceable either: mixers can make money harder to follow. Source

    And "nobody can change anything" has limits. After The DAO, a hard fork, a rule change that splits the chain, moved the funds to a recovery address. In the Binance theft, companies including Tether and Circle, which issue stablecoins (tokens meant to hold a steady value), froze billions in them. Source Binance says about $2.85 billion was frozen or intercepted. Source Bitcoin itself can't be frozen. 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. Tamper-evident doesn't mean true.
    • Ana owns the moon Ana will be glad to hear it. The chain has no way to check.
    • NASA has been informed It has not.
  9. The honest part

    How decentralized is it, and what is it good for?

    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 one. NIST calls "no one controls a blockchain" a misconception.

    It's also slow. Bitcoin confirms about 7 to 9 transactions a second, and Visa averages about 8,200. Source A US government flowchart in the same NIST report asks six questions. Answer no to any and it points elsewhere, usually to a database.

    Real uses are hard to measure. The World Food Programme reports using a chain to coordinate aid for 6.3 million households, by its own count. Source The European Central Bank launched a system in September 2026 linking blockchain-style platforms to its payment services. It's too new to show how much it will be used. Source About 80% of stablecoin transactions are by bots, 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 Bitcoin is far too slow for card-scale payments, and that US flowchart lists six things a project must need before a blockchain fits.
    • It's all a scam with no use Plenty of fraud has gone on around it, but the design does real work, and some institutions use it.
    • It makes records hard to change without being noticed, at a real cost, and that fits some jobs Specific, measured and a bit dull, which is usually a good sign.
  10. Step by step

    Your toy and the real thing

    So you don't walk away with a wrong picture, here's where the version you just mined differs from Bitcoin.

    • Your Block 2 updated its copy of Block 1's fingerprint for you. A real chain stores it, so the mismatch stays until someone repairs it.
    • Bitcoin hashes twice. Yours hashes once.
    • It hashes an 80-byte binary header. Yours hashes text.
    • It compares a number to a target. Yours counts zeros.
    • A real miner runs out of nonces and has to change something else too. Yours never does.

    The idea is the same. The scale isn't: compare your 3 zeros with 20.

  11. 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 (free, no account, runs in your browser). It uses no real money, no wallet and no blockchain network. The "points" 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
    1. Build. Mine a first block with data 'start' and prev '0', then add two "Ana pays Ben 5 points" blocks, using each block's hash as the next one's prev. valid(chain) should say (True, None).
    2. Lie well. Add a block saying "Ana owns the moon." Does it pass?
    3. Tamper. Change the data in the block at index 1. It should now say (False, 1).
    4. Cheat harder. Re-mine that block and everything after it in your own copy. What does valid say now? What does that tell you about one copy checking itself?
    5. Compare with a friend. Build an honest copy and compare the last hashes. That's why many copies matter.
    6. Feel the wait. Try difficulty 3, 4 and 5, and time them. Copy your code somewhere before you close the tab.

    First, you might like to see Anders Brownworth's demo, where a change turns the later blocks red.

  12. 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?

    Back to the Lab

    Sources
    1. AP via PBS, Oct. 31, 2026, and Yonhap via Korea Times, Nov. 1, 2026: the Binance theft and the FBI's attribution.
    2. 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.
    3. TRM Labs and Elliptic: tracking firms, both selling tracing services. Their totals and timelines differ, so we say "more than $6 billion."
    4. NIST FIPS 180-4: SHA-256. NIST IR 8202, 2018: blockchain overview, tamper evidence, the Oracle Problem and misconceptions.
    5. Bitcoin whitepaper and developer reference.
    6. The genesis block and block 974,452; mining pool data, read Nov. 3, 2026.
    7. ethereum.org: proof of stake, and its Merge page.
    8. Cambridge: Bitcoin electricity index, read Nov. 4, 2026, and Ethereum after the Merge.
    9. SEC on The DAO, the Terraform and FTX sentencing releases, the Mt. Gox notice (Japanese, with an English translation), and the FBI on Bybit.
    10. Bitcoin Wiki (a community source) on the 2010 bug, and MIT's monitor on smaller chains.
    11. IMF, 2025, on stablecoins (citing Visa's dashboard for the bot share); Visa's 10-K for its fiscal 2025 total; Blockchain.com for Bitcoin's rate; World Food Programme; the ECB on Pontes.

    The block format in the experiment is our own teaching design, not a standard. Totals for the Binance theft are still moving.

    Last checked . Torah Tech researched and wrote this lesson with the help of Claude, an AI made by Anthropic. Any mistakes are ours.

The Opportunity Year · Tel Aviv, Israel

Learn like this for a year

Torah Tech is a beit midrash in Tel Aviv built for personal and professional growth: Torah learning at the center of every day, and internships at Israeli startups. It is the year a future Jewish leader realizes who he can become, and chooses to become it.