The Ultimate Guide To Understanding Blockchain & Crypto

1 month ago 23
Blockchain 101 | Redfox Security

If you don’t understand what is happening AT ALL, and you’ve just got into the crypto space.

This guide will teach you the main things you need to know, with no prerequisites required.

The concept of blockchain can seem daunting at first, mainly because it's difficult to find explanations that break down what blockchain is for someone who has no prior experience.

Explanations tend to miss out on vital pieces of information, or go into certain parts into too much detail, and just assume you know the rest.

Do not fear, this guide is aimed at individuals who have no prior experience with blockchain or finance. It will provide you with a fundamental understanding of what blockchain is and why it’s so important.

What is a blockchain?

Answer: A database

Okay, so that answer was a bit too simple, but honestly, it’s just a fancy database, where information is not just stored in one place, like Google's servers, it’s stored across multiple different places (decentralized), in fact, all people who participate in the blockchain are their own individual databases.

Decentralized: there is not one central authority controlling the blockchain, it's spread out across multiple places.

When you hear about blockchain, you will come across terminology such as back-end and front-end.

Back-end: the things you don’t see, normally where data is stored, such as servers in warehouses.

Front-end: what you, the USER see, what you interact with. Front end would be Google's webpage or Facebook's website.

Okay, so back to blockchain, what is an easy-to-remember definition?

Well, I personally like Whiteboard’s crypto definition of a blockchain, because it is simple and easy to remember.

Blockchain: a distributed database that maintains a continuously growing list of records, called blocks, which are linked and secured via cryptography.

You may also see other definitions such as:

Blockchain: immutable decentralized ledger that records transactions, through P2P networks (peer to peer) i.e. without the need for a central authority.

So what do these fancy words mean?

Well the reason I like the first definition more, is because it’s simpler and easier to understand.

Blockchains are databases that aren’t stored in one particular place, instead they are distributed. The databases store data, most of the time transactions e.g. Bob sent Jill £5, these transactions are stored in blocks, and once these transactions are verified to be legitimate i.e. we checked and Bob actually did send Jill £5, they are then added to the blockchain through a process called cryptography. Cryptography is just a fancy way of making sure the data can’t be read by me and you, (for privacy and security reasons) instead it jumbles up the data e.g. Bob sent Jill £5, into a random bunch of numbers and letters.

Where are these blockchains stored?

They are stored on the computer of people involved in the blockchain. Participants of a blockchain are known as NODES/ MINERS/VALIDATORS.

Now why would anyone want to participate in a blockchain?

Because you can earn rewards, normally in the form of cryptocurrency, and this cryptocurrency can be extremely valuable and can be converted into real money (fiat currency). So people participate in blockchains because ultimately, they want a chance to make some money. Why else would you do it? lol

How do blockchains work?

Earlier I spoke about how blocks contain data, and I used the example of transactions. Here’s an image to help you visualize the process:

What is a Blockchain? — WhiteboardCrypto

Imagine, each block carries data ( a list of transactions), like a carriage will carry passengers.

Every time a new transaction happens, James sends Steven £10, it's like adding another passenger to the carriage.

Carriage = block

Passengers = transactions inside the block

What is a Blockchain? — WhiteboardCrypto

As you can see, there's the carriage (the block), and the luggage inside is the data, in this case, transactions: N pays W $4, etc

Now, here’s a simplified process of how a blockchain would work:

  1. Transaction initiated e.g. Bob sends Jill £5.
  2. Transaction enters a pool of unconfirmed transactions, this is called a mempool. A mempool is just a waiting area for unconfirmed transactions.
  3. Miners/validators select transactions from the mempool to be added to a new block. Currently, the block is not yet part of the blockchain, it is a singular block, in a transitional state, where it currently contains a bunch of unconfirmed transactions.
  4. The block goes through a verification process through the consensus mechanisms, to verify that all transactions contained within that block are legitimate.
  5. After all the transactions within that block are verified to be legitimate, the singular block is now added to the blockchain, at this point the block is cryptographically linked to the previous block, forming a chain of blocks.

