Bitcoin Forum
October 28, 2020, 03:24:45 AM *
News: Latest Bitcoin Core release: 0.20.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is Double-spending issue?  (Read 233 times)
Sonu_titu
Member
**
Offline Offline

Activity: 137
Merit: 39


View Profile
May 04, 2019, 07:44:47 AM
Merited by o_e_l_e_o (1)
 #1

I read that the double spent issue is when you transfer funds and the funds remain with you and are also received by the recipient. If this happens then the number are BTC can not be 21 million it will exceed right?

It was also mentioned that it is due to 51% attack. Who does the 51% attack? Is it hackers?

I have read in this link:
https://en.wikipedia.org/wiki/Double-spending

The link and other articles I read are having too may technical terms. Can anyone please explain as if you are explaining to a layman.

Thanks in advance.

1603855485
Hero Member
*
Offline Offline

Posts: 1603855485

View Profile Personal Message (Offline)

Ignore
1603855485
Reply with quote  #2

1603855485
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1603855485
Hero Member
*
Offline Offline

Posts: 1603855485

View Profile Personal Message (Offline)

Ignore
1603855485
Reply with quote  #2

1603855485
Report to moderator
1603855485
Hero Member
*
Offline Offline

Posts: 1603855485

View Profile Personal Message (Offline)

Ignore
1603855485
Reply with quote  #2

1603855485
Report to moderator
1603855485
Hero Member
*
Offline Offline

Posts: 1603855485

View Profile Personal Message (Offline)

Ignore
1603855485
Reply with quote  #2

1603855485
Report to moderator
CryptopreneurBrainboss
Legendary
*
Offline Offline

Activity: 966
Merit: 1556


Add your voice to #EndSARs brutality in NIGERIA.


View Profile WWW
May 04, 2019, 09:16:37 AM
 #2

If this happens then the number are BTC can not be 21 million it will exceed right?

Nope bitcoin will always have a total supply of estimated 21 million coins. Double spending in bitcoin is more of using bitcoin more than once e.g use bitcoin in paying for a goods in shop A and reused that same bitcoin to pay for anyother goods in shop B or send back to yourself due to merchant accepting 0 confirmation transactions. Double spending just means spending a coin twice and this doesn't increase coins supply.

Quote from: Sonu_titu
It was also mentioned that it is due to 51% attack. Who does the 51% attack? Is it hackers?

Nope, A 51% attack is done by miners and not hackers also for a miner or group of miners to carry-out this attack successfully they must have control over more than 50% of the blockchain network mining hashrate.





.
.




░██████████████████░
████████████████████
█████████▀░░░███████
█████████░░▄████████
███████▀▀░░▀▀███████
███████▄▄░░▄▄███████
█████████░░█████████

█████████░░█████████

█████████▄▄█████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████▀▀▀█▀███
███░▀█████▀░░░░░▀███
███▌░░░▀▀▀░░░░░░████
████▄░░░░░░░░░░░████
█████▀░░░░░░░░░█████

██████▄░░░░░▄▄██████

█████▄▄▄▄███████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████████████
███████████▀▀░░▐████
███████▀▀░░░░░█████
████▀░░░▄█▀░░░▐█████
█████▄▄█▀░░░░░██████

███████▌▄▄▄▐██████

████████████████████

████████████████████

░██████████████████░
Bitcoin_Arena
Copper Member
Hero Member
*****
Offline Offline

Activity: 742
Merit: 564


฿itcoin for all, All for ฿itcoin.


View Profile
May 04, 2019, 09:22:58 AM
Last edit: May 04, 2019, 09:34:07 AM by Bitcoin_Arena
 #3

In simple terms a double spend attack can happen if someone has more than 51% of the network's mining power.

