Homework on Bitcoin Transactions and UTXO - Questions

No problem Roger, good to see you learning. I am glad I could help you out. Keep it up. :fire:

1 Like
  1. The sum of all the outputs refers to the total balance that is available and can be spent.

  2. The wallet will combine all the UTXOs and as long as the sum of all the inputs is greater than or equals to the outputs, the transaction can still proceed.

  3. If the total of the outputs is less than the total of inputs, it is a given that the difference between the inputs and outputs will equate to the transaction fee.

  4. Creating more outputs for a single input to increase privacy in transactions.

1 Like

Thanks for the comment Mauro, as I understand it…
The wallet bases the fee that it proposes to the minor on how easy it is to add the transaction to the block.

  1. The size of the transaction - large transaction size, larger fee
  2. Network conditions - if the network is slow, higher fee
  3. Some wallets suggest a fee and allow the user to choose.
1 Like

No problem. I will definitely reach out to you for the programming portion since I have no experience in that field.

1 Like

The more there are previous outputs , fee becomes higher? Wallet is checking how many outputs you had and from that calculating fee.

1 Like

The wallet must decide what fee to set. It needs to look into the blockchain in order to determine the most reasonable one. It does this by using the unit of measurement called “satoshi per byte”. This unit tells the miners, how much satoshi we are we willing to pay per byte of space that will be taken in a block. We use this unit of measurement because blocks are limited and space is very precious. :smiley:

1 Like
  1. UTXO’s are transactions that have been made to your Bitcoin wallet but has not yet been spent by you.
  2. It will find another UTXO to be added as input, and then a partion of the output will go back to you, or if you don’t have any other UTXO’s the transaction will be failed.
  3. By looking at recent transactions what the fee was. Searching what is a reasonably fee is so your transaction will be processed quickly enough but your fee will also not be enormous.
  4. By using as many inputs and outputs as you possibly can, also by using different addresses for each transaction you receive.
1 Like

That is true. Either a different large enough UTXO or a combination of them that will satisfy the amount that needs to be sent. :slight_smile:

1 Like

Its true that addresses do not contain an personal information, but you could always connect an identity to one. Let’s say you buy bitcoin using an exchange. The exchange now knows your public address and will assume you withdraw the funds to yourself. In order to confuse them, you would want to create a transaction with many outputs, as the exchange would no longer be able to identify which outputs you still own and which you don’t. :smiley:

1 Like

Overall very good answers. I especially liked the first answer. Couldn’t have worded it better myself. :fire: :fire:

We have no coins. @cryptocrom has a great answer for the first question. (Look Above) But don’t worry to much about it, its okay to think of it like coins. It makes it easier to understand. :smiley:

2 Likes

If you wanna learn more about this “black magic” :sweat_smile: feel free to check out this website: Satoshi per Byte

In short, the wallet does not care about the size of the transaction as we use a unit of measurement called “satoshi per byte”

If we have a transaction that is 20 bytes large with a satoshi per byte set to 4, we pay 4x20=80 satoshi
If we have a transaction that is 40 bytes large with a satoshi per byte set to 4, we pay 4x40=160 satoshi

Both of these transactions have the same priority as they pay the same amount of satoshi per space taken in a block. Block size matter, so that’s why we have that unit of measurement. Hope that helps out. :wink:

2 Likes

It does not necessarily have to be a hardware wallet. But most wallets do generate new addresses for each transaction or deposit. :smiley:

2 Likes

Ideally not one address. But multiple ones so that person tracking you wouldn’t know which ones you control anymore. :slight_smile:

2 Likes

Great points and answers. Keep it up. :slight_smile:

1 Like

Yes, more outputs means a larger transaction, which in the end means higher fees. Here is what the wallet does:

The wallet sets the fee using a measurement unit called “satoshi per byte”

Example:

If we have a transaction that is 20 bytes large with a satoshi per byte set to 4, we pay 4x20=80 satoshi
If we have a transaction that is 40 bytes large with a satoshi per byte set to 4, we pay 4x40=160 satoshi

Both of these transactions have the same priority as they pay the same amount of satoshi per space taken in a block. The second example still pays more since it has a larger transaction with the same satoshi per byte value. So the wallet sees the size of your transactions and sets the appropriate satoshi per byte value in order to get you transaction confirmed in a reasonable time. Hope that helps out. :wink:

2 Likes

Was this part covered in lecture?? I don’t remember it.

Debbie Fleetwood

1 Like

I don’t think so. Its just additional information that I think is very good to know. :smiley:

1 Like
  1. Unspent transactions are messages to the Bitcoin network, roughly in the format of: “Address X wants to send Y amount of BTC to Address Z. Here is the signature, proving this request is really coming from the owner.” These UTXOs are then verified (i.e. does the address have the funds to send, is the signature legit?) by the miners and ultimately written into the blockchain if valid, effectively transferring ownership of the involved BTC.

  2. The wallet will merge enough UTXOs that the address in question controls. From this merged amount it will send the necessary BTC to the receiver, set aside a fee to the miner and send the difference to itself (this might be a new address under its own control).

  3. It would check with the blockchain what size of fee is necessary at the moment (i.e. what everybody else is bidding) for the UTXO to be handled in a reasonable timeframe and then make a recommendation to the user.

  4. As wallets are able to create new and unique Bitcoin addresses without giving away who they are owned by, anybody can send themselves money to a new address (or even repeat this step multiple times, while splitting up the amounts). The end result could be a whole range of addresses controlling the same funds, being themselves controlled and owned by the same original owner, while it should be pretty much impossible to find this out. This means for ex. even if information would be leaked as in “account X holds Y BTC and is owned by person Z”, this person could simply transfer away the funds and it would be completely unclear who is owning them afterwards.

1 Like

Great answers! :muscle: :muscle:

1 Like

Oh good! Thought I’d missed something. And you’re right! Great info to know!

Thank you so very much

Debbie Fleetwood

1 Like