Each block contains a timestamp & transaction data, which cannot be altered without altering all the subsequent blocks, thus creating an indisputable record of transactions, providing transparency and security. It is a digital ledger, with copies being spread out (distributed) around many computers across the world. Each time a transaction happens, every computer participating in the blockchain will contain a ledger that updates. When someone enters a transaction, it gets locked in a block with a unique lock (cryptography), once the block is full, it links to the previous block, forming a chain.

When is a new block added?

Blocks have a limit on the amount of data they can store e.g. Bitcoin’s block size is limited to 1MB of data (2000 transactions), once the block fills up, it is added to the blockchain, but in order to be added to the blockchain, a couple criteria points must first be fulfilled:

  • Transaction verification: transactions within the block must be verified according to the blockchain’s rules (consensus mechanism).
  • Block size limit: block reaches the maximum block size, it can no longer add any more transactions in it, as it is full.

Okay, so if you understand everything so far, the one question you must be asking yourself is, what are consensus mechanisms?

Consensus Mechanisms

Consensus mechanisms are a set of rules and procedures to ensure all participants in the blockchain come to an agreement. i.e. it determines how agreement is reached among all participants when it comes to validating data.

There are many different types: proof of work, proof of stake, delegated proof of stake, proof of authority, proof of space, and proof of burn.

Note: if the consensus mechanism is proof of work you will see participants being referred to as miners, but if the consensus mechanism is proof of stake, participants will be referred to as validators.

miners = proof of work

validators = proof of stake

Types of Consensus Mechanisms

What is a Blockchain? — WhiteboardCrypto

Proof of work: miners solve complex mathematical problems to validate transactions and create new blocks. First miner to solve the complex mathematical problem earns the right to add the block to the blockchain and is rewarded in cryptocurrency.

What is the complex mathematical problem?

The problem is just figuring out which number on the nonce results in the first few digits of the hash being 0000.

A nonce is just a counter, it counts what transaction it is.

Proof of Stake: validators are selected in proportion to the quantity of cryptocurrency they staked in the blockchain. i.e. the amount of cryptocurrency they have contributed to the blockchain. You put cryptocurrency up (stake) to have a chance to be a validator. Validators who validate correctly are rewarded with cryptocurrency. Validators who validate incorrectly are slashed (their stake is reduced/taken away).

How do validators in Proof of Stake, validate transactions?

Validators verify the digital signature of each transaction, to ensure each transaction was sent and signed by the correct person. They do this by checking the signer’s private key matches the public key in which the funds are being sent through cryptographic techniques.

Example:

Alice wants to send 5 tokens to Bob on a blockchain that uses a PoS consensus mechanism. Here's how a validator would check the transaction:

1) Digital signature verification: validator checks Alice’s digital signature using her public key, to ensure she authorized the transaction.

2) Sufficient balance check: validator looks to see if Alice has at least 5 tokens in her account, and enough to cover the transaction fees

3) Nonce verification: validator ensures transaction nonce matches the expected sequence for transactions from Alice. I.e. each transaction has a nonce attached to it, which acts as a counter. For example, if Alice has sent already 3 transactions, the next transaction should have a nonce of 3 (nonce starts from 0, not 1). So if Alice sends Bob $5, and this is her 4th transaction, the nonce attached to this transaction should be 3. The validator checks that this is the correct nonce, ensuring it’s the next transaction in the sequence, thus ensuring that the same transaction isn’t processed more than once i.e. double spending.

4) Compliance with blockchain rules: validator checks transactions match the blockchain standards/rules e.g. correct fields, sizes, etc.

Delegated proof of stake: instead of setting up a validator node yourself, you stake your coins, then use your voting power to delegate the validation process to someone else who has their validator node set up.

Proof of Authority: validation of blocks is handled by TRUSTED, validators based on their reputation (authority), rather than their stake.

Analogy: A teacher wants to keep track of which students complete their homework each day, so instead of checking every piece of homework herself, she appoints trusted students to check the homework.