Let's say you are selling goods online for BTC, The attacker will send you the BTC and after confirmations, you send them the goods, This can all be done while the attacker has another chain on standby where he has not yet sent out any BTC. After receiving the goods, the attacker can decide to release the other chain that has been on standby and since he has more hash power than the rest of the network, the network switches to the newer alternate chain.
This implies that the original transaction will disappear from the network and so will the BTC sent to you whilst the attacker will have got the goods from you.

With this the attacker can
- Block confirmations from taking place
- Reverse transactions

Please note that this kind of attack is currently very expensive and close to impossible to implement on the bitcoin network. I was just using BTC as an example in the explanation.

I would love you to read this small explanation too to grasp the whole concept

Quote
How A 51% Attack Occurs
Whenever a transaction is carried’ out on a blockchain, be it by Bitcoin or any other cryptocurrency, it is usually put in a pool of unconfirmed transactions. Miners in return are allowed to select transactions from the pool to form a block of transactions.

For a transaction to be added into a blockchain, a miner must find a correct answer to a puzzle. Miners find solutions to complex mathematical puzzles by using computational power. The higher the computational power a miner has, the likelihood of him finding the correct answer to be allowed to add a block to a blockchain.

A correct answer to a puzzle has to be broadcasted’ to other miners and can only be accepted if all transactions in a block are valid according to the existing record on a blockchain. Corrupt miners, on the other hand, don’t broadcast solutions to the rest of the network.

What this practice does is that it always results in the formation of two versions of a blockchain. One, which is the original blockchain followed by legitimate miners and a second block chain used entirely by a corrupt miner who is not broadcasting results of a puzzle to the original network.

A corrupt miner will most of the time continue to work on his own version of the blockchain, which in this case is not broadcasted to the rest of the network. With the second blockchain now isolated from the network, the corrupt miner can spend his or her bitcoins on the truthful version of the blockchain, the one that all the miners are following.
Source: https://www.fxempire.com/education/article/51-attack-explained-the-attack-on-a-blockchain-513887





.
.




░██████████████████░
████████████████████
█████████▀░░░███████
█████████░░▄████████
███████▀▀░░▀▀███████
███████▄▄░░▄▄███████
█████████░░█████████

█████████░░█████████

█████████▄▄█████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████▀▀▀█▀███
███░▀█████▀░░░░░▀███
███▌░░░▀▀▀░░░░░░████
████▄░░░░░░░░░░░████
█████▀░░░░░░░░░█████

██████▄░░░░░▄▄██████

█████▄▄▄▄███████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████████████
███████████▀▀░░▐████
███████▀▀░░░░░█████
████▀░░░▄█▀░░░▐█████
█████▄▄█▀░░░░░██████

███████▌▄▄▄▐██████

████████████████████

████████████████████

░██████████████████░
Sonu_titu
Member
**
Offline Offline

Activity: 137
Merit: 39


View Profile
May 04, 2019, 09:54:37 AM
 #4

Thanks. Have started to read and explore more. Just came across the double spent term, googled it, got confused. I think I asked in the right platform my query is resolved.

thanks again.

o_e_l_e_o
Legendary
*
Offline Offline

Activity: 1092
Merit: 5117


Wear a mask, slow the spread


View Profile
May 04, 2019, 10:50:24 AM
Merited by Bitcoin_Arena (1)
 #5

In simple terms a double spend attack can happen if someone has more than 51% of the network's mining power.
A double spend attack can happen with much less than 51% of the hashrate. This is explained in more detail in Section 11 of the Bitcoin Whitepaper: https://bitcoin.org/bitcoin.pdf.

