r/askscience • • Jun 18 '13

Computing How is Bitcoin secure?

I guess my main concern is how they are impossible to counterfeit and double-spend. I guess I have trouble understanding it enough that I can't explain it to another person.

1.0k Upvotes

379 comments sorted by

View all comments

Show parent comment

1

u/leastfixedpoint Jun 18 '13

If you and someone else try to spend the same bitcoin twice (assuming you gave him your private key) then following might happen: Two different versions of the blockchain will emerge, people will begin mining new coins on both, there will be a 'race', one will get longer and eventually become adopted.

Who will decide which one will be adopted? Is there an unambiguous resolution algorithm? What if there is a wide-scale divergence?

2

u/Natanael_L Jun 18 '13

Who will decide which one will be adopted? Is there an unambiguous resolution algorithm? What if there is a wide-scale divergence?

The one with the most computing power behind it wins. Since you can make pretty accurate estimations of this thanks to how the proof-of-work system is engineered, this is a workable solution. Usually this means that the longer chain wins.

(Also, note that average double-spend attempts WON'T create a blockchain fork.)

1

u/speEdy5 Jun 18 '13

Nobody decides Absolutely not One chain will get longer eventually, people will notice and jump ship. It all comes down to the amount of computational power available in the system. The chain which has more computation dedicated to it will be longer and considered valid by people accepting coins for goods and services.

1

u/leastfixedpoint Jun 18 '13

Do you mean people will manually resolve the conflicts? Does all bitcoin software support this? What if I start spamming conflicts into network?

1

u/Natanael_L Jun 19 '13

It is done automatically, the blockchain with the most amount of computing power behind it wins. This can be estimated thanks to how Bitcoin uses proof-of-work.

1

u/speEdy5 Jun 19 '13

That's the thing about 'spamming conflicts.' The only way to do it is to solve the hard problem. The only way to solve the problem is computational power. In my opinion the brilliance of the system is that really the only way to seriously harm it is to compute more than the sum total of everyone else combined