Homework on Bitcoin Transactions and UTXO - Questions

  1. UTXOs are all your available “funds” in the blockchain. Your wallet can query the blockchain for you UTXOs. So, if person A sends you 0.5 BTC and person B sends you 0.3 BTC, you have the sum of this as “fund” on blockchain, but it is more accurate that these are your UTXO-s (unspent transaction output).

  2. It is not a problem, as all of you UTXOs must be spent. So e.g. if you have 0.3 BTC and 0.5 BTC as your UTXOs, and you would like to buy something for 0.6 BTC, it is feasible as your sum is 0.8 BTC. You have to pay the fee as a plus and the rest will be sent back to your wallet (also as part of the transaction).

  3. Most of the wallets calculate it automatically, but in some wallets this can be set manually. Transactions with larger fees will be added to the blockchain faster, because the miners add transactions to the blockchain first with the highest fees. If a wallet calculating your fee automatically, it is the most reasonable fee (the most economic fee to add your transaction to the blockchain in a reasonable time). Fees of course calcualted as: fee =input amount of BTC - output amount of BTC

  4. As all your UTXOs enter in the created transaction (all your UTXOs have to be spent), you can diversify BTC amount in your output. So e.g. you have 0.5 BTC and 0.3 BTC as UTXOs. You can send this 0.8 BTC for e.g. 4 addresses, which belong to you. You can send around 0.2 BTC e.g. for all addresses plus the fee (of course you can diversify the amount you would like to send to your addresses). It is not known that these 4 addresses belong to you (means increased privacy). And after that you can spend your BTCs from these addresses.

1 Like
  1. It’s the balance in your wallet.
  2. Transaction would be declined due to insufficient funds.
  3. It would be the difference between inputs and outputs.
  4. You can by using multiple inputs and/or outputs to complicate the transaction and anyone trying to read it.
1 Like

You can join multiple UTXOs into one tx, but if the sum of all your UTXOs is not enough then the transaction would be invalid.

With a signature you only provide proof that you are the owner of the UTXOs and are allowed to spend them. To increase privacy you can use multiple addresses, preferably each time you receive funds :slight_smile:

1 Like

You can just use multiple addresses in the same wallet :wink:

1 Like

But what if those extra UTXOs are not enough? :slight_smile:

1 Like

Actually its just the incoming transactions that have not yet been spent or not used as an input to a new transaction. :slight_smile:

1 Like

That would mean you would need to spend sats for unnecessary txs. Though it would increase privacy I would personally just use a new address to receive the change once I send some funds to someone. Since it wouldn’t be clear what portion I sent to a merchant and what was the change sent back.
HD wallets in fact already do that for you, they have a set of change addresses reserved to be used. :slight_smile:

2 Likes

Many thanks for this info! :slight_smile: It’s great that you can do that!

Describe what Unspent Transaction Outputs (UTXO) are.
UTXOs are unspent outputs of the previous transaction. Basically UTXOs is the balance that we have in transactions registered on the blockchain. With yours private key we can make (sign) transaction of this UTXOs.

What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?
2 possible scenarios:
1.If the amount of several UTXOs is equal or greater than the value of the transactions(and fees), they can serve as input to the transaction (a transaction can have several inputs and several outputs).
2.If the amount of UTXOs is less than the value of transaction, it is not valid to mine and be included in the blockchain

How would a bitcoin wallet specify the transaction fee when creating a transaction?
In some cases we can choose the fee to pay. However, if we choose a low fee there is a risk that the transaction will not be mined (validated) or take too long.
In most cases a bitcoin wallet recommend a reasonable fee, bases on the current and previous transaction fees.

How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?
We can generate new addresses (controlled by our private key), and include them in transactions. In this case, it is hard to tell which output goes back to the sender.

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

The total of the received utxos is the wallet balance.

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

The transaction would not complete

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

Its the difference between the utxo input and output so input minus output=fee

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

you could do this by creating multiple transactions to different addresses you’ve generated.

1 Like

You could always combine multiple UTXOs. However, if the sum of all UTXOs is still not large enough, the transaction would be invalid.

Correct. Keep in mind that the wallet sets the fee in a unit of measurement called “satsohi per byte.” :slight_smile:

2 Likes
  1. UTXO refers to the incoming transactions that your wallet has received, that are still in the wallet.
  2. The transaction would be rejected by the blockchain
  3. consider the number of UTXOs and subtract the amount that was spent.
  4. use a variety of addresses
1 Like

UTXOs are not in the wallet but on the blockchain. Your wallet only has the keys to spend them :slight_smile:

1 Like

got it, thanks :slightly_smiling_face:

1 Like
  1. UTXO’s are the outputs of transactions that your wallet received. It can be seen as the sum amount of btc one’s wallet or private key can spend.
  2. If you do not have a UTXO that is large enough to cover a transaction, that transaction will be rejected.
  3. The transaction fee is the input-output. The transaction fees are created by the miners.
  4. There is no limit to how many inputs an individual can receive, and how many outputs an individual can make, with any number or addresses. One’s identity can not be tracked to an address or let alone multiple addresses.
1 Like
  1. Describe what Unspent Transaction Outputs (UTXO) are.
    UTXO is basically your balance or how many BTC you are holding within a wallet.

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

  3. How would a bitcoin wallet specify the transaction fee when creating a transaction? When a transaction is initiated all UTXOS are spent. The entire input is spent and the balance or the remaining UTXO will be sent back to your wallet, the difference will be the output (money spent) plus fees.

  4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?
    The public keys are displayed in hash format making it very difficult to see who are transacting.

1 Like

Ah, of course! Thanks!

  1. Describe what Unspent Transaction Outputs (UTXO) are.
    Outputs from other transcations which are yet to be spent.

  2. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction?
    Other UTXO’s will be added together until there is enough for your transaction. If this cannot be achieved then the transaction will be not be completed.

  3. How would a bitcoin wallet specify the transaction fee when creating a transaction?
    Input - Output = Tx Fee

  4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction?
    Send them to yourself - as the wallet system is completely anonoymus this ensures that no one can know exactly who received said UTXO.

1 Like
  1. Describe what Unspent Transaction Outputs (UTXO) are. - A UTXO is an output from another address. This transaction is a spent for the other address, but unspent for your address. Only the one with the private keys for your address can spend the relevant UTXO. This leads to several UTXOs per addresses and the sum of those is your total balance on your address. And when you send it as an input to a transaction, it becomes a spent transaction input for your adress.

  2. What would happen if you don’t have any single UTXO that is large enough to cover for your transaction? - You always need to spend your whole total balance (the sum of all your available UTXOs) on a transaction. You will then divide the amount and send the sum you want to send to the receiver and the rest is sent back to you

  3. How would a bitcoin wallet specify the transaction fee when creating a transaction? - You have to calculate it by «input-output=transaction fee»

  4. How could you use the notion of transaction inputs and outputs to increase privacy in your transaction? - on the block Explorer it will show all the inputs and outputs of an transaction. If you dont send your whole balance, one of These outputs will be sent to your adress as a UTXO. But you wont by just Looking at the transaction know who owns each outputdestinations. This increases privacy, But wont give you full privacy.

1 Like

You can set any fee you want, though it does depend on the miners if they will accept it or not :slight_smile:

What about in the case when you receive funds from an exchange where you did KYC? :wink:

2 Likes