Fees, Change & the Conservation Rule
There is one arithmetic rule at the heart of every Bitcoin transaction, and it is almost embarrassingly simple: the coins you consume must be worth at least as much as the coins you create. From that single inequality fall three of the most practical facts about using Bitcoin — where fees come from, why you almost always need a change output, and how the network prevents anyone from conjuring value out of thin air.
The conservation rule
Section titled “The conservation rule” sum(inputs) ≥ sum(outputs) └────────────┬───────────────┘ │ the difference is the FEE = sum(inputs) − sum(outputs)A transaction may never create more value than it consumes. If outputs exceeded inputs, the spender would be minting money — and every node rejects such a transaction outright. (The one exception is the coinbase transaction, where the protocol itself authorizes new issuance.) Conversely, any value in the inputs that you do not assign to an output is not refunded — it is implicitly claimed by whichever miner includes the transaction.
So the fee is never a field you fill in. It is a gap you leave: whatever the inputs total, minus whatever the outputs total. This is why a malformed wallet can accidentally pay a colossal fee — it simply left too big a gap.
Why change is (almost always) mandatory
Section titled “Why change is (almost always) mandatory”Recall from the UTXO model that inputs spend coins whole. You can’t peel off the exact amount you owe — you must consume entire UTXOs and then hand the remainder back to yourself as a fresh output. That self-paying output is the change output.
You owe 0.50 BTC. Your only coin is 0.80 BTC.
input : 0.80 BTC (consumed whole) │ ├── output → recipient : 0.50 BTC ├── output → YOURSELF : 0.2999 BTC ← the change └── (gap) : 0.0001 BTC ← the feeOmit that change output and you would be telling the network: “consume 0.80, create 0.50, and let the miner keep the other 0.30.” The transaction is perfectly valid — you’ve just tipped the miner 0.30 BTC. Change is not a courtesy the protocol provides; it is an output you must remember to add. Wallets do this automatically, which is why it feels invisible.
A worked numeric example
Section titled “A worked numeric example”Let’s do it in satoshis, the way a node does, to keep it exact.
| Item | Satoshis |
|---|---|
| Input #1 (UTXO A) | 70,000,000 |
| Input #2 (UTXO B) | 30,000,000 |
| Total inputs | 100,000,000 |
| Output → recipient | 60,000,000 |
| Output → change (you) | 39,750,000 |
| Total outputs | 99,750,000 |
| Fee (gap) | 250,000 |
Check: inputs (100,000,000) ≥ outputs (99,750,000) ✓. The miner fee is the leftover 250,000 sats = 0.0025 BTC. Notice the fee was never typed in — the wallet chose it by deciding how big to make the change output. Make the change 39,900,000 instead and the fee drops to 100,000 sats. Adjusting the fee just means adjusting your own change.
How much fee should you leave?
Section titled “How much fee should you leave?”Block space is finite (~4 million weight units per block, one block roughly every ten minutes), so transactions compete. The fee you leave is effectively a bid for inclusion, and it’s judged not in absolute terms but as a rate — satoshis per virtual byte (sat/vB) — because a big transaction takes more space than a small one. Miners, who can include whichever transactions they like, simply prefer the highest-paying ones per unit of space. This auction for limited block space is explored in the fee market.
The thread
Section titled “The thread”How does the conservation rule help untrusting strangers agree on one ledger? It makes inflation locally checkable by everyone. No node has to trust that “money wasn’t created” — each node independently sums the inputs, sums the outputs, and confirms the inequality holds. Combined with the rule that every referenced input must be a real, unspent UTXO, this guarantees that the total supply only ever grows by the exact, protocol-defined amount in coinbase transactions. The 21-million cap isn’t enforced by a central accountant; it’s enforced by millions of nodes each doing the same trivial subtraction and refusing anything that doesn’t add up. The fee, meanwhile, turns “please prioritize me” into an objective number anyone can read — strangers agree on ordering the same way they agree on validity: by arithmetic, not authority.
Check your understanding
Section titled “Check your understanding”- State the conservation rule, and explain where the fee “lives” in a transaction.
- Why is the fee never an explicit field? What practical danger does that create?
- Walk through why a change output is necessary, and what happens if you forget it.
- In the worked example, how would you reduce the fee from 250,000 to 150,000 sats?
- Why is fee measured as sat/vB rather than a flat amount, and what is the fee effectively bidding for?