When you buy through links on our site, we may earn an affiliate commission. Learn more
I’m a Software Developer who has been in the blockchain space for a couple of years. When I tell people about it, I frequently get asked “What is blockchain”. You might also be wondering what blockchain is, so I’d like to explain.
A blockchain is a network in which the users take a given action (e.g: a transaction) which is permanently recorded and stored. The most common use case of a blockchain network, is a cryptocurrency. The most well-known example is Bitcoin.
Why should I care?
Because it’s a relatively new technology that may or may not have an influence on how we do commerce, governance, data ownership, supply chain and more.
At best, it has the potential to make banks and even governments redundant, at worse it will be used only as a specific type of database. But most likely it will be somewhere in the middle, with uses we haven’t yet thought of.
What is Bitcoin?
Bitcoin is a digital currency (cryptocurrency) on the bitcoin blockchain network. It was developed in 2008 by an unknown individual or a group under the pseudonym Satoshi Nakamoto. People can either earn Bitcoins or exchange their government-issued currencies (Fiat) such as $, £, € for Bitcoin via a special ATM, an online exchange or other means. After which they are free to transact with anyone on the network, regardless of where they are in the world.
A common misconception is that you need to have enough money for 1 Bitcoin before you can acquire any. However, Bitcoin like other currencies has a denomination unit (e.g: Pence, Cent), called a “Satoshi”, so you don’t have to have a whole Bitcoin to own some. But the cool thing is that a satoshi is much smaller than other denomination units.
£1 = 100 Pence
₿1 = 100 million Satoshis
Bitcoin is not issued or controlled by any government or bank. It is run by individuals (miners) across the globe who choose to run the software on their machines.
What is mining?
Mining is different from one blockchain to another. So here I will describe mining on the bitcoin network.
A miner, is someone who runs a “node” in the network by running mining software to verify transactions. These machines are owned by individuals or companies around the world. “Minor” and “Node” are often used synonymously, and I will do so in this post.
When I transfer my Bitcoins (or let’s be honest, my Satoshis) to my cousin in Iran, all the miners get notified about it. The software then checks the history of all the transactions on the network to ensure that I do indeed own the amount I am attempting to transfer.
Once the transaction is verified, it is added to a “block”. A block can be thought of as a document listing the transactions that have taken place in the last 10 minutes. Every miner creates this block and then performs an algorithm (Proof of work). The aim of the miner is to find a predefined value (this is an over-simplification, I will explain mining in more detail in a later section). The first miner to get this value, is the one that gets the “right” to add their block to the blockchain. This is akin to being given temporary permission to write to a public database.
The miner is then rewarded with Bitcoins. The reward is a compensation for the electricity expended to ensure that users spend what they own. Once the block is added to the blockchain, the race continues for the next block.
In short, the miners ensure that all transactions on the network are valid, in return they receive Bitcoins. This is also how new Bitcoins are generated. Every 10 minutes, 12.5 newly “minted” Bitcoins are rewarded to the “winning” miner. However, this amount is halved every 4 years, until the year 2140 where the last Bitcoin will be mined. This mechanism ensures that the supply of Bitcoin remains finite.
What’s wrong with “normal” money?
Because, when we use fiat, we are trusting a government. The government prints a piece of paper which is not backed by gold. Every day, the money we own in our bank accounts depreciates in value due to inflation. Many individuals around the world don’t have the access or privilege to have a bank account. Transferring money to loved ones across borders, can cost hefty fees and take up to days. Bitcoin solves these and many other problems. Overall, Bitcoin meets many of the requirements of what “money” should have; more than Fiat or Gold do.
Though of course, for there to be a large impact, we would need mass adoption.
I heard bitcoin is killing the planet ?
There’s been a lot of concern in the media about the energy consumption of bitcoin and other blockchain networks that use the Proof of Work algorithm. PoW is intentionally designed to be slow and energy-intensive to ensure the security of the network.
The energy consumption of bitcoin is easily quantifiable and focused, however, the energy used to print fiat notes, run banks and huge offices to fulfil the same role (albeit on a different scale) is opaque and dispersed. That said, there is no doubt that bitcoin has a negative impact on the planet and alternative algorithms are being developed to reduce the carbon footprint, while maintaining most of the benefits of PoW. One example is Proof of Stake, which is beyond the scope of this post.
If you like to learn more about the carbon footprint of bitcoin, I highly recommend watching this video, in which Andreas Antonopolous tackles the problem from a number of angles.
Does it have any other uses?
Cryptocurrencies are only one use case of blockchains. Ethereum, for example has a feature known as Smart Contracts. Smart Contracts are pieces of code written by Software Developers and executed by the miners. Since blockchains allow data to be recorded permanently, they can be used to prove an event having taken place.
For example, smart contacts could be used for:
- Identification: local authorities could use smart contracts to record births, marriages and deaths, and use the blockchain for identity verification. This would prevent identity theft, since adding a copy of someone’s identity would always come after the date it was first created, rendering it invalid
- Supply chain: in supply chain, you have many parties involved. Smart contracts could be used to introduce more transparency in the process. For example, Walmart used this approach to trace the origin of their produce and meat. This is especially useful for determining the source of food-borne diseases. If you can trace the farm or region of an outbreak, you can reduce waste by only targeting the affected supply.
Can bitcoin be hacked?
If you are still reading, you may be interested in a more detailed explanation of mining and Proof of Work. This should also explain why the bitcoin network is secure and has never been hacked. (Online exchanges and wallets that run bitcoin have been hacked, but the bitcoin network itself has never been hacked).
Hashing – A one way mathematical function, that can represent data using a set of characters of a fixed length, referred to as a hash. It is considered “one way” because, it is easy to perform hashing on a given data but it is almost impossible to derive the data from the hash.
Nonce – A random number that is only used once (we will come back to this later)
Target Hash – A hash value predetermined by the mining software (which changes every 2 weeks)
As transactions are propagated throughout the network, miners verify them and add the valid ones to a new block. They then perform a hash on the block, outputting a value such as “0000b06d76275e1babe5c3f8f917f39938653b9dc097bbb69c4b99cbee6d529b”.
The miner will then check if the hash is less than or equal to the target hash. It most likely won’t be the first time round. Hashing the same data will always output the same hash, so how can we get a different hash without changing the data?
Nonce to the rescue. The nonce is a field in the block that has nothing to do with the transaction data. It’s an arbitrary value that can be changed, in order to generate a different hash without changing the data. So the proof of work algorithm is a repetitive process of changing the nonce, and hashing the block over and over again until we get our desired hash.
Now that we understand mining in more detail, I will explain, why it’s not possible to hack bitcoin.
The following diagram shows a series of consecutive blocks. Each block contains a “previous hash” filed, which references the block that came before it. This means that if you were to change the contents of a block, its hash will change, and so the next block will no longer to be connected to it. Thus breaking the chain.
If a bad actor wants to give themselves bitcoins that don’t belong to them, they will have to change the history, since bitcoins don’t come out of thin air.
As we learned, changing a block, changes its hash, the bad actor would have to re-mine the block they are changing as well as any consecutive blocks, faster than the time it takes for the rest of the miner to mine 1 block. The following diagram demonstrates this nicely.
Where can I learn more?
• Mastering Bitcoin book by Andreas Antonopolous
• Unchain Podcast
• Andreas Antonopolous on The Ken Rose Show
• Daniel Van Flymen on Software Engineering Daily
And here are people to follow on Twitter who are interested in spreading good information about the space. (Crypto twitter can be toxic)
• Andreas Antonopolous, @aantonop
• Laura Shin, @laurashin
• Nick Szabo, @NickSzabo4
• Vitalik Buterin, @VitalikButerin
• Siraj Raval, @sirajraval
• Naval Ravikant, @naval
Amazon and the Amazon logo are trademarks of Amazon.com, Inc, or its affiliates.