Javascript is disabled. ​What is bitcoin double spending? - Twigse: Business scaling digital platform with a full range of decentralized financial services
  • July 9, 2021 8:42 AM

    ​What is bitcoin double spending?


    Double spending  is a theoretical way to successfully attack the Bitcoin blockchain and a feasible way to steal coins from other, less developed blockchains. It is unlikely that you will face this problem when using cryptocurrencies, but it is better to keep it in mind.

    What is double spending?

    Double spending is an operation where the same transaction is made twice. So, its author as if copies the data and uses it again, as a result, the amount spent is less, but the profit is more.

    You can do something similar with fiat cash by dividing the payment into two parts and paying for part of the goods with real bills and the other with counterfeit bills, but it rarely works in the 21st century. 

    The crypto community has long been worried about this, worrying about the collapse of the entire ecosystem.


    How does bitcoin prevent double-spending

    Bitcoin has built-in mechanisms to deal with such attacks. The Proof-of-Work algorithm obligates to verify and validate each transaction. The process is closely related to mining: using computing equipment, miners solve mathematical problems and pick up hashes for blocks. It sounds a bit complicated, but the bottom line is that:

    1.A lot of computing power is used to validate the transaction;

    2.The more confirmations, the less chance of falsification.

    The complexity of the main currency network is known to be high and increases even more as the demand for the asset grows. This mechanism also prevents coins from being issued too quickly from the ecosystem.

    Similar technology is used in the Proof-of-Stake algorithm, only there it uses the deposits of network participants rather than computational power for confirmation.

    And, after all, all transaction data is stored and freely available.


    Types of double-spending attacks

    Cryptocurrency can be exposed to double-spending attacks of three types:

    1.Race attack;

    2. Finney attack;

    3. 51% Attack.

    The first involves unconfirmed transactions or transactions with one or two confirmations: the recipient accepts two (or more) of the same transaction, one (or more) of which is false but is accepted faster than the main transaction hits the blockchain. Thus, the recipient's wallet does not receive BTC, and the sender, if it is a sales transaction, receives the goods or currency.

    The second attack works similarly: it also involves unconfirmed transactions, but in this case, you need the computing power to add two identical transactions to the block.

    The 51% attack is the most common one. The thing is: a person who owns more than 50% of the hashrate can control the architecture of the cryptocurrency, including freely creating new blocks. In this case, the system can not only be exposed to double spending but also be destroyed.

    Should we be wary of double-spending attacks?

    The double spending attack problem is mostly theoretical, especially in the case of bitcoin. Even one transaction requires a lot of processing power: it is hard to imagine how many miners are needed to take control of 51% of the hash rate. It is expensive and does not make sense.

    Other blockchains may not be as well protected in this regard, but the risk of 51% or Finney is low in those as well.


    Conclusion

    Cryptocurrency, like any other digital system, has potentially dangerous technical vulnerabilities. However, the average investor or merchant may not fear: the chance of implementing double spending in practice is close to zero.

          15