Homework on Bitcoin Transactions and UTXO - Questions

  1. Describe what Unspent Transaction Outputs (UTXO) are.

Those are outputs from different transactions that are sent to your address.

  1. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?

Your wallet will construct a TX input out of multiple UTXOs.

  1. How would a bitcoin wallet specify the transaction fee when creating a transaction?

Input - Output = Fee. Fee is never directly specified and the wallet will adjust the Output based on best fee out there.

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

Using different inputs and outputs. It’s not that clear that are belongs to who.

1 Like

1.UTXOs are unspent outputs of the previous transactions.
2.The wallet could not execute the transaction.
3.Fee = inputs - outputs
4.Using different wallet(of your own)for UTXOs of your transaction.

1 Like
  1. basically UTXOs are the transactions you receive (inputs) and didn’t sent further away
  2. it will take more UTXOs to cover for the transaction you try to send.
  3. your inputs - your outputs = fees
  4. using more inputs and outputs, and more addresses too.
1 Like

You can use different addresses within the same wallet. :slight_smile:

2 Likes
  1. UTXOs are an amount of unspent digital currency after a transaction.
  2. You can’t spend what you don’t have… The transaction won’t happen, UNLESS… it can find another UTXO and combine them together to make the payment.
  3. The fee is calculated in the transaction (fee = input - output)
  4. transactions can be split up into multiple inputs/outputs, and even sent back to yourself.
1 Like
  1. UTXO’s are transactions your wallet is sending out, they will become inputs to the wallet you are sending too. UTXO’s are also a record of the balance your wallet has to spend

  2. The wallet will combine enough UTXO’s to be able to complete the transaction and then send you the difference back to your wallet as a new UTXO

3.The wallet will look at previous transaction fees and pick a fee that will get your transaction into the block quick enough.

  1. You could make a more complicated transaction by sending transactions to multiple outputs
1 Like
  1. Describe what Unspent Transaction Outputs (UTXO) are.

UTxO are the aggregate of unused inputs to an address owned by a specified private key. Each input becomes a UTxO. If an address spends that input it is no longer a UTxO but the new address will have the UTxO.

  1. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?

When you attempt to broadcast your transaction to nodes that run the blockchain protocol. It will get rejected as there will not have been sufficient inputs from wallets that you hold the private keys to.

  1. How would a bitcoin wallet specify the transaction fee when creating a transaction?

The fee is unspecified rather it is the difference between the inputs and outputs of the Tx. In technicality it will become an input itself to and address access by the rewarded miners private key

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

With an advanced understanding of each individual input to addresses you own you could reroute and separate funds into as many different sizes and wallets as desired. Allowing for purchase and receiving to be done separate while being pseudo-anonymous as it becomes more difficult to track but not impossible with an increase of inputs and outputs.

1 Like

1 Describe what Unspent Transaction Outputs (UTXO) are?

Part of a transaction that is left and unspent in a wallet.

2 What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?

It would be an invalid or declined transaction, as it needs to cover the transaction

3 How would a bitcoin wallet specify the transaction fee when creating a transaction?

Input - Output = Transaction Fee

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

Having multiple addresses which create anonymity when deciphering the transaction statement.

1 Like
  1. UTXO’s are transactions that have been broadcasted to an address but are yet to be broadcasted back to the network (spent).

  2. The transaction would be denied by nodes.

  3. By estimating the fee based on the climate of the blockchain. UTXO - Output = Fee.

  4. By sending transactions to a different wallet, still controlled by you. Or send the unspent portion of a transaction to a wallet not controlled by you.

1 Like
  1. Each Bitcoin address (private key) has UTXOs associated to it (as long as it has received funds in the past). The UTXOs of a Bitcoin address represent all the unspent transactions that had that address as the destination. Since these represent unspent Bitcoin that was sent to each address, they are essentially the amount of funds each address has to spend

  2. As long as the sum of some (or all) of your address’s UTXOs are enough to cover a desired transaction, they can be grouped together as inputs of that transaction and used to pay for it. If, however, the sum of all your UTXOs doesn’t equate to sufficient funds for the desired transaction, it cannot be made

  3. Bitcoin wallets query the Blockchain for information on what level of fees are being practiced by miners at the transaction time. They then suggest a fee that will maximize the chances of having the transaction validated by a miner in an acceptable time frame

  4. Since Inputs and Outputs of transactions are strings of characters that represent Bitcoin addresses, and not names or actual addresses, privacy is actually much greater than with other types of transactions, as long as the correspondence between Bitcoin addresses and the people behind them is not public

1 Like
  1. They are the balance in a wallet.
  2. You will not be able to transact.
  3. By recent transaction on the blockchain
  4. By creating new address with every transaction.
1 Like

You could just use a different address in the same wallet.

How would that benefit your privacy? Wouldn’t that just mean you spent your funds? :wink:

1 Like

Homework on Bitcoin Transactions and UTXO - Questions

  1. Describe what Unspent Transaction Outputs (UTXO) are.
    A UTXO is a transaction output that has not been used for an input of another transaction (or sent). The output amount is allocated on the blockchain to the public key that can be accessed using the private key in the wallet of the recipient the funds have been sent to.

By the wallet referencing the blockchain for all UTXO associated with the public key, then adding them up, a balance can be shown of available funds. Once the recipient uses the UTXO as an input for another transaction from their wallet, the UTXO changes status to an input for this transaction and is no longer a balance of that wallet.

