Homework on Bitcoin Transactions and UTXO - Questions

  1. Describe what Unspent Transaction Outputs (UTXO) are.
    Are what is left over in a transaction. Inputs = outputs + fees. Unspent UTXO are the remaining balance left over after fees and your non-private key outputs.
  2. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction? The transaction request would be denied by the blockchain
  3. How would a bitcoin wallet specify the transaction fee when creating a transaction? Depending on the wallet it may give you the option of choosing which fee you would use or your transaction would be chosen by miners. Miners will seek out the most attractive (highest fee’s first) fee.
  4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction? By using the same sending and receiving addresses a pattern could be detected by an auditor. Therefore using different sending and receiving addresses for each send and receive would make it impossible to track unless the auditor had your private key.
1 Like
  1. UTXO’s are the unspent outputs of inputs to prior transactions. Kind of a “whats left over”.

  2. The wallet would have to determine if you have another UTXO to pull in to cover the total cost of the transaction.

  3. Seems like the if there are no transactions in the blockchain to reference (new transaction), the wallet will take the difference between the input and output and derive a fair fee. Otherwise, the wallet will reference prior fees for the blockchain and derive a fee from that.

  4. By utilizing multiple addresses that you own, and basically creating transactions where you are the input, and one or several of the output addresses belong to you too.

1 Like

No worries. I am here to help everyone out. Keep up the great work. :muscle:

1 Like

That’s it. Great job. :slight_smile:

Exactly. If there was only 1 UTXO your answer would be right. Its a bit of a tricky question to be honest. But it seems like you understand it very well now. :smiley:

1 Like

Spot on. Great example with the real world “cash”. Keep up the great work. :muscle:

Unspent transaction outputs (UTXOs) are the bitcoin which you have recieved from previous transactions and are able to spend. If you do not have a single UTXO able to cover a transaction then your wallet will simply combine other UTXOs, similar to how you would pay for something which is $10 with two $5 notes. Your bitcoin wallet then specifies the transaction fees by seeing what the going rate is for transaction fees and applying it to the transaction. Inputs = Outputs + Transaction Fees, you can also set this manually. You could increase the outputs in your transaction to obfuscate your identity in a transaction. You can simply output to multiple addresses which you control.

1 Like

Note: You can combine multiple smaller UTXOs.

Exactly. Once a wallet sets the fee, we can use a formula to calculate the total fee that has been paid. It has something to do with the inputs and outputs. Can you find what formula it is?

  1. UTXOs are funds which you have received and are available to spend. You must spend the entire UTXO, but you can send money back to yourself.

  2. If you don’t have a single UTXO that is large enough to cover your transaction then you will need to input multiple UTXOs into the transaction. You can then send the remaining funds back to yourself.

  3. A bitcoin wallet specifies the transaction fee by subtracting the output from the input. The difference is the transaction fee.

  4. The notion of transaction inputs and outputs can be used to increase transaction security because the input can be sent to multiple outputs. This means that it is not clear who is the intended recipient because one or more of the output addresses “may or may not” belong to you.

1 Like

UTXOs are the money that I sent to someone that hasn’t been spent by them and has been stored in their wallet.

It dose not matter if you don’t have any single UTXO to cover the transaction as long as you have enough total UTXOs to cover the transaction.

The bitcoin wallet would transaction fee by checking the previous transactions.

  1. UTXOs are transations that exists in blockchain and haven’t been spent by a wallet user

  2. A single UTXOs Transaction will be rejected but is possible to use several UTXOs with less amount combined to check if it covers the output transaction

  3. With some wallets is possible to select the fee, but normally the network determines the fee. In order words, the fee is calculated based on the acceptance of transaction in blockchain in reasonable time ( Input = Ouput + Fee)

  4. By sending to multiple address from your wallet, and sending to yourself on a new address from every receiving transaction, it will be more difficult to track wallet transactions (all transactions are stored and visible in blockchain)

1 Like

Exactly. Once the wallet has set the fee we can see it as a difference between the total input - the total output = fee. The wallet sets the fee using the unit of measurement we call “satoshi per byte”. :smiley:

What about the fourth question?

4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?

If you do need any help feel free to say so. I will help you answer it. :smiley:

Hi there!!

What if I have 2 UTXOs of 1 BTC each, and I wish to send 1.5 BTC to a friend (and none of my UTXOs have 1.5BTC) ?

Although wallets can fetch this data, I was looking more for an answer that related outpus and inputs to the fee value…

Great work Alex! What about the relationship between inputs, outputs and fees in a transaction?

Hi there! True, but the UTXO can also come from funds sent to you by other people, not only the left overs… :smile:

Felipe.

If I’ve correctly understood then in any transaction the output total must be equal to the sum of the inputs plus the fees and UTXO’s must be used in full - so when sending a transaction your wallet constructs this by querying the blockchain to see what UTXOs are available to you, these must be used in whole (even where they exceed the transaction amount plus fees) and a fee is assigned based on previous queries (the miners scan the mempool for the most profitable transactions). Where specific UTXOs are used and the sum total exceeds the required transaction amount (including fee), the difference is then returned to your wallet as “change” (as if you have sent it back to yourself).

I may have missed something ? :slight_smile: please let me know if so :+1:t3:

1 Like

Basically, inputs = outpus + fees. And yes, if you have a UTXO of 1 BTC and you wish to send 0.5 BTC to a friend and pay 0.1 BTC as fee to miner (high, but just for the example), then you will have:

  • 1 BTC UTXO
  • 0.5 BTC sent to your friend
  • 0.4 BTC sent back to your address (change)
  • Miner gets 0.1 BTC

Does this makes sense?

Felipe.

1 Like

Thanks Felipe , yes that makes perfect sense. I understood this while watching the video - however (when relying on memory) my formula had the input and output the opposite way. Thank you for the correction, appreciated. :+1:t3:

2 Likes
  1. UTXO is a long string of letters and numbers that represents an amount of bitcoin that exist from your previous transactions.

  2. If you don’t have a large enough UTXO in your wallet to cover a transaction then numerous UTXOs will be combined until the transaction is covered. This will increase the transaction fee because it uses more space in a block.

  3. A wallet determines the fee amount by who much space a transaction uses. For example. You can have a low fee if your transaction can be covered by 1 UTXO. Once it takes more than 1 UTXO then the fee raises. The amount of the transaction doesn’t play a roll.

  4. You can use the notion to use security through input and output by having a transaction with numerous output addresses including your own that you can send part of the transaction back to.

1 Like