Counterfeit bitcoin

Calvin Cheng
3 min readOct 19, 2017

--

https://plexisltd.com/wp-content/uploads/2016/05/Real-or-Fake.png

Now, you know bitcoin is a decentralized digital currency allowing everyone to be the currency issuer. Computers storing all bitcoin account information are called nodes. You can use the wallet to manage the bitcoin address and private key where the former one allows you to receive bitcoin and the latter one allows you to spend it. Wait a minute. It seems like there is not much connection between each sentence. You still don’t know how bitcoin works. No worry! Let’s dive into the architecture of bitcoin.

Let’s say, Alice try to send 10 bitcoins to Leo. Alice uses her mobile wallet and input Leo’s bitcoin address and the miner fee in the app. When Alice hits “send” button, the transaction is sent out to the nearest nodes which continue to relay the transaction to other nodes until every node in the world receives it. Each node carries out an independent checking to see whether Alice really has 10 bitcoins in her account. If Alice does have enough amount, the node updates the account information for both Alice and Leo.

Everything looks perfect but what if Alice is a hacker? She uses the malware to control three mobile phones which are located in London, Seattle and Hong Kong and uses these phones to send out the 10 bitcoins she owns to Leo, Sam and Helen separately at the same time, given that Alice only owns 10 bitcoins in total. Although all nodes eventually receive all 3 transactions, nodes in different cities receive different transactions in different orders because of broadband speed. For example, nodes in London receives transaction to Leo first because the transaction is sent out from a phone in London. They only update account information for Alice and Leo instead of Sam and Helen because Alice do not have enough amount of bitcoin to pay to Sam and Helen. At the meantime, nodes in Seattle only update account information for Alice and Sam and nodes in Hong Kong only update account information for Alice and Helen. Now, there are three different versions of account balance in the world. Nodes storing different records cannot run in the same network as they cannot recognize the bitcoin owners from other records in their own records. Leo, Sam and Helen cannot send and receive bitcoin in the same network as their records are stored separately in different nodes. Basically, bitcoin is divided into three different currencies! (See the diagram below)

What Alice try to do result in double-spending problem which is an attempt to spend the same coin repeatedly. For cash, we also have the similar issue, i.e. counterfeiting. However, we cannot rely on police to stop double-spending problem in bitcoin as it is a decentralized network. What if everyone can be the police? I will tell you more next time!

--

--

Calvin Cheng
Calvin Cheng

Written by Calvin Cheng

Blockchain Engineer • DevOps • Certified Hyperledger Fabric Administrator (CHFA) • Full Stack

No responses yet