Blockchain Basics - mikebahao/hardhat-tutorial GitHub Wiki

Welcome to the hardhat-tutorial wiki!

Blockchain Design Philosophy

Decentralization

  1. Blockchain is a peer-to-peer distributed system.
  2. Transactions are mainly reflected in transfers.
  3. Transaction data is recorded in public ledger. How to ensure data consistency across different nodes?

consensus

  1. Nodes in distributed networks verify the legality of transactions.
  2. When most nodes on the network verify transactions,the data will be written into their own database.
  3. Mining is a consensus algorithm that solves witch attacks with economic thinking.

The internet for Assets

Security and Decentralization Trade-offs.

  1. Complexity of consensus algorithm:Consensus requires multiple nodes to be verified and communicated,increasing the time and complexity of consensus reaching.
  2. Decentralized Storage:Each node maintains a copy of the entire blockchain,Each transaction needs to be broadcast to the entire network and is verified and stored by most nodes.

Impossible Triangle

  1. Decentralization
  2. Security
  3. Efficiency

Ownership of data is an asset

  1. Decentralized systems are suitable for handling data assets.
  2. Data is stored in a decentralized network,and users have ownership of their own data.

Introduction to Smart Contract

Ethereum's smart contract

  1. Decetralization
  2. Data is transparent
  3. tamper-free
  4. Eliminate counterparty risks.

DeFi:Decentralized Finance

NFT:Non-Fungible Token

DAO:Decentralized Autonomous Organization

Send the first transaction

Ethereum's account type

  1. Hosting Account:coinbase
  2. Self-Hosting Account:metamask

gas fee

  • gas fee = (gas limit)*(gas price)
  • EIP1559(Ethereum Improvement Proposal 1559):gas fee = base fee + max fee +tips