Proof of Space: validators must prove that they have a certain amount of storage in order to have the chance to become a validator.

Analogy: A library wants to digitize all its books and make them accessible online, and instead of relying on one single company to store all its digital books, the library asks community members to contribute by allocating space on their personal computers to store the digital books. The more storage you provide, the more likely you are to be selected as a validator. Example: Chia.

Proof of Burn: in order to gain the right to be selected as a validator, participants must first demonstrate a long-term commitment to the network's operations through burning/destroying cryptocurrency.

Who maintains the blockchain?

Individuals who choose to participate in maintaining the blockchain through mining, staking, or other operations are known as node operators (nodes).

Nodes are simply computers that:

  • Store the blockchain: hold copies of all blocks.
  • Validate transactions: ensure transactions are legitimate and follow the rules of the blockchain.
  • Maintain network: communicate with one another, updating blocks.

What are blockchain forks?

Forking: change/update in the blockchain protocol.

There are 2 types of forks:

  1. Soft fork: software upgrade that is COMPATIBLE with the older version (backward compatible).

Purpose: Used to bring new features or functions.

Example: Ethereum -> Ethereum 2.0 is an example of a soft fork where Ethereum transitioned from a proof of work consensus mechanism to a proof of stake to improve scalability, security, and sustainability.

2. Hard fork: software upgrade that IS NOT COMPATIBLE with the older version (backward compatible).

All nodes must decide if they want to follow the new rules or stick with the old rules.

The blockchain splits in two: the original blockchain and the new version which follows a new set of rules.

Example: Bitcoin Cash, and Bitcoin Gold evolved out of the original blockchain via a hard fork.

The Blockchain Trilemma

The blockchain trilemma: it is impossible for a blockchain network to simultaneously achieve all three properties of: security, scalability, and decentralization. A blockchain can only excel in two of the areas at one time, at the expense of the third.

Security: ability of blockchain to defend against attacks such as hacks, and ensure all transactions are executed legitimately without fraud.

Scalability: capacity of the blockchain to handle a larger number of transactions and accommodate growth without compromising performance.

Decentralization: distribution of the control and operation of the blockchain.

Examples of blockchain trilemma:

Security vs scalability: increasing the number of transactions per second (scalability) will reduce security as more transactions need to be validated, reducing the time for each transaction to be thoroughly validated, thus increasing vulnerability for attacks.

Scalability vs decentralization: higher transaction speeds require more specialized hardware and only a few companies have such specialized hardware, centralizing the network around these companies.

Decentralization vs security: the more decentralized a network is, the more secure it is, however, it is all more difficult to ensure consistent security protocols across ALL distributed nodes.

Solving the blockchain trilemma

  • Layer 2 solutions: additional layers that help improve scalability by taking the load off the main layer. Think of layer 2 as an extra lane on a motorway to help reduce traffic.
  • Sharding: splitting the blockchain into smaller pieces (shards) that process transactions. Each shard contains its own independent piece of the blockchain.
  • Consensus mechanisms for security purposes.

What is Sharding?

Sharding is when a blockchain is divided into smaller pieces known as shards. These shards allow for parallel processing, which increases the network's capacity to handle transactions and smart contracts.

Instead of each node having to store all the data of the blockchain, instead, they store pieces of each blockchain, saving nodes storage space.

How does Sharding work?

  • Blockchain is divided into smaller pieces (shards).
  • Transactions are processed among various shards, allowing the network to process many transactions in parallel. rather than processing all transactions on a central blockchain.
  • Cross-shard communication protocols are implemented to ensure transactions across multiple shards are executed smoothly and consistently.

How do different blockchains communicate with one another?

There are many different ways in which blockchains achieve interoperability with one another, these include:

  • Atomic swaps: two parties exchange different cryptocurrencies by submitting a transaction to a hashed time lock contract which is a contract that requires a secret key and time limit for confirmation to be successful.
  • Sidechains: separate blockchain that runs in parallel to a main blockchain.
  • Blockchain bridges: protocols designed to connect two different blockchains.
  • Inter-ledger protocols: facilitate the transfer of information across different payment networks.
  • Wrapped tokens: tokens that are ‘wrapped’ to allow them to be used on another blockchain.
  • Oracles: data messengers that feed external data into smart contracts, enabling smart contracts to make decisions in real-time.

