The Double spending problem is a particular problem where a user is allowed to spend twice a value.

Let’s say:

  • we send 100BTC to another account
    • usually our transaction needs to be confirmed before it occurs
  • let’s say we create another 100BTC transaction towards another account
  • both of these transactions need to be confirmed
  • once one of them is confirmed, the conflicting one will be discarded, because of the “longest chain first” policy

Therefore, double spending problem could be a real problem, only if we don’t have a strong consensus mechanism.

A similar problem, could theoretically be performed by the 51% attack.

  • an attacker has more than the half of the total mining power in the network
  • it creates a private fork in the BTC architecture
  • it creates two transactions:
    • one in the public (100btc to A)
    • one in the private (100btc to the original issuer)
  • since the attacker has more of 51% of power, he validates and creates blocks faster than the public
    • the public transaction is confirmed on public
    • the private transaction is confirmed on private fork
    • he puts his forked chain into the public network. This chain will be accepted by the network because of the “longest chain first” policy. The precedent transaction become invalid for this reason.
  • so the attacker has purchased something and had his BTCs back

Tags:#crypto#bitcoin#blockchain