You can use this site (https://people.xiph.org/~greg/attack_success.html) to enter some numbers and see the resulting outcomes for yourself. Starting from only 1 block behind, having 24% of the hashrate still gives you a 50% chance of catching up to the main chain. If you start from 6 blocks behind, you need 40% of the hashrate for a 50% chance. Having 51% of the hashrate just means you have a 100% chance of beating the main chain (excluding external factors such as your rig losing power).

If you needed 51% of the hashrate to reject an already mined block, then stale blocks wouldn't exist. Anything that was accepted at 1 confirmation but was part of a stale block could have been double spent.

Bitcoin_Arena
Copper Member
Hero Member
*****
Offline Offline

Activity: 742
Merit: 564


฿itcoin for all, All for ฿itcoin.


View Profile
May 04, 2019, 04:07:46 PM
 #6

In simple terms a double spend attack can happen if someone has more than 51% of the network's mining power.
A double spend attack can happen with much less than 51% of the hashrate. This is explained in more detail in Section 11 of the Bitcoin Whitepaper: https://bitcoin.org/bitcoin.pdf.
Thank you o_e_l_e_o for that very vital addition and explanation.
I apologize for looking at only one scenario  Wink





.
.




░██████████████████░
████████████████████
█████████▀░░░███████
█████████░░▄████████
███████▀▀░░▀▀███████
███████▄▄░░▄▄███████
█████████░░█████████

█████████░░█████████

█████████▄▄█████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████▀▀▀█▀███
███░▀█████▀░░░░░▀███
███▌░░░▀▀▀░░░░░░████
████▄░░░░░░░░░░░████
█████▀░░░░░░░░░█████

██████▄░░░░░▄▄██████

█████▄▄▄▄███████████

████████████████████

░██████████████████░
░██████████████████░
████████████████████
████████████████████
███████████▀▀░░▐████
███████▀▀░░░░░█████
████▀░░░▄█▀░░░▐█████
█████▄▄█▀░░░░░██████

███████▌▄▄▄▐██████

████████████████████

████████████████████

░██████████████████░
r1s2g3
Sr. Member
****
Offline Offline

Activity: 728
Merit: 392


I am alive but in hibernation.


View Profile
May 04, 2019, 05:10:12 PM
Last edit: May 05, 2019, 12:28:49 PM by r1s2g3
 #7

I read that the double spent issue is when you transfer funds and the funds remain with you and are also received by the recipient.

Your above conclusion is wrong that in double spend that fund remains with you and with the recipient. Actually double spend means that you are trying to spend the same fund twice and in the end fund will be with only one of the party .(usually it is sender.)

51% attack is totally different than double spend. Every transaction had ledger entry in blockchain. This entry is done with the consensus of the participating nodes. In 51% attack dishonest node get the majority stake (more than 51 %) and they can start writing their own transaction entry, wiping the earlier valid entries and creating the new entries. So 51% attack corrupts the ledger in layman terms.

Edit: striked after below discussion.

I am alive
o_e_l_e_o
Legendary
*
Offline Offline

Activity: 1092
Merit: 5117


Wear a mask, slow the spread


View Profile
May 04, 2019, 07:22:18 PM
 #8

So 51% attack corrupts the ledger in layman terms.
A think that's a bit too hyperbolic. A 51% attack does not let an attacker steal other people's coins, reverse other people's transactions, create new coins, or anything along those lines. A 51% attack only allows the attacker to double spend their own recently sent coins. In the words of Satoshi, a 51% attack "does not throw the system open to arbitrary changes". While a double spend is obviously far from desirable for the receiving party who will end up being out of pocket, I wouldn't say it "corrupts the ledger".

r1s2g3
Sr. Member
****
Offline Offline

Activity: 728
Merit: 392


I am alive but in hibernation.


View Profile
May 05, 2019, 04:20:04 AM
 #9

So 51% attack corrupts the ledger in layman terms.
A think that's a bit too hyperbolic. A 51% attack does not let an attacker steal other people's coins, reverse other people's transactions, create new coins, or anything along those lines. A 51% attack only allows the attacker to double spend their own recently sent coins. In the words of Satoshi, a 51% attack "does not throw the system open to arbitrary changes". While a double spend is obviously far from desirable for the receiving party who will end up being out of pocket, I wouldn't say it "corrupts the ledger".

From bitcoin whitpaper
Quote
p = probability an honest node finds the next block
q = probability the attacker finds the next block
qz = probability the attacker will ever catch up from z blocks behind
qz={1 if p≤q
        (q/p)z if p>q}

I interpreted it as  if attacker is say 2 block behind and start writing its own transaction for creating new block and once it able to extend it lead then attacker chain will be published as a valid chain. Is I am misinterpreting the things?
If blockchain can not be altered at all then why we say it general practice to wait for 6 confirmation for large transaction? (becauuse if in 1 confirmation if money reached to your wallet is final then why we say 6.)

I am alive
TheHas
Full Member
***
Offline Offline

Activity: 616
Merit: 167


View Profile
May 05, 2019, 06:45:11 AM
 #10

The details provided above are a good explanation. I'm guessing you heard of 51% attacks mainly from exchanges losing money?

You'll notice that many exchanges require X number of confirmations before allowing a withdrawal. This is to help mitigate someone double spending or taking out large sums if there is a second chain being 'generated'.
o_e_l_e_o
Legendary
*
Offline Offline

Activity: 1092
Merit: 5117


Wear a mask, slow the spread


View Profile
May 05, 2019, 08:56:18 AM
 #11

I interpreted it as  if attacker is say 2 block behind and start writing its own transaction for creating new block and once it able to extend it lead then attacker chain will be published as a valid chain. Is I am misinterpreting the things?
No, you are correct. I was just pointing out that the phrasing "corrupt the ledger" makes it sound worse than it is to a newbie, I think. As I said above, an attacker with a significant proportion of the hashrate pushing an alternate chain only allows the attacker to reclaim or double spend their own coins. It doesn't and can't affect coins you are holding in any way, doesn't allow the attacker to create new coins out of thin air, or anything like that.

Once the attack is over, the ledger is still perfectly valid and will continue to operate as it did before. Saying it is "corrupted" makes it sound like it is unusable and therefore would be the end of bitcoin, which isn't the case.

Ben K.
Member
**
Offline Offline

Activity: 103
Merit: 124


View Profile
May 06, 2019, 12:22:43 AM
 #12

These attacks are more dangerous on smaller networks with less hashing power. Essentially, you have to "roll back" blocks when a double spend occurs.
Thirdspace
Hero Member
*****
Offline Offline

Activity: 1232
Merit: 726


Mixing reinvented for your privacy | chipmixer.com


View Profile
May 06, 2019, 01:27:20 AM
 #13

Once the attack is over, the ledger is still perfectly valid and will continue to operate as it did before. Saying it is "corrupted" makes it sound like it is unusable and therefore would be the end of bitcoin, which isn't the case.
perhaps the word "altered" fits the situation?
because the attacker can only change his own transactions without affecting other people's transactions
and the faster it's uncovered, the less damage impact on bitcoin network and users

these are what a 51% attacker can and cannot do:
https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power

TheHas
Full Member
***
Offline Offline

Activity: 616
Merit: 167


View Profile
May 06, 2019, 02:03:12 AM
 #14

These attacks are more dangerous on smaller networks with less hashing power. Essentially, you have to "roll back" blocks when a double spend occurs.

It can happen on larger networks too. I read that Bitcoin  Cash has a mining body with about 40 percent of the network hashrate. That is just asking for trouble.

o_e_l_e_o
Legendary
*
Offline Offline

Activity: 1092
Merit: 5117


Wear a mask, slow the spread


View Profile
May 06, 2019, 09:35:27 AM
 #15

perhaps the word "altered" fits the situation?
Yeah, I think that makes it sound a bit less ominous than "corrupted". Even during a 51% attack, the blockchain will continue to function, and any transactions you make remain completely valid. If the attacker is successful in rolling back a few blocks, all that can happen is a transaction that was made is reversed and the coins are returned to the sender. You will never be in the situation of losing your coins or your coins being stolen from you. The worst case scenario is if you have accepted payment in return for goods or a service and that payment is reversed after the trade, which is why people generally wait for 6 or more confirmations in the cases of large trades.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!