and why any wallet provide si not stopping this hacking trick
actually it's not wallet's providers fault,they just enabling the self customization fee to add more flexibility to the wallet users because as you know they want to set the fee whatever the amount they want,but unfortunately this feature is just getting misused by people,so there's born double spend
Actually even some of the online wallet providers disable custom fee feature double spend can't be stopped as there are hardware, desktop wallets from where we can actually use command to send input with custom fee. What these days web wallets have is recommended fee which is very useful for the one who want to get their transaction confirmed within next block or 10 minute.
thank you so its not any illegal thing so many can do use this option to be rich .don't you think ??
Actually, if you pay for goods or services, receive said good or service, double spend the input for the payment transaction to create an output that doesn't go to the vendors wallet, I'm pretty sure its considered stealing in most (if not all) cultures
Double spending in itself is not illegal, but it CAN be used for illegal purposes.
ok got your point now ..thanks so in short it can be use for legal purpose or illegal purpose also
That is correct. A
simplified explanation could be given like this:
- bitcoin is a decentral database, the data in this database is stored in blocks.
- the ammount of bitcoins you own is the sum of the input records stored in the database
- when you send bitcoins to somebody, you create a transaction. This transaction is a piece of text in which you specify which of your input records you'll use to create an output record (this output will be seen as an input record for the receiver's wallet).
- once you've created a transaction, it's broadcasted to the network. At this point, the transaction is unconfirmed (it's not stored in a block, it just resides in the memory of the nodes. It is unconfirmed and can be dropped/forgotten/double spent at any given moment).
- a double spend is when you repeat the process: create a second transaction USING THE SAME inputs.
- the miner now has a choice: he/she either adds the first transaction to a block OR the second transaction. Each input can only be used once, so when he adds the first transaction, the second one will be "cancelled" (and vice versa). The miner usually choses the transaction that has the highest fee.
SOOOOOO.... This can be really usefull when, for example, you created a transaction with a very low (or no) fee, and it's stuck (unconfirmed) for hours (or days). You can create a second transaction, using the same inputs, but with a decent fee... This new transaction can be confirmed much faster, and cancel out the stuck transaction.
Offcourse, the same principle can be applied when buying stuff from a 0-confirmation vendor... Pay him, and before the transaction is added to a block, broadcast a second transaction using the same inputs, but outputs going to YOUR wallet instead of the vendor's... This way, the transaction with output to the vendor will be "cancelled", and the funds are re-routed to your own wallet.... You basically scammed the vendor at this point, since the transaction with outputs to his wallet will never be added to a block, so he wasn't payed.
Once again: this is a simplified explanation... There's a lot more to it, i've actually left out a lot of important stuff in this explanation!!!