Blockchain Key Concepts

The following are key concepts which are essential to have a fundamental understanding of:

Private key: personal secret code, what you use to access your cryptocurrency and sign off transactions.

Public key: your mailbox address, how individuals send you payments.

Layer 2s: protocols built on top of layer 1 blockchains to improve scalability, efficiency, and interoperability. Handle transactions off the main chain by processing transactions on a separate layer. Examples: Lightning network for Bitcoin and Rollups for Ethereum.

The halving: The reward for mining a block is halved every 210,000 blocks.

Gas: the fee you pay for making transactions or executing smart contracts on a blockchain network. It covers the computational energy required to process and validate transactions on the network.

On-Chain: data that is stored and recorded directly ON the blockchain.

Off-chain: data that is handled outside the blockchain.

Cryptocurrency: Commodity or Security?

When dealing with cryptocurrency it is important to be up-to-date with the latest regulatory requirements and topics.

Currently, there is a large debate about whether a cryptocurrency is classified as a security or a commodity.

Let’s take a look at what a commodity and security are defined as in TradFi:

Commodity: a good used in commerce (trade) that is often interchangeable with goods of the same type. Examples: natural resources, and agricultural products.

Security: a financial instrument that represents value. Often signifies ownership in a corporation (stock) or creditor relationship with a governmental body/corporation (bond) or rights to ownership (option).

Current Regulatory Landscape

There are various different players in the crypto industry, therefore there are many different regulatory agencies and different jurisdictions for different players. Examples of different agencies include:

  • FinCEN (financial crimes enforcement network) is the bureau of the Department of the Treasury that is tasked with administering the Bank Secrecy Act which in 2013 published the Guidance, that brought the cryptocurrency industry for the first time under federal regulation.
  • Department of the Treasury (when dealing with money).
  • Securities and Exchange Commission (SEC) when dealing with securities and investments.
  • Commodity Futures Trade Commission (CFTC) deals with commodity futures and commodity derivatives.
  • State regulators on the securities side and money services side.

The appropriate regulator is dependent on the use case of the cryptocurrency. i.e. what the cryptocurrency is used for, will impact the regulatory body for said cryptocurrency.

SEC defines a security via the Howey Test i.e. a security is an investment contract in a common enterprise, with the expectation of profits, dependent on a third party or promoter.

Why is it important if Cryptocurrencies are defined as securities or Commodities?

If a cryptocurrency is a security, then cryptocurrency issuers and exchanges must seek the necessary licenses from their securities regulators, and they run the risk of being fined by the SEC for listing unregulated securities. However, many regulators argue that cryptocurrencies are NOT securities as they do not fit all 4 criteria of the Howey Test as they are not controlled by one central, coordinated group that is responsible for driving up the value of the token. For example, DeFi projects decentralize the development of projects and split up governance with DAOs. Therefore if people are both investors and participate in the growth of the project via staking or becoming validators, or voting in DAO, they are no longer relying on a centralised “third party” to increase the value of the coin/token, that the Howey Test requires.

The CFTC argues that cryptocurrencies such as Bitcoin and Ether are commodities and should be regulated under the Commodity Exchange Act (CEA). This is because Bitcoin, for example, is interchangeable on exchanges, each bitcoin is of identical worth, just like how a sack of corn is of equal worth to another sack of corn of the same grade.

Some lawmakers could decide to treat crypto as its own asset class, with its own unique rules, which is the approach largely taken by the European Union, where the Markets in Crypto Assets (MiCA) regulation sets out the steps to be followed by crypto issuers, wallet providers and exchanges to protect consumers and ensure fair trading.


The Ultimate Guide To Understanding Blockchain & Crypto was originally published in The Dark Side on Medium, where people are continuing the conversation by highlighting and responding to this story.

Read Entire Article