The BSV Academy’s free introduction to Bitcoin Theory course covers the design of Bitcoin as a system as prescribed by Satoshi Nakamoto. This course is open to anyone who is interested in Bitcoin and is the beginner course in this series. Some technical experience would be helpful to complete the course, however, it is open to anyone regardless of experience.
The course goes through the Bitcoin white paper section by section elaborating on the concepts contained within each. This section focuses on the concept of combining and splitting value.
To make it as effortless as possible for you to have access to this educational material, we are publishing the entire course here on our blog. Stay tuned for a section-by-section release, and remember that you are still welcome to enrol in the BSV Academy to gain a certificate of completion to add to your resume.
Combining and splitting value in Bitcoin
Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs.
Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction's history.
Dynamically sized coins
Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer.
- Satoshi Nakamoto, Bitcoin white paper
Each time a bitcoin transaction takes place, one or more unspent transaction outputs are gathered into the transaction as inputs and spent into a new combination of outputs scripts. A Bitcoin transaction can handle as many or as few Satoshi tokens as are needed by the user and supported by network nodes.
Without this ability to merge and split outputs via a single transaction, the requirement to sign a new output for each satoshi in the transaction would make it economically unfeasible to manage the ledger. This approach gives the necessary balance required to manage bitcoins on the ledger without creating an undue burden through breaking down the outputs into arbitrarily sized pieces.
Bitcoin inputs and outputs
To allow value to be split and combined,transactions contain multiple inputs and outputs.
- Satoshi Nakamoto, Bitcoin white paper
To facilitate the aggregation of many small coins into one large payment, transactions support the capability to use multiple coins as inputs. This means that a user who’s wallet mainly receives micropayments can still use those small coins to make larger purchases without burdening the receiver. This same mechanism also allows for multiple users to participate in a transaction by separately signing an input or inputs into the transaction.
Similarly, on the output side, a single transaction can pay out to one or many separate output scripts, providing a means for users to pay multiple parties in a single transaction. For example, a merchant who receives goods on consignment can have their customer pay the manufacturer directly at the point of sale, while also paying their cut, sales tax and any municipal surcharges that might apply. In this scenario, all parties to the transaction receive their payments instantaneously, removing the burden of quarterly accounting from the merchant.
A typical example of Bitcoin inputs and outputs
Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.
- Satoshi Nakamoto, Bitcoin white paper
In a typical Bitcoin transaction being conducted between two peers, the sending party will take either a single large coin or several smaller coins and spend them into one or two outputs. A payment into one output would mean that the aggregate value of all coins (minus processing fees) would correspond to the exact amount the receiver was expecting for the transaction.
When a coin or combination of coins cannot be found in the user’s wallet that makes an exact value as requested for the payment, the wallet creates a second output which is paid to another address from within the user’s wallet. It sends the overflow amount which was over and above the required payment value back to the sending party as ‘change’. This money is spent back into a script that the wallet knows how to spend and is immediately received back into the wallet’s balance as spendable funds.
Fan-out
It should be noted that fan-out, where a transaction depends on several transactions, and those transactions depend on many more, is not a problem here. There is never the need to extract a complete standalone copy of a transaction's history.
- Satoshi Nakamoto, Bitcoin white paper
When a transaction is spending multiple inputs from multiple different transactions, the wallet does not necessarily need to know the full provenance of the input other than its transaction ID and index number. The network nodes perform the task of making sure that the inputs being spent do indeed come from valid transactions which have been or are in the process of being timestamped into a block, and that they have valid history leading back to their issuance. This removes the burden of chasing down a transaction’s history from the user.
The full history is only needed if a user wants to validate a coin's history for their own purposes outside of the needs of the network. This may be through an application layer requirement or simply curiosity, but it is not a fixed requirement of using the network.