Part 2 · Transactions & the UTXO Model
This part comes after Cryptography, because transactions are built from hashes and signatures.
Here’s the surprise that trips up most newcomers: in Bitcoin there are no account balances. There is no row that says “you own 2 BTC.” Instead there are UTXOs — discrete chunks of unspent coin, like physical bills in a wallet. This part makes that click.
Roadmap for this part
Section titled “Roadmap for this part”We build up from “what is a coin?” to the full machinery of how value is locked, unlocked, and minted, in dependency order:
- UTXO vs the Account Model — coins as discrete “unspent outputs,” not balances; why your “balance” is just the sum of UTXOs you can spend, and how this differs from Ethereum’s account model.
- Anatomy of a Transaction — version, inputs, outputs (in
satoshis), witness, and locktime; how inputs reference earlier outputs by
(txid, vout). - Fees, Change & the Conservation Rule — inputs ≥ outputs; the difference is the miner fee; why you need an explicit change output.
- Transaction IDs — double-SHA-256 of the serialized transaction; how
UTXOs are addressed by
(txid, index). - Locking & Unlocking —
scriptPubKey(the lock on an output) andscriptSig/ witness (the key that unlocks it); the challenge/response model. - Bitcoin Script — the stack-based, intentionally-not-Turing- complete language, and why that’s a safety choice; common opcodes.
- Standard Scripts & Address Types — P2PK, P2PKH, P2SH, P2WPKH (SegWit), P2TR (Taproot) — and what an “address” really encodes.
- Coinbase Transactions — the special transaction that creates new coins in each block.
Signatures in context — the SIGHASH flags that decide what part of a transaction a signature
commits to — get their own deep dive in SIGHASH flags.
The recurring question, applied here
Section titled “The recurring question, applied here”How does the UTXO model help untrusting strangers agree on one ledger? (Preview: UTXOs make double-spends trivial to detect — a coin is either still in the unspent set or it isn’t.)