A Gentle Introduction to Blockchains and Crypto-Currencies

Kris
Coinmonks
10 min readMar 14, 2022

--

Blockchains have been around for 14 years, and yet most still don’t understand what it is. Here is a rigorous yet understandable explanation.

Ledgers, hashes, and blocks

First of all — ledgers. If you have researched crypto & blockchains before, you must have heard it used to describe blockchains. Here is a quick refresher if you forgot or have not. You can think of a blockchain as a ledger where each block represents a transaction*. So, for a blockchain where each block represents one trade, one is created when you send your friend $100, and another when they return the $100 to you. This blockchain now has a total of 2 blocks recording two transactions.

Illustration of a Two-Block-Chain

So why not just use a traditional ledger? One word: integrity. To explain how a blockchain ensures the integrity of its records, one must understand two things: what a hash is and what a block contains.

First, let us tackle what a hash is. It is a UNIQUE number generated (hashed) from an input. Since a hash is unique to the input, it is impossible to get identical hashes using two different inputs. An example of a simple hashing algorithm is x = y. When the number 1 is given to the hashing algorithm, the hash is 1. Also, an output of 1 is impossible if the input is anything other than 1. Since anything stored on a computer is a number (albeit in binary), any digital information (text/images/passwords/audio files/transaction records) is hashable. Basically, a hash is a fingerprint for digital content.

Illustration of a Hashing Algorithm

Moving on, what are these blocks made of that make blockchains such credible ledgers? Each block contains three things: information it records, the hash of the previous block, and its hash. Let us revisit the simple hashing algorithm above (x = y). Recall that the hash of a block = (its info + hash of the previous block). So whenever information within a block is changed, the hash of the compromised block is also modified. Since the hash of every following block is not changed, the chain is inconsistent.

Illustration of a Two-Block-Chain with Block Components

To better illustrate this, let us imagine a ledger with three entries and a corresponding blockchain of length 3. Suppose a person wants to change the second transaction. They could fool everyone by editing the second entry within the paper ledger with some professional forgery skills. However, this is impossible on a blockchain. Once they change the stored information within the second block, the hash of the second block would be different (uniqueness).

Illustration of a Chain with a Compromised Block

Now, the hash of block 3 (0+’f’+’g’+’h’) no longer represents its predecessor (0+’f’+’i’). Block 2 is determined to be compromised. Of course, with a blockchain of only length 3, changing both blocks 2 and 3 is still feasible. Therefore, actual blockchains implement two extra security measures to mitigate this risk: proof of work and decentralization.

Proof of Work complicates the hashing formula, lengthening the process of calculating a hash. Take the chain of Bitcoin as an example. The hash of each block takes around 10 minutes to be calculated (Blockchair, 2022). With approximately 726,355 blocks currently (Blockchair, 2022), you would need more than 7.2 million minutes, or 13.7 years to change all the blocks on the chain. That is ignoring any new blocks created during this process. This measure alone makes it practically impossible for anyone to change any information in previous blocks.

Decentralization is the process of distributing the blockchain to anyone who wants to help verify these transactions. In reality, Proof of Work makes it practically impossible for one single computer to verify the whole chain. Thus multiple computers (miners) pool their computing power into a node. The node then receives a copy of the chain and divides it among its miners for verification. Whenever a node generates a new block, all other nodes will receive it and verify its integrity. If the new block is consistent with the whole chain, the chain will add the new one and Bitcoin is released to the node as a reward (we will revisit this later). Each node then periodically checks if its blockchain is identical to the chain of most nodes. If it is inconsistent, the node will know that its chain is compromised and replace it with a copy of the most common chain.

To better explain how this works, let us imagine a system of 3 nodes (A, B, C) such that three copies of a chain of length 3 exist.

Now let us say the chain of node B is compromised such that information in block two is changed and block three is recalculated to be consistent (proof of work failed).

Illustration of Compromised Chain

