How does cryptocurrency work?

nishit rao
6 min readMay 29, 2021

Ins and outs of cryptocurrency mechanisms explained to a 6-year old.

Cryptocurrency is easy to understand

Go through the basics of cryptocurrency here.

As Bitcoin has the most market value right now in the cryptomarket. We will focus primarily on Bitcoin (throughout, we’ll use “Bitcoin” when referring to the network or the cryptocurrency as a concept, and “bitcoin” when we’re referring to a quantity of individual tokens)

Bitcoin is just software, don’t get deceived by fancy “coin” images. There is no tangible product for Bitcoin. It is a stack of code that can provide you value.

Let’s quickly jump into the meat of the topic. How does it work? Bitcoin follows blockchain protocols — a set of rules.

The Blockchain

Blockchain technology is quite straightforward. As the name indicates it is a chain of blocks. Any given blockchain consists of a single chain of discrete blocks of information, arranged chronologically.

In principle this information can be any string of 1s and 0s, meaning it could include emails, marriage certificates, land titles, contracts, or bond trades.

Blockchain diagram in cryptocurrency

In theory, any type of transaction between two parties can be established on a blockchain as long as both parties agree on the transaction. This takes away any need for a third party to be involved in any transaction.

This enables peer-to-peer financial products, like loans or transactions, where a bank or any government is not needed.

In Bitcoin’s case, though, the information on the blockchain is mostly transactions.

Bitcoin is really just a list. Person A sent X bitcoin to person B, who sent Y bitcoin to person C, etc. By tallying these transactions up, everyone knows where individual users stand. An example is shown below

Chain of blocks in crypto ledger

A Ledger is a book or other collection of financial accounts

Crypto users’ balance before transaction
Bitcoin Ledger before the transactions
Crypto users’ balance after transaction
Bitcoin Ledger after the transactions

The financial name for a blockchain is a “distributed ledger,” which emphasizes the key difference between this technology and a well-kept Word document.

Bitcoin’s blockchain is distributed, meaning that it is public. Anyone can download it in its entirety or go to any number of sites that parse it. There is no central authority(banks/government) to keep tabs on all bitcoin transactions.

Hence the participants themselves do so by creating and verifying “blocks” of transaction data.

What is mining?

Bitcoin Mining from a mine

The process that maintains this trustless public ledger is known as mining. Underneath the network of Bitcoin users who trade the cryptocurrency among themselves is a network of miners, who record these transactions on the blockchain.

Recording a string of transactions is trivial for a modern computer, but mining is difficult because Bitcoin’s software makes the process artificially time-consuming. Without the added difficulty, people could spoof transactions to enrich themselves or bankrupt other people.

They could log a fraudulent transaction in the blockchain and pile so many trivial transactions on top of it that untangling the fraud would become impossible.

Combining “proof of work” with other cryptographic techniques was Satoshi’s breakthrough. Bitcoin’s software adjusts the difficulty miners face in order to limit the network to one new 1-megabyte block of transactions every 10 minutes. That way the volume of transactions is digestible.

The network has time to vet the new block and the ledger that precedes it, and everyone can reach a consensus about the status quo. Miners do not work to verify transactions by adding blocks to the distributed ledger purely out of a desire to see the Bitcoin network run smoothly; they are compensated for their work as well.

How does cryptocurrency control inflation?

One of the main reasons for cryptocurrency is that it aims to bring down the ludicrous rate at which inflation is rising.

Let's first understand why inflation is occurring in the current scenario.

Currently, there is no limit on how much currency should be printed. So the central authority keeps on generating currency. This increases the flow of cash in the markets. As the money supply increases, the money loses its purchasing power.

Since people know the money printing resources are unlimited, they spend it recklessly. Hence the sellers don’t hesitate in increasing the rates and buyers after some reluctance eventually surrender to the sellers. This causes inflation.

Inflation example of coffee

As previously mentioned, miners are rewarded with Bitcoin for verifying blocks of transactions. This reward is cut in half every 210,000 blocks mined, or, about every four years. For eg. Hypothetically if a miner got 12 bitcoins for verifying a block of transaction in 2012, he would manage to get only 6 bitcoins for the same task in 2016. This event is called the halving or the “halvening.”

This process is designed so that rewards for Bitcoin mining will continue until about 2140.

Eventually, there will be one such time in the future where these rewards will count down to “zero”.

Once all Bitcoin is mined from the code and all halvings are finished, the miners will charge the users bitcoins as a return for verifying the transaction block. The hope is that healthy competition will keep fees low.

This system drives up Bitcoin’s stock-to-flow ratio and lowers its inflation until it is eventually zero. After the third halving that took place on May 11th, 2020, the reward for each block mined is now 6.25 Bitcoins.

This “charged amount” intends to recirculate the generated bitcoins in the market. Contrary to the central authorities who keep welcoming new money into the market, Bitcoin aims to have a fixed amount of bitcoins circulate in the markets.

This way money would no longer lose its value and prices will remain constant. Eventually avoiding inflation.

Imagine shopping if rates remain the same 100 years later.

Inflation avoided using cryptocurrency

Hashes

Here is a slightly more technical description of how mining works.

The network of miners receives the latest batch of transaction data. They run the data through a cryptographic algorithm that generates a “hash”.

A hash is a string of numbers and letters that verifies the information’s validity but does not reveal the information itself.

Let's take an example to better understand the hashing technique.

Given the hash 000000000000000000c2c4d562265f272bd55d64f1a7c22ffeb66e15e826ca30, you cannot know what transactions the relevant block (#480504) contains. You can, however, take a bunch of data claiming to be block #480504 and make sure that it has not been tampered with.

If one number were out of place, no matter how insignificant, the data would generate a totally different hash.

As an example, if you were to run the “Spiderman.” through a hash calculator, you might get

267af43517045cda64523e6f62570686031447572456c0a9f9dcb35e3ccce207. Delete the period at the end, and you get b727d8749b8221a9b1a65990835bbdb1fb4926cec2cf66487128cf9331a87509. This is a completely different hash, although you’ve only changed one character in the original text.

The hash technology allows the Bitcoin network to instantly check the integrity of a block. The hash code of the previous block is stored in the next block. If the most minute detail had been altered in the previous block, that hash would change.

This way it takes care that even if some spammer makes changes 20000 blocks back in the chain, the hash code of the current block is changed and would set off a cascade of new hashes and tip off the network.

Conclusion

Even though understanding cryptocurrency is not a cup of tea, it can be achieved. It is definitely going to be a big revolution in the financial world. It has shown its early signs already. This makes it even more important to stay updated about it. Doge out!

--

--

nishit rao

Realizing that there is lots that we don’t know but should, I started my journey to document and share new things that I discover. tinymindpebbles.blogspot.com