Follow inputs, outputs and change
By the end, explain the diagram in your own words, solve the case and justify the correction.
Prerequisites : What is a blockchain?
Level 1 · Beginner →Reading path · 3 / 12 · Beginner
Bitcoin consumes entire outputs and creates new outputs for payment and change.
The essentials
Bitcoin records unspent transaction outputs, or UTXOs. A wallet balance is the sum of outputs it can spend. A transaction consumes selected outputs completely and creates new ones, each with its own spending conditions. There is no account balance that the network simply subtracts from.
How it works
If you control a 0.10 BTC output and send 0.03 BTC with a 0.0001 BTC fee, you can create a 0.03 BTC recipient output and a 0.0699 BTC change output. Inputs minus outputs equal the fee. These are illustrative amounts, not a live fee estimate.
What to watch
Combining many small outputs typically increases transaction size and cost. Input selection also affects privacy because joint spending can suggest common ownership. UTXOs represent values locked by conditions, not serial-numbered coins. Before consolidating outputs, consider both the current fee environment and which spending relationships become visible.
Understand the details
A Bitcoin wallet balance is a sum of spendable outputs. A transaction consumes complete outputs and creates new ones. It cannot partially retain an input. Change therefore becomes a new output, usually to an address controlled by the same wallet. The fee is the difference between total inputs and total outputs; it is not a separate output addressed to a miner.
Boundaries and common mistakes
Coin selection affects transaction size and privacy. Combining several inputs can reveal that they are likely controlled together. Receiving many tiny outputs can make a future payment expensive. An address is not a permanent account balance, and a wallet may display many addresses while managing one recovery backup.
The mechanism at a glance
70,000 and 40,000 satoshis enter one transaction, creating 80,000 payment and 28,000 change. The 2,000 difference is the fee, not another output.
- Inputs: 110,000 sat
- Consume both outputs
- Payment 80,000 + change 28,000
- Difference: fee 2,000
Apply the lesson to a case
Use fictional inputs of 70,000 and 40,000 satoshis. Pay 80,000 satoshis and allocate 2,000 to fees. Create a table with inputs on one side and payment, change and fee on the other. Every satoshi must be accounted for.
Change is 28,000 satoshis. Both original outputs are fully spent. The payment and change are new outputs. Check 110,000 = 80,000 + 28,000 + 2,000. If the wallet omitted the change output, the difference would become a much larger fee rather than remain in the old inputs.
Introduction to Bitcoin
Andreas M. Antonopoulos · 2016
While watching, distinguish the payment network from a company that offers access to it. This historical introduction complements the transaction accounting above.
Loading connects to YouTube. No video is loaded before your click. The written lesson is sufficient without watching. Publisher page and alternative access ↗
Follow a Bitcoin transaction
Wallet
Select available UTXOs, recipient, change and a fee. This simulation never connects to a wallet.
Build a payment in satoshis
Suppose a wallet selects two outputs: 60,000 and 50,000 satoshis. The total input is 110,000 satoshis. To pay 80,000 satoshis with a fee of 1,000, it creates an 80,000-satoshi recipient output and a 29,000-satoshi change output. Check the equation: 110,000 = 80,000 + 29,000 + 1,000.
The original outputs are consumed completely, including the one that was larger than the payment. The change is a new output controlled by the wallet. A transaction does not contain a separate fee output to the miner: the input-output difference determines the fee. Additional inputs and more complex spending conditions can affect transaction size and therefore the fee needed at a given fee rate.
Check your understanding
48,000 satoshis: 150,000 − 100,000 − 2,000.
Terms in this lesson
- UTXO
- An unspent transaction output: a value with conditions that must be satisfied to spend it.
Prepare a correction note
Describe the passage and the proposed correction. This creates a local note for you to share; it sends nothing. Do not include personal or confidential information.