This will be about:
Crypto Basics
Bitcoin
Crypto Basics
What is Cryptocurrency
A digital currency that uses cryptographic protocols. A form of digital medium of exchange to facilitate transactions. Cryptocurrency is based on blockchain technology. It is a borderless payment system with irreversible transactions.
Borderless: Sending money overseas is expensive and takes a while.
Irreversible transactions: transactions cannot be canceled or reversed. I'll draw an example of credit card transactions. In case of suspected fraud, we can inform our credit-issued bank regarding the transaction. The bank can then flag and cancel the transaction even if you have performed the transaction. This will be outlined below when I explain the electronic payment network used by financial institutions.
What is Blockchain
Blockchain is a decentralized public ledger that holds financial transaction information. It usually includes information like:
When the transaction occurred (time-stamp)
How much is being transferred (amount of cryptocurrency)
Between which wallet did these transactions occur?
Once the financial data is uploaded onto the public ledger, it cannot be changed. The transaction is irreversible.
How Does Blockchain Work
You know what is blockchain. But how does it work?
Let's say there is 2 person who wanted to transact. Person A wanted to give Person B $50.
When Person A makes a transaction, it is represented by a block. The block is uploaded to the network, to be approved. I am going to use the oldest method to verify transactions - proof of work consensus also known as mining. The network of miners competes to verify transactions. Once the financial transaction is verified, the transaction completes and the block is added to the existing public ledger.
Recall the definition of blockchain? Yeah, it is the decentralized public ledger. Hence, blocks connected together - blockchain... very creative.
Why do we need to waste energy to approve transactions?
This is to prevent the double-spending problem. Double spending simply means sending the same money twice. For instance, when you have $20 cash and you spend it on a coat, you cannot spend the same money again. Digital money like cryptocurrency has to prevent the problem of double-spending. Digital currency can be easily reproduced. It is just a number on the screen, prone to be manipulated or even hacked.
Let's examine how the traditional banking system prevents it. When money is transferred from one bank to another bank, it is not a direct transaction. In the United States, money is moved through the Automated Clearing House (ACH) system. ACH network acts as a financial hub. Our digital transactions look instantaneous, it actually takes 1-2 business days to completely settle. The trusted, third party authorizes the transaction. This means that the financial institution takes the credit risk and ensures transaction occurs, if an issue arises, the financial institution that facilitates the transaction will be liable.
Blockchain combats this by letting their network of computers participate to verify transactions. Instead of a financial transaction settled in 1-2 business days, cryptocurrency transactions can be settled within minutes. The consensus algorithm syncs the network of computers, one such algorithm is proof of work consensus.
Blockchain Projects - Bitcoin
I had to start off the basic issue with the iconic and popular cryptocurrency project - Bitcoin (BTC)!
In the initial whitepaper, Bitcoin is described as a
A Peer-to-Peer Electronic Cash System - Satoshi Nakamoto in Bitcoin Whitepaper
Bitcoin is a form of digital money that has properties of money-like goods. What is considered a money-like good?
Portable: Large amounts of Bitcoin can be stored in a wallet. It can be easily transacted to another user.
Fungible: 1 Bitcoin is equal in value to another bitcoin. For instance, $50 is equivalent to $50 no matter the identifier of the cash.
Scare: There will only be 21 million Bitcoins.
Recognizable: each individual BTC mined has a unique identified,
Divisible: 1 BTC can be divided into two 0.5 BTC or four 0.25 BTC. Fun fact, the smallest unit of Bitcoin is called a Satoshi.
Proof of Work Consensus
Bitcoin uses Proof of Work (PoW) consensus to verify transactions. As explained above, this is to prevent double-spend issues. PoW is inspired by Hashcash.
What is Hashcash?
It is a PoW system to limit email spam and prevent denial-of-service(DOS) attacks. It is a cryptographic protocol. Bitcoin algorithm uses the SHA-256 algorithm, originally developed by the US's National Security Agency (NSA) in 2001. The SHA-256 encryption algorithm is also commonly used by SSL certifications on modern websites.
Why bother to understand the SHA-256 algorithm?
By understanding the SHA-256 algorithm, we can understand the inner workings of the cryptocurrency, and how it uses encryption to give us security and privacy. It also provides an understanding of bitcoin mining.
SHA-256 Encryption Algorithm
SHA-256 takes an input and produced a fixed-length output, this is called a Hash. The specific length of the hash is 32 bytes and displayed in 64 alphanumeric characters.
Encryption is essentially jumbling random characters to obfuscate the real information. Having a fixed-length output means no one can guess how long or short the input is, increasing security.
SHA-256 will always produce the same output when given the same input, this is a one-way function. It is almost impossible to decipher. SHA-256 is computationally efficient than an ordinary computer can perform its computation.
SHA-256 and PoW
In the PoW network, computers race to solve a complicated math problems. How do computers even begin to solve the problem?
It starts with the data available in the block header.
What is a Block Header?
When you send a cryptocurrency the block header will contain information like a version number, timestamp, the hash used in the previous block, the nonce, and the target hash.
Nonce
Short for "number used once". Nonces are generated to modify the result of a function. This is the only value in the block header that is not predetermined. Miners compete to get the appropriate nonce value. When the nonce value plugged into the algorithm generates a hash value that is lower than or equal to the target hash, it is accepted as the solution.
Computers are bashing their heads to get a value of nonce that fits into the puzzle. The miner that successfully got the appropriate nonce value will be given the reward and the block is added to the public ledger - the blockchain.
The computer that finds the solution broadcast to the peer-to-peer network. This proves their work to other machines, other machines then compete to solve the next block. A new problem presents itself, competition between computers begins.
Misconception: BTC is not anonymous!
All bitcoin transactions are stored permanently in the public ledger. Anyone can see the details of the transaction between bitcoin addresses. Bitcoin can be said to be pseudonymous. Unless the Bitcoin address owner is known, no one knows who is transacting with who, just the information of the transactions.
Let's say a user registers a Bitcoin address in a centralized exchange who has a Know Your Customer (KYC) in place. The wallet is tied to their real identity. Bitcoin is not anonymous as people know who owns the wallet address and the financial transaction details!
Extra: BTC and altcoin price trend + What is an altcoin?
The cryptocurrency market is very tight-knit. When the main, popular cryptocurrency such as Bitcoin starts to rise or fall, we can reasonably expect other altcoins to follow it. This correlation relationship can change anytime.
What is an altcoin?
A combination of the work alternative and coin. It usually means cryptocurrencies other than Bitcoin. They use blockchain technology as well. However, with their own specific tweaks and flavors. They don't necessarily follow the mechanics of Bitcoin, but rather build upon or evolve the existing Bitcoin mechanism.
Popular altcoins include Ethereum, Litecoin, Ripple, and more.
Final Notes
There is still a lot of information about Bitcoin that is not covered in this newsletter.
I suggest reading these to gain more information about Bitcoin.
Useful Information:
If you have noticed, I had changed the format from my previous issue. The newsletters will be focused on providing crypto knowledge at the beginning, and then introduce a crypto project that is relevant to the theory (somewhat). Stay tuned for the next one!
If you have any feedback, don't hesitate to reach out to me at comprehend@substack.com. Alternatively, you can comment on comprehend.substack.com!
Thanks for tuning in. Till next Sunday!
Cheers,
Adelene