Module 04 of 10

Bitcoin & the UTXO Model

Lessons

About This Module

Bitcoin is the first and most widely used blockchain, and its design is quite different from what many people expect. Instead of keeping an account balance for each user, Bitcoin tracks unspent transaction outputs, or UTXOs. Your balance is simply the total of the outputs that you are able to spend.

You'll start with how a transaction is built from inputs and outputs, and how each spend consumes old outputs and creates new ones. Then you'll work through practical examples, including change, fees and consolidation. The module finishes with Bitcoin Script, the locking and unlocking scripts that control who may spend an output, using Pay-to-PubKey-Hash (P2PKH) as the main example.

Once you understand the UTXO model, you'll be ready for the next module, Ethereum & the EVM, which uses a different approach based on accounts and a programmable virtual machine.

Lessons

4 videos
01

Inputs, Outputs and the UTXO Model

How a Bitcoin transaction spends earlier outputs as inputs and creates new outputs, and why Bitcoin tracks coins this way instead of keeping account balances.

02

UTXOs in Practice: Change, Fees and Consolidation

Worked examples of how a wallet picks UTXOs to spend, what happens to the change, and how the number and size of your UTXOs affect fees.

03

Bitcoin Script: Locking and Unlocking

An introduction to Bitcoin Script, the small stack-based language that puts a locking script on every output and requires an unlocking script to spend it.

04

How P2PKH Authorizes Spending

A closer look at Pay-to-PubKey-Hash, the standard script behind Bitcoin addresses, and how a signature and public key unlock an output.