Tx Input = Tx Output + Fee

  1. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?
    Multiple UTXO’s from previous transactions are used until the Tx Input is greater than the Tx Output + Fees so that the transaction can be fulfilled.

  2. How would a bitcoin wallet specify the transaction fee when creating a transaction?
    It doesn’t, it calculates the fee from the blockchain by using the sum of the Tx Ouputs of the transaction and subtracting them from the sum of the UTXO’s used for the Tx Input, with the remainder being the Fee.

Eg: Tx Input = Tx Output + Fee
If Transaction Fee is 0.5

Tx Input = (UTXO A = 2 + UTXO B = 3) = 5 total UTXO value

Tx Output = (C = 1 + D = 3 + E = 0.5) = 4.5 total Tx Output value

Therefore Fee = Tx Input - Tx Output = 5 - 4.5 = 0.5 total Fee for transaction

  1. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?
    By using multiple wallets, make multiple Tx Outputs to another wallet or wallets using different public keys, at the same time as a ‘real’ transaction and which a ‘transfer’ making it more difficult to understand which Tx Output and UTXO would be for example, for transferring some funds to your mate or payment of goods and which is to another of your wallets.
2 Likes

Hi HunterGatherer, just been reading through some answers after doing my homework and have seen your answer to 2…wanting to make sure I understand everything, so much to take in!

In your answer you say that the transaction would be rejected, am I right in thinking though that it would only be rejected if the blockchain only had access to that single UTXO which was not large enough?

If the wallet had access to multiple UTXO, then the way I understand it is that it will continue to use multiple available UTXO until a value greater than the Tx Output is achieved, all those UTXO’s would then be un-allocated from that wallet public key to be used in the Tx Input and then issued to the Tx Outputs + Fee and a UTXO assigned to the new public key(s)

Is that how you understand it too?

1 Like
  1. UTXOs are the outcome of a previous transaction. They are the outputs from them and now they are unspent and waiting to be spent by you to use as an input in a new transaction

  2. If you don’t have enough bitcoin from a single UTXO to cover your transaction, then your wallet will use another UTXO to make up the difference and then generate a new bitcoin address for you and send the change back. If you don’t have another UTXO to use then the transaction will be denied.

  3. By checking the blockchain, comparing recent transaction fees and deciding from that how much of a fee you need to spend in order to get your transaction into the blockchain reasonably fast

  4. You could send bitcoin that you’re not wanting to spend in a transaction to another bitcoin address that you own

Can you guys please check my answers? This concept kind of confused me a little bit. It seems very simple. I guess what I’m a little confused about is, do you have to spend all of your bitcoin in every transaction? Or do you only need to spend as many full UTXOs that it takes to cover the output and fees?

Another question I have is, do you need to spend a full UTXO? Like would it be possible to only spend a part of it?

And the last question is, does your wallet automatically send the change back to your same bitcoin address?

I hope these questions make sense. Thank all of you guys for the help. It is greatly appreciated!

1 Like

After rereading the question it seems I have made a mistake in my answer. In theory your answer seems to be how I understand it as well. I misunderstood the question and mistakenly answered about “if there weren’t enough value in total UTxOs.” Rather than a about the size of a single UTxO not being large enough.

The transaction should only be rejected given there weren’t a total of sufficent UTxO that can be used in the transaction as inputs. If multiple UTxO are available to a specific private key they will be used as necessary to cover the outputs of the Tx + fees. As Inputs have to be equal to outputs plus fees any remaining currency would become a new UTxO for the original party equal to the remaining value.

Thank you for bringing this mistake to my attention and allowing me a chance to correct myself.

1 Like

This would be sending Bitcoin to a cold wallet, this might not be as private if you ever withdrew to that address from an exchange where you did KYC.
One way to increase privacy and most wallets in fact do this for you already is to use a new address each time you receive a tx and when you receive change back. In case when you receive change back from a tx it is not possible to know which of the two outputs were used for paying to a merchant and what output was used to receive change.

You don’t have to spend all your bitcoin every time, you must only combine as many UTXOs as you need to cover a transaction.
But you must always spend the entire UTXO, the reason for this is immutability. In an UTXO model blockchain like Bitcoin UTXOs are stored in a block on blockchain, spending it means using it as an input to a new transaction, however if you would want to spend for example half of the UTXO, you would need to update the UTXO with a new balance in the block. This would break the immutability of the blockchain.

No, the wallet actually uses a separate set of keys for change addresses. You can best see this in a HD wallet that uses its own change level that is used to derive change addresses. This is not by default but was standardized in nip44. :slight_smile:

1 Like

Yes the second question is a bit ambiguous and I usually rate the homework based on the knowledge if the student understands the concept of UTXOs, then I usually predict he interpreted the question like you did and give them a pass :slight_smile:

2 Likes
  1. Describe what Unspent Transaction Outputs (UTXO) are.
    It’s the amount of BTC that a person have in their wallet calculated by the amount of btc previously received and spent.

  2. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?
    the transaction will be rejected.

  3. How would a bitcoin wallet specify the transaction fee when creating a transaction?
    it will be calculated subtracting the number of UTXO by the amount spent.

  4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?
    use different adress for receiving and sending BTC

1 Like

The sum of UTXOs gives you the amount on your wallet.

You can combine multiple UTXOs.

UTXOs become the inputs to a transaction and the fee is the difference between these new inputs and tx outputs.

You can’t send from a new address if there are no funds on it :wink:

2 Likes