pull down to refresh

Most people are unfamiliar with the way Bitcoin keeps track of your money, or your BTC coins.
Unlike other blockchains like Ethereum, Bitcoin does not create users, and does not give those users ownership of balances.
Instead it uses an innovative approach called the UTXO model. This model gives you some level of anonymity, since you can easily use a new address for every transaction, making it harder to be tracked. Unfortunately, nowadays with companies such as Chainalysis this is no longer enough, but it helps, do not re-use your addresses.
Here is a summary of how UTXO works. Unlike a traditional bank account with a running balance, Bitcoin tracks each "coin" as an UTXO. UTXO means Unspent Transaction Output and what it represents is the unspent output from a previous transaction that's available to be used as an input in a new transaction.
This means that every Bitcoin you hold is actually an UTXO.
Let's explain this with an easy example Bob holds 1 BTC and he wants to send Alice 0.5 BTC, she only has 0.01 BTC.
First, Bob has 1 BTC in his main address (as a single UTXO of 1 BTC) Alice has 0.01 BTC in her address (as a single UTXO of 0.01 BTC.)

Step 1: Creating the Transaction

When Bob wants to send 0.5 BTC to Alice, he needs to create a transaction. This transaction must reference existing UTXOs as inputs, create new UTXOs as outputs.
Bob's wallet software identifies his available UTXOs. In this case, he has one UTXO worth 1 BTC.

Step 2: Specifying Inputs

Bob's wallet adds his 1 BTC UTXO as the input to the transaction. This means he's "spending" his entire UTXO of 1 BTC.
In Bitcoin, you must always spend the entire UTXO - you can't partially spend it. This does not mean that you lose the change, it means that the address itself will be burned or gone after the transaction ends.

Step 3: Specifying Outputs

Since Bob wants to send 0.5 BTC to Alice, but his input is 1 BTC, the transaction needs two outputs:
Output 1: 0.5 BTC to Alice's address (the payment) Output 2: 0.499969 BTC back to Bob's address (the "change")
The remaining 0.000031 BTC difference is the transaction fee that goes to the Bitcoin miners in the network.

Step 4: Signing the Transaction

Bob's wallet creates his transaction and signs it with his private key. This signature proves that Bob, who controls the address where the 1 BTC UTXO is stored, authorizes this transaction.

Step 5: Broadcasting the Transaction

Bob's wallet broadcasts this signed transaction to the Bitcoin network. It propagates through nodes until it reaches miners.

Step 6: Transaction Confirmation

Miners include the transaction in a block and attempt to solve the proof-of-work puzzle. Once a block containing Bob's transaction is mined (approximately every 10 minutes), the transaction receives its first confirmation.

Step 7: UTXO Set is Updated

After confirmation, the Bitcoin network's UTXO set is updated:
  • Bob's original 1 BTC UTXO is marked as spent, it no longer exists, it is burned.
  • Two new UTXOs are created: a 0.5 BTC UTXO belonging to Alice's address, and a 0.499969 BTC UTXO belonging to Bob's address, yes his change.

Final State

  • Bob now has 0.499969 BTC as a new UTXO in his address.
  • Alice now has 0.51 BTC (her original 0.01 BTC UTXO plus the new 0.5 BTC UTXO)
  • The miners received 0.000031 BTC as payment for facilitating the transaction.

Additional Key Points About Bitcoin's UTXO Model

  • Complete Spending: Every UTXO must be spent, or burned completely in a transaction. Even when like on this example your balance had more than enough to pay the beneficiary of the transaction.
  • Multiple UTXO Inputs are Possible: If Bob didn't have a single UTXO large enough to pay, his wallet could combine multiple smaller UTXOs as inputs.
  • Bitcoin holders usually have multiple UTXOs per Address.
Bitcoin's UTXO model for commerce is unique and it resembles a lot what happens with cash when we use it to pay for goods and services.
Not a single fucking word about LN ?
reply
Add whatever is relevant.
reply