1

I know, that a user cannot create a fork in the chain.

Also, it is said, that since every transaction is publicly announced, any attempt of double-spend on the same chain would be rejected as the network would know that these bitcoins have been spent previously in the chain. But how would the network determine, that these bitcoins have been spent previously because, the identity of payer and payee is not known? Only the newly created addresses are known at time of spending which can be later changed during double-spend.

For example, if Alice sends 10 BTC to Bob using 0000ab578c4 as her address and this forms part of 50th block in block chain. Now again she spents 10 BTC to Bob using another address 004325bda in the 67th block of same chain, how would the network determine that this is a double spend? (No one knows to whom 004325bda belongs).

1
  • 1
    If she has 10 BTC in two separate addresses than she has 20 BTC in total and therefore can send 10 BTC twice to Bob. Commented May 13, 2015 at 5:50

1 Answer 1

2

Transactions create Unspent Transaction Outputs . UTXO are uniquely identifiable. UTXO are indivisible, they are destroyed completely, when money is spent from them. (Which is why you need to send change back to yourself.) Naturally, this also means that you cannot chose what address you send money from, in fact the "sending address" only exists implicitly by being the address that received the funding payment.

So, putting all this together, whenever someone tries to spend money, the network's nodes check if the corresponding UTXO are available to be spent, i.e. listed in the set of UTXO.

If somebody tried to spend money twice, the UTXO would have been consumed by the first transaction already, and would therefore no longer be listed in the set of UTXO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.