How does Bitcoin transaction batching work exactly? How does this end up looking compared to a regular block of a bunch of transactions? Also, I have read people claim batching causes weaker privacy, how is this exactly?
1 Answer
How does Bitcoin transaction batching work exactly?
Instead of paying multiple people using a new transaction for each person, you make one transaction that pays those multiple people.
For example, suppose you need to pay 3 people. Instead of making 3 different transactions with one output each, you make one transaction with 3 outputs to the 3 people you are paying.
How does this end up looking compared to a regular block of a bunch of transactions?
It is cheaper partially because each transaction has a fixed amount of overhead. By batching transactions, you only have to pay for the overhead once, not multiple times. Furthermore, usually each transaction will have a change output, and many times that change output must be spent again in the next transaction. This means that if you are sending to 3 people, you are creating 3 change outputs, and 2 inputs that have to spend from a change output. By batching, you only need to make one change output and you don't need to have those 2 additional inputs that spend the change. Those effectively cancel out and are thus removed from the transaction.
In a normal case with paying 3 people:
Input 1 -> Person 1
-> Change 1 -> Spend Change 1 -> Person 2
-> Change 2 -> Spend Change 2 -> Person 3
-> Change 3
By batching:
Input 1 -> Person 1
-> Person 2
-> Person 3
-> Change 3
So you have cut out Change 1 and 2, and Spend Change 1 and 2 which means you are paying less transaction fees.
Also, I have read people claim batching causes weaker privacy, how is this exactly?
All of the people being paid in a batched transaction can see who else you are paying and how much. However it is hard for observers to also know the true identities of those people.