What’s in this post?
What is cryptocurrency?
What is cryptomining?
Proof-of-work – the process of confirming transactions on a blockchain
I briefly discussed in a previous blog post the idea of a cryptocurrency, saying that in essence it is much like any other currency – something that people are willing to swap in return for goods or services. Much like the USD or the GBP, they have no intrinsic value (the paper the dollar is printed on is effectively worthless). They are however worth something if a large number of people believe they are. Where regular (fiat) currency differs from cryptocurrency is in the fact that cryptocurrency only exists as a piece of computer code, locked away in a digital world. You cannot physically pass one Bitcoin from person A to person B, they must be exchanged on a blockchain that resides on a network of computers.
In recent times the idea of cryptocurrency and the potential of blockchain in general have caught the attention of many. When the price of Bitcoin nearly reached a staggering $20,000 in 2017, the whole world sat up and listened. It became increasingly evident that cryptocurrency had great potential, that banks and individuals alike could tap into. Cross-border payments, mortgages and bringing banking to those currently without are just some of the huge benefits that cryptocurrency could bring. But a key question is “how does it work?” Well hopefully this blog post will help to bring a little insight into how cryptocurrency is exchanged between two parties.
What is Cryptomining
Cryptomining or cryptocurrency mining is often heard along with many other blockchain based buzz words, such as decentralised, hash or node. Mining is something fundamental to all blockchains, without it cryptocurrencies or transactions could not exist on a distributed ledger. Mining, in this context, is the process by which transactions are verified and added to the blockchain. The word ‘mining’ is itself slightly misleading as it gives the impression of something dug out of the ground, which really is not the case. So let’s explore the key steps associated with a blockchain based transaction.
Fundamental steps in a cryptocurrency transaction
Step 1: The owner of a crypto wallet A aims to transfer funds to the owner of crypto wallet B and does so by inputting the correct wallet address and the amount they wish to send.
Step 2: The as yet unverified transaction now resides alongside other unverified transactions in a group, waiting for a miner to take the required steps to confirm that this transaction is legitimate.
Step 3: Miners on the network gather together transactions and form them into a block (the blocks that form the blockchain). The size of a block varies between blockchains, Bitcoin has a fixed block size of 1 mb, while the Ethereum’s blocks vary in size but are typically between 20-30 kb. It is possible for multiple miners to select the same transaction, but in gathering transactions miners must also check they are valid (i.e. the sender has sufficient funds).
Step 4: This step is computationally expensive and requires a lot of energy in the form of electricity – in effect where the the miners earn their money. To verify each block a signature (also known as a hash) must be attached. A signature is a difficult thing to create, but fortunately very easy to verify. It is formed by taking the block number, data contained within the block, the previous block’s hash and a special number called the Nonce (number used only once). This information gives a unique string of numbers and letters that is specific to that block. Each block references the previous block as well as the data contained within, therefore if anyone were to tamper with it, this would be come clear in the signature and the block.
Step 5: The miner that finds a suitable signature for the block first then broadcasts this to all other miners. Miners are essentially in a race to find a signature that meets the requirements imposed by each blockchain. Blockchains purposely make finding correct signatures quite difficult in order to set a minimum time to find one. On average it takes approximately 10 minutes to add a new block to the Bitcoin blockchain – a number that was designed to allow all computers on the network to synchronise and update the blockchain for all. If the miner is shown to have found a suitable signature, all other miners abandon their current blocks as they may contain transactions that have just been verified.
Step 6: At this stage the other miners must verify the block by inserting the data, previous hash and nonce from the announced block, if the signature is indeed as stated by the miner that broadcast it the signature is accepted. If a consensus is reached, that is all miners agree the hash is correct, then there is proof that work has been done – hence the term proof of work. At this point the block has been accepted, the blockchain is updated everywhere and the wallet balances are updated accordingly.
Step 7: Now the block has been added to the chain, every subsequent transaction gives further confirmation for that block. The more blocks that are added, the deeper the block is into the chain and the more times it has been ‘confirmed’, making it more difficult to alter.
The power of cryptocurrency
What I hope to have shown in this post is that cryptocurrencies aren’t quite as alien a concept as some people believe. In reality they are much like any other currency, only instead of them being centralised to a government, they are entirely decentralised. Transactions are confirmed by miners, that are just ordinary people, anywhere around the globe. Cryptocurrency still has its critics, mainly due to the volatility of their price. But, it seems that crypto or digital currencies will play a huge role in many sectors over the next 10 years, especially as many banks are beginning to devise their own!