Cryptocurrencies Part 1 — Decoded!

Swetha Srinivasan
6 min readAug 27, 2020

--

Bitcoin, blockchains, distributed consensus, ledger, hash pointers…a simple (well, mostly so) overview of how Bitcoin transactions occur on the blockchain

It’s been over a decade since cryptocurrencies came into the foray, via Satoshi Nakamoto’s Bitcoin white paper, and the field has been buzzing with activity since then. Currently, there are around 200 active cryptocurrencies. Ethereum’s Ether, Bitcoin, Ripple’s XRP, and Binance Coin are some of the familiar names. However, understanding the operation of Bitcoin and altcoins (cryptocurrencies other than Bitcoin) is quite abstruse. Combining topics from finance, cryptography, computer science, economics, and psychology, it’s a pretty complicated yet super interesting concept. The primary ideas are decentralization and encryption.

Let’s analyze Bitcoin. A lot of altcoins run on Ethereum’s blockchain network, however, the basic structure is pretty similar. Some important terms one needs to be familiar with are private key, public address, digital signature, wallet, ledger, nodes, distributed consensus and mining. Yeah, it’s quite a handful!

Keys, Wallets, and Signatures

Visualize a mailbox. Your mailbox has an address to which people can send items, letters etc., and you possess the key to the mailbox. In case your friend wants to send you a letter, he/she signs off the transfer using his/her signature and uses the address of your mailbox to send the letter. This gets deposited inside your mailbox and you can use your key to retrieve the letter. A cryptocurrency transaction can be understood similarly.

Your digital wallet is akin to the mailbox. To set up a digital wallet, you need to generate an asymmetrically correlated private-public key pair via an algorithm. In the case of Bitcoin or Ethereum, the algorithm used is the Elliptical Curve Digital Signature Algorithm. The asymmetric relation refers to the fact that the public address can be generated from the private key but it’s virtually impossible to reverse-engineer the private key from the public address.

People can send Bitcoin or other altcoins to your wallet by using your public key or address and you can retrieve the coins using your private key. If you lose your private key, you’ve lost all your Bitcoin as you cannot break open your wallet like you can a mailbox.

Anyone sending you cryptocurrency also has to sign off the transaction using his or her digital signature, thus indicating a transfer of ownership. This digital signature, which is related to the sender’s private key via complex encryption, defines a transaction.

Ledger and the Blockchain

A ledger is a tamper-proof account of transactions. Consider a linear list of objects. When each object is connected to the next via a pointer, you get a list of linked objects or a linked list. A linked list of blocks with hash pointers, where each block contains information about the entire chain till that point constitutes a blockchain. A hash pointer is similar to a regular pointer, but it also incorporates a hash function. This function takes virtually any input and outputs a 256-bit number, which gets represented in the hexadecimal system.

Each block in a blockchain thus contains data, a hash of the previous block and a pointer to the previous block. Thus, essentially, each block contains data about the entire history of the chain. Jargon aside, a blockchain is a chain of blocks connected in such a manner that makes it virtually impossible to tamper with or modify the history of the chain.

SHA-256, the hash function used in Bitcoin (Ethereum uses Ethash) has the property of collision resistance, whereby it is highly unlikely for two inputs to the function to produce the same output. It is also very difficult to reverse engineer the input from the output. This lends the tamper-proof property to blockchains. Tampering with it is theoretically possible though, with immense (I mean SUPER immense) computing and will power, but the key lies in the fact that it is undesirable to do so.

The hash function ensures that even a slight alteration to the input results in considerable changes to the output, thus making tampering easy to detect and disincentivizing the act altogether. One also loses the opportunity to receive something known as block rewards, covered in the next section.

Almost There…Distributed Consensus and Mining

Now, this ledger is maintained and operated in a decentralized manner by entities called nodes, which verify and add blocks to the blockchain. This verification happens via a distributed ledger consensus.

When a set of transactions occur, it is broadcasted to all the nodes and each of them collects transactions into blocks. A node is then picked at random to propose its block which then gets propagated throughout the network. A supermajority of nodes needs to agree with the proposed block to cement its addition into the blockchain. In case of contradicting blocks, forks may develop, with some nodes backing one fork over another. Short forks are then abandoned and honest nodes keep extending the longer fork. Eventually, the system reaches a consensus and the accepted block becomes a part of the blockchain. This mechanism makes property rights inherently probabilistic.

What’s interesting here is the method by which nodes are picked at random. In the case of Bitcoins, the technique employed is proof-of-work (PoW). The node which solves a complex cryptographic puzzle first gets to propose the block. What’s the incentive to do this? In case a node proposes a block which is eventually accepted by other nodes to form a part of the blockchain, the node receives Bitcoin in return. This activity is termed as mining.

Does that mean Bitcoin keeps getting created indefinitely? Not really. For every 210,000 blocks, the Bitcoin reward is cut in half, an event termed as Bitcoin halving. The latest halving event took place on May 11th 2020. It’s been calculated that the total number of Bitcoin would saturate at 21 million.

These block rewards serve as an incentive to validate transactions honestly, as, if malicious nodes do try to mess around, there is a smaller chance of the proposed block being accepted. Consequently, malicious nodes have reduced chances of receiving block rewards. Transaction fees also incentivise honest trading.

So, if you want to be able to propose a block and mine coins, you need to possess and expend immense computing power and electricity in PoW. An alternative to the PoW consensus mechanism is the proof of stake (PoS) mechanism. Here, the role of proposing a block depends on the stake you possess in the cryptocurrency. However, this inherently embodies a rich-gets-richer approach along with some other drawbacks. Nxt uses PoS and Ethereum is in the process of shifting from PoW to PoS. The incentives to nodes via PoS are limited to transaction fees and no block rewards are offered.

Thus, Bitcoin and similar altcoins incorporate decentralization via a set of validating nodes with no single node or central authority possessing the complete power to validate transactions.

How are members of the node on a Bitcoin blockchain chosen? Anyone with the computing power to mine Bitcoin can start mining. However, with an increase in the number of validating nodes, transaction time rises.

Cryptocurrencies like Bitcoin and Ether (Ethereum’s coin) process transactions pretty slowly. The primary reasons are limits on block size (1MB for Bitcoin and 6.7 million gas units for Ethereum) and the distributed consensus mechanism. The Bitcoin network can process 3–7 transactions per second while Ethereum can handle 15–20 transactions per second.

One of the other main differences between the Bitcoin and Ethereum networks is that while Bitcoin seeks to serve as an alternative to fiat currencies, Ethereum strives to facilitate smart contracts and applications via its currency Ether. Smart contracts, which refer to automatically enforced agreements via the blockchain network is a popular use case of blockchains.

So, given such an intricate and complex cryptocurrency space, what’s the deal with mass adoption? How do bitcoins and altcoins fare compared to fiat currencies and asset classes like gold? Let’s dive into that story via my next article!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Swetha Srinivasan
Swetha Srinivasan

Written by Swetha Srinivasan

A finance and public policy enthusiast, passionate orator, keyboard player and reader who loves dreaming big, working hard and trying out new things.

No responses yet

Write a response