This website uses cookies

Read our Privacy policy and Terms of use for more information.

How Bitcoin works

Lesson 3 of 6
By the end of this lesson you’ll be able to follow one bitcoin payment from the moment you press send to the moment it’s confirmed, and say what each part of the network did along the way. Crypto from Zero gave you the shape of a blockchain; this lesson shows what happens inside.
A collage of a giant blue parcel tied with string on a bare plain. Hundreds of tiny people in dark coats crowd around it, climb ladders against its sides and walk across its top, inspecting it.

Inputs, outputs and change

Your wallet shows a balance, but Bitcoin stores outputs: parcels of coin that earlier payments sent to your addresses, each one waiting to be spent. The developer documentation calls them unspent transaction outputs, or UTXOs: “Each output then waits as an Unspent Transaction Output (UTXO) until a later input spends it.”

An output is spent whole, like a banknote. Say your wallet holds two outputs, one of 0.03 bitcoin and one of 0.015, and you want to pay someone 0.04. Your wallet builds a transaction like this:

Two inputs of 0.03 and 0.015 bitcoin, each an old output spent in full, flow into one transaction. Two outputs come out: 0.04 to the person you're paying and 0.00495 back to you as change. A fee of 0.00005 peels off to the miner.
Your old outputs go in, spent in full. The person you’re paying and your change come out, and the miner takes what’s left.

Continue with The Crossover Pro

The rest of this story, plus two paid editions a week. $24.99 a month, or $249 a year. Already a member? Sign in above.

Subscribe to Pro