Since the chain is decentralized, only the chain of B is corrupt. Thus, when B does its periodic integrity check with chains A and C (0 + ‘f’ + ‘g’ + ‘h’), it will identify that its chain (0 + ‘f’ + ‘i’ + ‘h’) is compromised and replace it with the correct version.

Of course, a dedicated antagonist who wants to change a block could do so by recalculating the whole chain for both B and one other node within this theoretical 3-node-network. But with proof-of-work, decentralization, and the sheer number of blocks, attacking a chain becomes impossible.

Hopefully, you can now appreciate the secureness of using blockchains to store read-only data. The whole system makes trust in an institution unnecessary (i.e. trustless). Any attempt to game the system is impossible, and anyone interested in proving its integrity can do so.

Tokens, Fungible or Otherwise

With blockchains out of the way, we can talk about cryptocurrencies and Non-fungible Tokens (NFTs). To start, what are tokens? If the blockchain is a ledger, tokens are the items in transactions. So, the bitcoin blockchain records transactions of Bitcoin tokens, and the Ethereum blockchain, Ether tokens. These tokens act as incentives for people to become miners and help keep the blockchain secure. As mentioned above, when a new block is generated, the node that did the calculation receives pre-determined tokens as a reward. Registering other tokens on the same chain is also possible. However, these alternative coins (alt-coins) will not act as rewards for mining but as commodities that the original token of the chain could buy. Take the Ethereum network as an example. $TKING (yes, crypto for Tiger King exists) is currently trading at USD 0.000004474 at the time of writing. However, because it is on the Ethereum network, you can only buy it with other coins on the Ethereum chain. Take the popular $DOGE coin as another example. It can only be bought with tokens on the Binance Smart Chain (BSC) as it is registered on BSC. More concepts within the world of tokenomics exist and are quite interesting. But their complexity makes dedicating another post a better decision.

What about NFTs? How are they different from $DOGE and $BTC? Tokens such as $DOGE and $BTC are fungible tokens, while NFTs, as their name suggests, are non-fungible. The difference between fungible and non-fungible lies in uniqueness and divisibility. A fungible token can be divided and is not unique. Take Bitcoin, a fungible token, as an example. Due to its divisibility, I can buy 0.001 BTC. This attribute is essential for the concept of decentralization, as rewards are divided among miners of a node. Also, the non-uniqueness of a fungible token means Bitcoin in my wallet is indistinguishable from a Bitcoin held by Elon Musk. A non-fungible token, on the other hand, cannot be divided and are unique. They represent items that are indivisible and unique on the blockchain. Some examples include land, paintings, plane tickets, and ballots. It is important to note that an NFT only represents and is not the object itself. Therefore, the image of a Bored Ape is not on the blockchain, only its representations.

Bored Ape Yacht Club #8817 by Yuga Labs. Its NFT sold for USD 3.4 Million

Blockchain Fixes This

So, what are some actual use cases of this technology? Well, that is up to your imagination and creativity. A common implementation is using them to keep track of a player’s equipment/assets in a game. Another use case of crypto is implemented in DAOs. If you have not heard of them, they are organizations that use NFTs on a blockchain as votes to decide on their actions. I believe that this concept can be expanded much further, into elections of our governments. This implementation will solve issues such as lack of trust in the voting system and voter suppression of ethnic minorities. Hear me out.

