Brew Money | Take control of your crypto - Earn ~6% APY on crypto with self-custody. Withdraw anytime. | Product Hunt

Brew Money

Chapter 3

What is a Blockchain Network?

A Blockchain Network is a peer-to-peer network that maintains a distributed ledger of transactions called Blockchain and enables the execution of different sets of code called smart contracts without any centralized entity. 

How do Blockchain Networks enable transactions without intermediaries?

Step 1: Alice wants to send 1 BTC to Bob on an open blockchain network called Bitcoin. She announces a message to the blockchain network mentioning that the amount of bitcoin in her account should go down by 1 BTC, and that in Bob’s account should increase by the same quantity.
Step 2: The Nodes (validators) in the bitcoin network receive the message from Alice and those from other participants in the network. They batch together the transactions into a block and link the block to the last block added to the blockchain.
A block contains multiple datasets, including initiated transactions submitted for verification. Once the transaction has been verified, it's attached to the end of the block, which is then linked to the next block, which is then linked to the next block, and so on.
Step 3: It takes thousands of participants to agree for a block to be verified and added to the chain. This agreement is a two-step process:
  1. In Proof-of-Work blockchains such as Bitcoin, nodes need to complete a cryptographic puzzle and attach its solution to the block they have created. In Proof-of-Stake blockchains such as Ethereum2, the network randomly selects a node. Malicious actions result in the remaining network participants taking the participant's staked Ethereum and invalidating the block.
  2. The other nodes in the network verify the correctness of the transactions added to the block.
A Block creator is called a miner in Proof-of-work blockchains and a validator in Proof-of-stake networks.
Step 4: In case the blockchain forks, i.e., there are two or more versions of the blockchain with different blocks, the one which is the longest is assumed to be the correct one.

A few fun questions to think about:

How does the network know that it was Alice indeed who sent the message?
This is achieved through public-private key cryptography. To do transactions on a blockchain, one requires a cryptocurrency wallet. Each wallet generates a unique pair of keys for its user: a public key and a private key. The public key as the name suggests, is known to every participant of the network, whereas the private key is a secret and known only to the owner of the wallet.
When Alice broadcasts the message, it is signed with her private key. Other nodes can then use the public key to verify that the message was indeed sent by Alice.
What stops Alice from announcing she’ll be spending 2 BTC when in fact, she only has 1?
Every node maintains a copy of the ledger and can verify that Alice indeed had 1 BTC to send to Bob.
Now, if a block creator tries to game this by adding a fraudulent transaction, other nodes in the network will catch it upon verifying the block. This means that in a Proof-of-work blockchain, the block creator or miner would have spent significant computational energy for no reward. On a Proof-of-stake blockchain, the block creator or validator would actually end up getting penalized from their stake.

Smart contract platforms and blockchain scaling

Blockchain Networks have evolved beyond the use case of digital currencies and transferring economic value in a decentralized way. Newer networks such as Ethereum, Solana, and more provide capabilities to write general-purpose computer programs that can be executed on the blockchain networks.
The demand for blockchain applications is increasing exponentially, leading to scaling challenges. Transactions on the blockchain are slow and expensive.
Today, mainnet chains like Solana, Avalanche, and many others, are trying to solve this through alternative technology approaches. Side chains such as Polygon, Arbitrum, Optimism, zkSync, etc., are building up as a Layer 2 chain on the Ethereum mainnet.
All chains provide different tradeoffs between security, scalability, and decentralization.
Blockchain Networks retain records of time-stamped transactions going back to the founding of the Blockchain. The first broadcast to the Bitcoin network was on January 12, 2009 at 9:00 AM GMT+5:30 from Satoshi Nakamoto to Hal Finney of 50 BTC.

What are Layer 1 & Layer 2 networks?

Layer 1, also called L1, is the main blockchain network. L1s include Ethereum, Solana, etc.
Layer 2, also called L2, is a scaling solution for the main blockchain network. L2s are built to solve the inefficiencies that L1 chains face and offer high throughputs and lower transaction costs without sacrificing network security.
The L2s for Ethereum are:
  1. Rollups are L2 technologies that bundle up multiple off-chain transactions and add them as one on the mainnet. Example: Optimism, and Loopring.
  2. Sidechains are separate blockchains that run independent of the Ethereum blockchain & are connected to the mainnet by a two-way bridge. Example: Polygon.
A bridge between two chains is a technical service that enables transactions between two blockchains. For example, in a one-way bridge, a native asset from blockchain A can be transferred to blockchain B, but the reverse isn’t possible. However, in a two-way bridge, transactions of native assets of blockchain A to B and vice versa are possible.
All chains provide different tradeoffs between security, scalability, and decentralization.