uncovers the process of the implementation of micro-donations in Bytecoin transactions that have been introduced earlier in
We'll be glad to hear your comments and answer your questions.
.
Today's blog post is dedicated to the technical side of the implementation and will mainly cover the percentage of a transaction part of the update. During the setup process you can set maximum percentage of a transaction to be donated. On average, donation will be lower than the specified percentage. Why? Let's have a look into the how the donation part of the transaction is being constructed first.
Usual Bytecoin transaction construction process, in simplified terms, can be described as follows:
- Wallet receives transaction data: amount, mixin count (anonymity level), address(es) to send to.
- Wallet starts to create a transaction - it looks for several user's outputs that would cover the specified amount. These outputs then become transaction inputs.
- For each recipient wallet splits an amount into new outputs with power of 10 (for example 53800 is split into 50000, 3000 and 800) and for each new output generates a one-time key from the recipient's address and some random data. These pairs (new amount, one-time key) become transactions outputs.
- If sum of transaction inputs (see #2) exceeds the transaction amount, it creates a separate transfer (in the same transaction) to user's address to send a change.
- When the whole process is finished, wallet signs the transaction and sends it to the network.