After the 2020 US elections, mass protests rocked the country and people rioted on capitol hill on claims of voter fraud. How did this happen? Among other things (cyber-manipulation, conspiracy theories, lack of responsible leadership etc.), lack of trust in governments and institutions was a factor. I would argue that it is the most crucial factor. If people trusted the system more, claims of voter fraud would merely be brushed away as conspiracies. Sources of this breakdown in trust of institutions are widespread (racial injustice, fake news, GFC etc.), but the fix is, in my opinion, direct. By implementing blockchains as the voting system and NFTs as votes, anyone with a shred of doubt in the process could verify the integrity of the election process by checking the blockchain themselves. Let the government create a wallet for every registered voter. Come election cycle, have the government send a ballot in as an NFT to each wallet. Voters cast their vote by sending their tokens to the wallet of the candidate. Anyone with doubts could verify the blockchain themselves. Additionally, the tactic of closing polling stations in black communities to suppress their voices in elections (Salame, 2020)(Fowler, 2020) will be a thing of the past. By casting votes by sending tokens, anyone with a phone can make their voices heard. Implementation of blockchain in this sense will remediate voter suppression and restore trust in the process as well.

I have fielded this pitch to a wide range of audiences, and the most common worries are the carbon footprint of this idea and the reliance on voters having a crypto wallet. Addressing the carbon issue first, it is true that current blockchains use a lot of energy. A published peer-reviewed article estimates the carbon footprint of maintaining the blockchain of Bitcoin to be at 65.4 megatons of CO2 (MtCO2) (de Vries, Gallersdörfer, Klaaßen, & Stoll, 2022). That is more than the total carbon footprint of Greece in 2019 (56.6 MtCO2). The increase in extreme weather conditions due to climate change driven by carbon emissions makes this statistic hard to ignore. However, a blockchain supporting the election process does not have this problem. Compared to Bitcoin, where transactions happen every second of the year, elections are rarer and far-between. Thus the blockchain of elections will only need to be online during election cycles, cutting down tons of power usage compared to Bitcoin. The speed of verifying election ballots is also not a priority, meaning power-hungry top-notch hashing processors are not needed. Blockchain implementation will also replace the carbon usage of analog elections, further decreasing the net carbon of the election process. NFT ballots will replace paper ones, and thereby all the carbon emissions produced from the production and transportation. By having both a carbon-economic blockchain and the replacement of traditional election processes, a reduction in the carbon footprint of an election is possible.

Addressing the second counterargument, it is true that this will rely on all voters having a digital wallet. However, current technology grants anyone who has access to the internet a wallet. Public access points also exist to fill in the gaps of people with no internet. Taking this argument further, a Know Your Customer (KYC) process linking the government identity of a person to their wallets already exist. Wallets of voters can be identified by connecting KYC records to voter registration processes. Not to mention the possibility of a government-provided wallet specifically for official functions such as elections and storing credit scores etc. The ever-growing popularity of internet access in America coupled with existing KYC processes means implementation of blockchain in this scope will focus mainly on the technology instead of the logistics.

I have gone a bit off course and started pitching an application of blockchain. I will stop here. Hopefully, with both an explanation of what blockchain is and what it can do, you have gained some new insight into how this technology can potentially change our lives.

*: in reality, each block could contain anywhere from 1 to 100,000 transactions, depending on the blockchain

References:

Blockchair. (2022, March 9). Bitcoin Explorer. Retrieved from Blockchair: https://blockchair.com/bitcoin?from=bitcoin.com

de Vries, A., Gallersdörfer, U., Klaaßen, L., & Stoll, C. (2022). Revisiting Bitcoin’s carbon footprint. Joule. https://doi.org/10.1016/j.joule.2022.02.005

Fowler, S. (2020, October 17). Why Do Nonwhite Georgia Voters Have To Wait In Line For Hours? Too Few Polling Places. Retrieved from NPR: https://www.npr.org/2020/10/17/924527679/why-do-nonwhite-georgia-voters-have-to-wait-in-line-for-hours-too-few-polling-pl

Salame, R. (2020, March 2). Texas closes hundreds of polling sites, making it harder for minorities to vote. Retrieved from The Guardian: https://www.theguardian.com/us-news/2020/mar/02/texas-polling-sites-closures-voting

Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing

Also, Read

--

--

Kris
Coinmonks

math/finance @ uwaterloo. building intuitive yet quantitatively rigorous investment tools for individual investors