BF2223 Lecture 4

Nanyang Technological University

Singapore

Lecture 3: Blockchain Basics II

  • Course: BF2214/BF2223 FinTech in Investment Management

  • Instructor: Dr. Ernie Teo

Recap: Features of the Bitcoin Blockchain

Distributed Network

  • Transaction verification through group consensus on a distributed network, eliminating reliance on financial institutions like banks.

  • Decentralization mitigates single points of failure within the system.

Proof of Work (Mining)

  • Participation incentivized through Proof of Work, where participants generate bitcoins, reducing the need to trust central authorities to issue money.

Cryptography

  • Utilizes cryptography to chain transactions securely and irreversibly, forming the backbone of blockchain technology.

Recap: Blockchain and Cryptography

  1. Cryptographic Hash

    • Transforms any input into a fixed-size string, operating in a one-directional manner and is hard to reverse.

  2. Public/Private Keypairs and Digital Signatures

    • Public keys serve as Bitcoin addresses; private keys are used for signing and verifying transactions, enabling transaction validation without revealing the private password.

  3. Proof of Work

    • Mining in Bitcoin is a cryptographic puzzle that achieves consensus within the distributed network.

Recap: Blockchain

  • A blockchain sequence consists of blocks holding transaction records, akin to a public ledger.

  • Participating nodes maintain copies of the blockchain (a replicated database), incentivizing nodes to participate in mining.

  • The winning node appends a block to the chain, subsequently replicated by other nodes.

Recap: Blockchain Node

  • A node that solves the cryptographic puzzle wins a new block, contributing to the network.

Human Greed and Blockchain

  • Bitcoin blockchain operates on a trustless philosophy, presuming selfish behaviors among participants.

  • Rewards (i.e., Proof of Work) leverage greed to ensure rule adherence, as modifications to recorded transactions require network consensus.

  • Nodes are deterred from cooperating with malicious nodes as it risks their mining rewards and the value of Bitcoin may decrease in cases of deceit.

Cryptocurrencies

  • Bitcoin serves as the native currency in its blockchain.

  • Various other blockchain networks feature their own currencies (e.g., Ether in Ethereum).

  • Diverse tokens can be created on the blockchain, like ICO tokens, security tokens, NFTs, RWA tokens, stablecoins, and CBDCs.

Benefits Of Blockchain

Decentralization

  • Eliminates reliance on central authorities.

Disintermediation

  • Eliminates mediators from transactions.

Transparency

  • Offers a singular reliable source of truth.

Security and Resiliency

  • The system lacks a single point of failure and is hard to attack.

Trust

  • Transactions gain validity through network consensus.

Immutability

  • Once recorded, transactions are unalterable, maintaining a verifiable audit trail.

Bitcoin Security: The 51% Attack

  • In cryptocurrencies utilizing Proof of Work, the dominant chain, which typically has the most blocks, is considered the valid version of history.

  • Miners with over 50% hashing power can execute double-spend attacks, sending funds to one address on the main chain while simultaneously moving them to another address on a secret chain.

The 51% Attack: Mechanics

  1. A miner may double spend by sending funds to two addresses, building a secret chain without Network awareness.

  2. Once the secret chain surpasses the main chain in block length, it is announced, and miners transition to it, rendering previous transactions invalid.

The 51% Attack Case Studies

  1. Ethereum Classic Attack (Jan 2019)

    • Ethereum Classic became a victim of a 51% attack, resulting in losses of around $1.1 million and led to Coinbase suspending trades during suspicious activities.

  2. Bitcoin Gold Attack (May 2018)

    • Bitcoin Gold also faced a 51% attack, linked to its lower hash rate compared to Bitcoin.

Consensus Mechanisms in Blockchain

General Concept of Consensus

  • Consensus in blockchain refers to the group decision-making process ensuring agreement on ledger entries and maintaining a trustworthy record.

Consensus Protocols

  • Consistency of the distributed ledger and prioritizing peer alignment while eliminating malicious nodes are paramount in consensus protocols.

Types of Consensus Mechanisms

  1. Proof of Work (PoW)

    • Utilized by Bitcoin, mining ensures transaction validity is acceptable to the network, preserving integrity against invalid transactions.

  2. Proof of Stake (PoS)

    • Employed by Ethereum 2.0, validators are randomly selected based on stake, securing the network against malicious actions through financial disincentives.

  3. Byzantine Fault Tolerance (BFT)

    • Systems designed to achieve agreement despite the presence of adversarial nodes must maintain high standards of fault tolerance.

Proof of Work and Proof of Stake Comparison

  • PoW benefits from security through extensive capital requirements for attack, while PoS mitigates costs but introduces concerns regarding the “nothing-at-stake” phenomenon.

  • Ethereum's transition from PoW to PoS indicates a shift towards more energy-efficient and cost-effective consensus protocols.

Conclusion

  • The discussion includes various consensus mechanisms and the evolution of blockchain technology, including potential future trends like tokenization in finance.

robot