0

I have tx hash 5b03738ed2cc9c80e6a4dded10794ab28efca2671039764217d53c54f64a3f39 and it contains 11 outputs. I understand how UTXO works, but where I feel confused is how does the sending address know to create multiple outputs? Like are those receiving addresses all going to the same person? Why is there multiple addresses to begin with? Why not one for the transaction value and then another one for the "change"?

Can someone explain this to me as if I were 5 years old?

2 Answers 2

3

A transaction can have many outputs, hundreds.

Whoever creates that that transaction just has to know the address for each recipient.

Say you set up a business with a thousand employees and paid them in Bitcoin. When you enrol the new employee you could ask them for a Bitcoin address to receive their salary. Each month your payroll program would create one transaction that pays your employees.

Say you are a currency exchange and every day about 1000 customers use your exchange to convert dollars or euros into Bitcoin. At the end of each day you could create one transaction that pays all customers in one go using the payment addresses the customers provided when requesting the currency conversion.

One transaction with a thousand outputs is smaller and therefore cheaper in transaction fees than a thousand separate transactions.

1
  • Thanks man this makes a lot of sense now!! Jan 17 at 23:39
0

Many wallets present a sending interface as a single recipient address field and a single amount. The resulting transaction often has two outputs, though. One to pay the recipient and one to send the remainder of your funds back to your own wallet as a change output. However, transactions are not restricted to having one or two outputs. You may actually specify any number of outputs (until your transaction hits the weight limit).

Payment batching is especially useful for large enterprises like exchanges and online wallets. Instead of facilitating hundreds of single-payment transactions per day, they may create transactions at a regular cadence to issue all outstanding payments in a single transaction. One exchange I used to work with would for example build a single withdrawal transaction every 15 minutes, which then would pay 5–50 users at once. Another company, a very popular brokerage, even created a transaction every 30 seconds to facilitate some 10–30 payments.

The big advantage of batching payments is that they still only need one change output. If you pay 1000 users per day with single-payment transactions, you send back 1000 change outputs to your wallet that you will have to spend again later. If you send 100 transactions that each batch 10 payments, you only send back 100 change outputs to yourself. Additionally, you need to use at least 1000 inputs to create 1000 transactions, but perhaps most of your batching transactions can be funded with 1–4 inputs. Occasionally, you will even be able to find a few inputs that match the recipient amounts exactly and you will need no change output at all. Overall, batching payments can significantly reduce the cost of operating a large volume wallet, and simplify UTXO management.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.