Skip to main content
2 of 3
added 422 characters in body
Murch
  • 77.9k
  • 35
  • 190
  • 641

Outputs cannot be changed. They can only be created and spent. Since it is unlikely that you'll have the exact matching amount available when sending funds to a recipient, most transactions therefore need to send back change to the sender.
This ties into how transaction fees work: Miners can collect the difference between the input value and the output value as transaction fees. Thus, any funds not explicitly sent back to the sender become transaction fees.

Outputs are explicitly created by transactions and can then be uniquely tracked by means of their outpoint. The outpoint consists of txid:vout, i.e. the transaction hash of the transaction that created an output, concatenated by a colon with the position of the output in that transaction's output list.
Tracking outputs explicitly mitigates replay attacks, makes it possible for transactions to confirm in various orders, allows updating of transactions, facilitates chaining transactions explicitly to each other (e.g. used for Lightning Network), and supports use of many addresses for better privacy. The main disadvantages of the UTXO-based design are that it is somewhat counter-intuitive compared to account-based designs, and that it requires more data to identify the spent funds.

Murch
  • 77.9k
  • 35
  • 190
  • 641