It is generally advised that users should always change address often so as to reduce privacy risk, but what if such risks are still possible even when we follow this advise?. This question actually came to my mind earlier today, as I had to perform some drawings inorder to explain things to myself and also ask questions in the lower part of the post.
UTXO as we all know are like small amount of bitcoin in different portions that we can receive or spend via transaction. By spending UTXO, it is destroyed and created in another portion of amount. So the image I drew below was the best way I could interpret it to myself and to others.
Reference for a single wallet address
Reference to number 2 below
The first image is based on so many UTXOs in a single wallet address. This particular wallet address has received 3 separate transactions of 0.5
BTC, 1
BTC, and 3
BTC. Now, here is how UTXO can work on a single wallet address assuming we are to send 0.7
BTC to someone else:
1. Using a UTXO model, the UTXO 2 (1
BTC) is used in performing this transaction.
2. The entire 1
BTC is been spent as an input, while the two outputs are produced, which are 0.7
BTC to the recipient, and 0.2
BTC as change that goes back to same address (this can be found in the second image).
3. After performing the output calculation, we realize that it doesn't amount to the initial input (1
BTC) i.e 0.7+0.2 ≠ 1. well this is because the remaining 0.1
BTC is assumed as the tx fees, so 0.7+0.2+0.1 = 1.
It is important to note that when a transaction wants to be performed using a UTXO model, it uses
first in, first out pattern to choose a satisfactory UTXO. Which means for every address that contains multiple UTXO, the older UTXO are used (spent) for transactions before the new ones. Though, an UTXO can be skipped if it doesn't contain the neccessary input amount to be spent.
Simplifying my questions with a diagram and example Reference for multi addresses
The image above is slightly different from the first, as this one involves multiple address in a wallet. Here we have address 1, 2 and 3. Address 1 and 3 contains one UTXO each of 0.05
BTC and 0.9
BTC, while address 2 contains two UTXO of 0.003
BTC and 0.0014
BTC.
Assuming we were asked to send 0.8
BTC to someone using an
UTXO consolidation, it is ideal for all the UTXO in all addresses to combine their UTXOs into a single input before sending. Let's assume this input(0.9544
BTC) also produce two outputs of 0.1244
BTC(change) and 0.8
BTC(to recipient), with a tx fee of 0.03
BTC.
My Question:
1. Which address will the change(0.1244
BTC) be sent to ?.( Address 1,2 or 3) - I am not quite sure if the
first in, first out pattern would be used in this case.
2. Could this result to privacy risk since any of these addresses belonging to a single user can possibly get involve with a cex exchange ?.
3. Is there such thing as consolidation fee ?. If Yes, how is it different from tx fee ?.
I am 100% open to correction as I still see myself as a learner. Pardon any of my error and share your personal opinion. You might want to also DOYR after reading this.