themarscom / double-spending-a-coin-two-many Goto Github PK
View Code? Open in Web Editor NEWWhen Satoshi Nakamoto dropped his whitepaper conceptualising Bitcoin, he addressed the problem of double-spending that his predecessors in digital cash could not solve. Satoshi offered a solution for the same. This solution became the base technology that the entire cryptocurrency industry today stands on. What is Double-spending? Double spending is a potential flaw that arises with digital currency where the same tender is being spent multiple times. This happens as digital information is easy to reproduce and manipulate. Simply put, double spending is spending the same money twice. Physical currency cannot be replicated easily. Offline transactions are made using physical currency, the parties involved can verify its authenticity and transfer ownership. Physical currency can only be spent once. One coin or note cannot be used to make multiple purchases. Digital assets on the other hand are a set of codes that can be copied and sent to several recipients. This duplication eventually leads to a loss in the value of the asset. Double-spending of digital assets is highly probable as it is impossible for a recipient to tell whether funds being spent have been spent already, without a mediating verification service. Digital assets can solve the problem of double-spending by either opting for a centralised clearing counterparty, such as a financial institution or by a decentralised approach. What is the Decentralised approach? Double spending in decentralized systems is challenging, as it equips an immutable public transaction ledger that is maintained by servers on computer systems scattered around the world. These servers receive the information of a transaction as a broadcast. The broadcast may be received by various servers at varying times. Hence there is a possibility for a transaction to be duplicated or the same currency to be used twice. The servers render the second transaction invalid. To ensure that the servers do not go out of tally, a consensus mechanism is adopted. Bitcoin, for example, uses a consensus mechanism known as proof-to-work. A necessary agreement is reached on various transactions by synchronising the majority of the nodes in a network. Bitcoin uses a historical public ledger facilitated through its blockchain network that legitimises ownership and transfer of assets. Bitcoin transactions take time to verify as the process involved is an intricately complicated one, requiring immense computing power. Are double-spending attacks common? Hackers have tried to break into the bitcoin verification system by sending fraudulent transaction logs to one server and broadcasting another to the rest of the network. However, more Bitcoin thefts happen due to a lack of a secure storage system. Another risk for double-spending can occur if a user controls more than 50% of the computing power involved in maintaining the blockchain. In such a case a user will be able to manipulate the consensus mechanism and repeat transactions by clearing out the ledger. Double-spending attacks are minimalized by the security a blockchain offers.