If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter!

2025/03/2823:31:50 technology 1779
If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Disclaimer: This article is intended to convey more market information and does not constitute any investment advice. The article only represents the author's views and does not represent the official position of MarsBit.

Editor: Remember to follow

Source: MarsBit

Web3 is huge and complex, combining various components, technologies and concepts. Whether you are new to Web3, blockchain and cryptocurrencies or veterans, through this article, you will receive a high-level overview of the various components that support Web3, allowing you to understand the purpose and benefits of each component. Specifically, the purpose of this series is:

1. Provide an overview of the basic components of Web3

2. Evaluate the purpose of various components

We define Web3 as the sub-iteration of the Internet , combining what we love in today's Internet with verifiable digital ownership, open systems, transparency and immutability. Web3, blockchain and encryption are three closely related topics, but will be regarded as three separate terms in this article.

· Blockchain: A technological innovation that can achieve verifiable digital ownership, transparency and immutability

· Crypto: The abbreviation of cryptocurrency , describing the tokens for crypto-security on the blockchain network

· Web3: Including blockchain, cryptocurrency, and all ecosystems and innovations built on them

To understand Web3, we must first understand the basic blockchain and encryption technologies. While Web3 is still a relatively young concept, with Bitcoin launching only in 2009, the industry is growing rapidly as new technological innovations enter the market at a crazy pace.

I hope this series will help you dig deeper into Web3 and help you find areas of interest that you can study on your own outside of this series. In each topic, dozens of more in-depth links to supplemental materials can be found to help guide you to find useful content. The

series is divided into three parts, and the first part you are in covers everything from the Web3 node infrastructure to how the layer 1 blockchain network works. The next article will introduce layer 2. Interoperability and the huge dApp ecosystem built on the primitives outlined in this article. Finally, the last piece will cover off-chain environment and on-chain/off-chain communication.

Web3 Infrastructure Overview

We divide the Web3 infrastructure into multiple parts, reflecting the on-chain ecosystem, the off-chain environment that supports the on-chain ecosystem, and the middleware that connects decentralized networks to each other and allows these networks to connect with the off-chain environment.

· On-chain ecosystem

o Node layer: mining/verification node, node client software, mining/blocking pool

o Network layer:

§ Layer 1 network: single network, modular network, consensus (PoW, PoS), shared ledger technology, virtual machine compatibility with EVM, smart contracts and ERC token standards

§ Layer 2 network: Lightning network, optimistic rollup, zero-knowledge rollup3

o Decentralized application (dApp) layer

· Off-chain environment : analysis, audit and security, wallet, centralized exchange (CEX), developer tools (framework, IDE), decentralized cloud (storage, computing, index ).

· Interoperability layer ("middleware") :

o Network interoperability: chain bridge, atomic swap

o On-chain/off-chain communication tools. Blockchain API, Oracle

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Web3 Ecosystem Map

On-chain Ecosystem

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Divide the node layer highlighted Web3 ecosystem map

on-chain Ecosystem

· Decentralized Application (dApp) layer

· Network layer

· Node layer

· Node layer

, realizing the most famous ecosystem and application in Web3 driven by smart contracts. We start from the node layer and look at the ecosystem on the chain, and then all the way to the dApp layer.

node layer

This layer is also often called the hardware layer, because at this layer, everything related to operating hardware to participate in a specific blockchain network is set up.

node client

node is a server that runs a network-specific software called a client. It allows nodes to participate in the network's block creation process, allows access to the historical data of the entire blockchain, and allows execution of the RPCh command (more introduction in the Layer1 section). RPC refers to remote program calls, which allows nodes to call and execute certain commands.

When writing this article, the two largest blockchain networks are Bitcoin and Ethereum . While there are different requirements for participating in each network, they all require a server (any computer) that meets the customer's hardware specifications, an internet connection, and client software. For Bitcoin, the most popular client software is Bitcoin Core, while for Ethereum, the most popular client is GETH (Go Ethereum) .

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Bitcoin Core client and GETH client. System requirements

client also compiles the rules of the blockchain and ensures that any new block that is verified complies with the same rules. This is important because if a node verifies a block that other nodes do not accept, the network will fork : one set of nodes follows one set of rules, while the rest follows another set of rules. While they may share the same history, at the moment different validation rules are introduced, a new chain is created and accepted only by nodes that accept the new rules.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

A blockchain and a forked chain share the same block history

Although the above are the most popular clients, they are not the only client that can be used to participate in the blockchain network. As long as other clients use the same verification rules, they can verify the block and contribute to the blockchain.

· Bitcoin Client

· Ethereum Client

To read more about how blockchain works, please skip to Layer 1 Network section .

node infrastructure provider

usually encourages ordinary users to run their own nodes to support the decentralization of public networks. When more users run their own nodes, the chances of a single actor accumulating most of the running nodes and attacking the network are reduced. Users are encouraged to run their own nodes through block rewards and transaction fees , and the network allocates these fees to node operators.

Despite these incentives, there are many reasons why users are reluctant to build nodes by themselves: complex technical settings, limited early funds for purchasing necessary hardware, or just temporary need for nodes. This is the role of node infrastructure suppliers. These vendors are responsible for the setup and operation of nodes and provide end-to-end services to customers. A often overlooked purpose of some large vendors specializing in node infrastructure include Blockdaemon and Atlashml14.

. One of the most overlooked purposes of these node infrastructure providers is to build nodes for new blockchain projects that have not yet established a strong, decentralized node network. These newer networks can leverage node infrastructure providers to launch a global distributed network without the need to build their own infrastructure in each country.

mining pool and staking provider

node infrastructure providers set up nodes for customers, while mining pools and staking providers operate their own nodes, but allow users to pool resources under their nodes. This increases the likelihood that nodes can receive block rewards and transaction fee income from the network. For users who want to put their idle hardware into use, this means they can join a mining pool without any complex technical setup and start earning revenue with their existing resources.

There are some nuances in the network node operation of different consensus mechanisms . Basically, the network using proof of work brings together computing resources, while the network of proof of stake brings together network tokens. For the proof of work network, mining pools greatly reduce the technical threshold for entry, while for the proof of stake network, staking providers greatly reduce the financial threshold for entry (the minimum required staking).More details will be introduced in the consensus section .

Some of the largest mining pools include Foundry USA and F2POOL, while some of the largest staking providers include Lido and Rocketpool.

Node Layer Summary

Web3 The node layer consists of thousands of globally distributed nodes, each node belonging to a specific network runs the client software required for that network. As long as the verification rules of the client software are the same as other nodes on the network, the node can operate normally without causing a fork in the blockchain.

Although anyone can run their own nodes on a decentralized public chain network, node infrastructure providers are specifically responsible for setting up and operating the hardware required to run the nodes and start the network.

Finally, the behavior of mining pools and staking suppliers lowers the entry threshold for mining and staking business. This allows users to participate in mining and staking activities to earn online rewards without having to meet all network requirements.

network layer

blockchain network is built on the above node infrastructure. network layer consists of various parts, including various technologies, the basic layer is the layer 1 network, the layer 2 network and the interoperability layer that communicates between these networks.

Layer 1 Network

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Web3 ecosystem map that highlights the network layer

Bitcoin, Ethereum and Solana are probably the most well-known Layer 1 network at the time of writing. The Layer 1 network refers to the main network for settlement transactions in the Web3 ecosystem. The Layer 2 network exists as a deeper layer of the Layer 1 network, and transactions can be downgraded to the Layer 2 network (more on this in my next post). Although very different in architecture, they all rely on a similar set of architectural primitives.

· They all have a shared ledger that tracks transactions on the network

· They all use mechanisms to achieve consensus with which transactions and blocks are considered valid

· They all have a way to calculate commands sent to the network (virtual machines with Ethereum, Solana and other EVM-compatible chains, and Bitcoin Script for the Bitcoin network)

· In the following chapters, we will study these three elements separately and analyze how we go from transactions to blockchain.

Shared ledger

All decentralized blockchain networks have a shared ledger. In fact, blockchain is the shared ledger. Let's take a step back: the ledger is a record of the economic activity of a company that tracks the transfer of money or the transfer of ownership of assets. The term shared ledger means that the ledger is not held and managed by a single entity, but is held and managed by many entities.

In a decentralized blockchain network, the blockchain (the ledger for all active on the network) is saved on all nodes on the network. If the active ledger is managed and stored only by a centralized institution, we will encounter the following challenges.

· Review and exclusion ( see user banned by PayPal platform)

· Record the malfeasance of the administrator ( see Luckin Coffee False financial data )

· Loss of records ( see Alexander Library Destruction )

If the ledger is stored on hundreds or even thousands of nodes around the world, we will get a system that is difficult to be deliberately and unintentionally tampered with or destroyed. If a node falls down, there are many other nodes that the user can connect to and continue to interact with the ledger.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

The impact of node failures in centralized and non-centralized systems

However, this system does present other challenges: how do nodes on the network agree on what is the correct or valid account entries? This is the role of consensus algorithm.

Consensus

In a blockchain network, the term consensus refers to a general protocol between nodes on the network regarding which ledger entries (transactions and blocks) are valid and accepted by nodes.

In academia, this problem is called Byzantine General Problem .This question describes a situation where a system actor must reach strategic agreement to avoid catastrophic failures, but some actors in the system are unreliable.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Byzantine General Problem

In this hypothetical scenario, there are three actors who must coordinate their next move in the Byzantine War to avoid being compromised by the enemy. One of the three actors is malicious and forwards inconsistent information to the rest of the parties. How do honest (non-malice) actors in the system know who to believe? Or to put it another way: how can all actors in the system reach consensus on which message to accept ? The problem of

is of great significance because as more actors enter the system, the complexity of (error) communication will multiply.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

As participants increase, the complexity of Byzantine Generals’ problems rises exponentially

The first system to successfully solve this challenge globally is the Bitcoin network and its proof-of-work algorithm.

Proof of Work (PoW)

Bitcoin network's proof of work algorithm (also known as PoW) solves the problem of Byzantine general, requiring that any information must be verified in some way before it can be accepted by the node. Any information that has not been verified is not accepted as valid information and is rejected by the node.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Description Bitcoin network work Proof of consensus algorithm flow chart

verification process also requires computing resources, which makes forged verification extremely difficult. This is also the origin of the term "proof of work": "Prove to me that you have done the necessary work and let me accept your message."

allows us to dig deeper into the mechanisms of transactions, blocks and PoW processes from theory to practice. Don't worry - we will guarantee it to be easy to understand!

Block structure

Bitcoin block is a place where transactions are stored and is a carefully controlled unit of information. Once the encryption puzzle is completed, it will be broadcast throughout the network.

A block of the Bitcoin network consists of two main parts.

· Block header

· Transaction list

Transaction list just like it sounds: it is a transaction list received by a node and included in a block. In the Bitcoin network, transactions are Bitcoin transfers on the Bitcoin network (note: Bitcoin starting with lower case b in English refers to Bitcoin assets, while Bitcoin starting with upper case B refers to Bitcoin network). The Bitcoin network is a shared public ledger that tracks the flow of Bitcoin assets; therefore, transactions on the Bitcoin network are the transfer of Bitcoin between addresses.

Bitcoin uses unspent transaction output, also known as UTXO for transactions. Transactions and UTXO will be further introduced in the UTXO model and account model section. The

block header is where things start to get interesting. Although the number of transactions and the transfer amount per transaction varies by block, the block header element is the same for each transaction. Analysis of the Bitcoin Block

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Although the block header includes many elements, each element is crucial to the system. For the purpose of the introduction, we will introduce the following in detail.

· Hash value of the previous block header: All elements of the previous block are hashed

· Difficulty goal: determine the number of "leading zeros", thereby determining the difficulty of mining

· Nonce: an arbitrary number [nonce is the abbreviation of "nonsense"]

· Merkle root: hash output of all transactions in this block

From block to blockchain

Before we continue, we need to briefly introduce the hash algorithm (hashing) . Hashing is the process of converting a string of characters into another value of usually fixed length. When a hash algorithm is deterministic, it means that under the same input, the output is the same every time. However, if one character of the original string changes, the output of the hash will change completely, so that the relationship with the original string cannot be deduced. Please see the comparison of the output of Bitcoin and bitcoin SHA256 hash algorithm below.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

SHA256 The output and byte length of hashing algorithm

In the Bitcoin network, once a block is mined, the header of the block will be hashed and included as an input in the next block. Because the hash value of the previous title of each block is included in the next block, a chain composed of blocks is formed: this is the blockchain.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

blocks chained with the hash value of the previous block header

any changes in any block will destroy this chain, because the hash output already included in the next block will be different from the new hash output. Therefore, such changes will be rejected by nodes on the network.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

chain breaks due to adjustment of transactions

Merkle Root

Merkle tree is a data structure in which elements in the data structure are hashed and rehashed until only one element is left. The last remaining elements are Merkle Root.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Merkle Tree and Merkle Root

Merkle tree have an interesting mathematical feature, that is, mathematically, if only Merkle root and one element are provided, it can be proved that this element is part of the Merkle tree.

In the Bitcoin network, the Merkle root stored in the block header is the recursive hash output of all transactions contained in the block. This means that if any transaction is adjusted, Merkle root will also change, which will also change the hash output of the entire block header. This will again result in invalidation of the block.

"Work" in proof of work

We know what is a hashing algorithm, how blocks are structured and how blocks are chained and formed a blockchain. Now we can finally understand more deeply how proof of work actually works. Going back to the Byzantine General’s question, the verification information mentioned above is actually a block in the blockchain.

In order for a block to be verified, a hash value that meets specific criteria needs to be found. Remember that just one bit change will greatly change the output of the hash value? This is exactly how the Bitcoin network's PoW algorithm finds the target hash: Nonce is an arbitrary number that is adjusted to change the hash output of the block header. If the hash output does not match the target hash value, nonce will be adjusted again. This process is repeated until the hash value of the block header meets the target condition. Once the target condition is met, the block header is verified, and the block will be broadcast to other nodes on the network, allowing them to attach new blocks to their blockchain copy.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Proof of Work Block Finding Algorithm Description of

target condition, or expected hash value, is defined by how many leading zeros it has. If the generated hash value has enough leading zeros, that is, the work of finding a hash value that meets the target condition has been completed, the nodes on the network accept the block as valid: the block is considered "mined".

To better understand this process, please visit this hash algorithm simulator on Github. Enter the character "bitcoin" and add a number at the end, starting at 0 and increasing in increments of 1 until a leading zero is reached (e.g. bitcoin0, bitcoin1, etc.). You will notice that in order to find a leading zero, i.e. the first character of the hash value is zero, you just need to increase the number to 3 ("bitcoin3"). Now try to find two leading zeros. Spoiler: The first hash result with two leading zeros is "bitcoin230".

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Proof of Work Algorithm: Searching for leading zeros

has more rules that require nodes to follow, such as the longest chain is always valid (preventing the entire blockchain from being overwritten), the mined block must have a timestamp within a certain threshold of network time (so that the latest block will not be overwritten), and there is also a complex mechanism around how to determine the network difficulty (the number of leading zeros of the target hash). Interested readers can browse Bitcoin.org or Bitcoin Wiki for more details.

paradigm transformation

the above mechanism has allowed transactions to be independently confirmed and verified for the first time in history without the need for third parties to witness and approve transactions. Rather than submitting transactions to banks that are challenged by centralization, send them to a separate network of nodes that can handle transactions autonomously without intervention. This shift in technical paradigm and re-understanding of ledgers are the basic elements on which the Web3 ecosystem is built today.

In addition, since the only requirement for joining these networks is the computing device and Internet connection that can run node software, anyone can join the network as an independent node to enhance the dispersion of the network.

criticism

Although PoW networks like Bitcoin network have many nodes (according to bitnodes.io, as of September 15, 2022, there were nearly 15,000 nodes), some people criticized that due to the high competition on the network, the entry threshold for a single node is too high. The more hashing power (i.e., computing resources) a node has, the more likely it is to solve the hashing problem first, because it can perform more computations at a faster speed than other nodes on the network. Entering the Bitcoin network as a single node with a low hash value will result in energy costs, and the opportunity to be the first to successfully mine a new block is almost non-existent.

energy consumption is also a controversial topic: the network requires a lot of energy , and some estimates point out that the annual energy consumption of the Bitcoin network exceeds Norwegian .

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Bitcoin estimated annual energy consumption. Source: Cambridge BECI

These energy is wasted on nodes to perform millions of hash calculations per second, looking for hash. While this increases the security of the Bitcoin network, it does raise the question of whether there is any less wasted ways to validate blocks. This is the origin of proof of equity.

Proof of Stake (PoS)

In the proof of stake, the node is given permission to verify a block based on its pledge in the network. This is a fundamentally different approach from PoW, greatly reducing the computing power required for verification. Nodes provide computing power, instead use their local network tokens as collateral in exchange for an opportunity to verify the block. This essentially eliminates competition-based computing and increases the distribution of nodes that can successfully verify the block.

merged Ethereum is a proof of stake network. It requires 32 ETHs to be staked to become a validator. After that, the node can participate in block verification, thereby contributing to the network to add new blocks. pledge refers to locking tokens and is the basis of the PoS network. In addition to the high upfront expenses for becoming a validator, the PoS network also adopts other methods to prevent malicious actors from disrupting the network. Generally speaking, PoS networks also require multiple nodes to verify the same block at the same time, which reduces the possibility of one node verifying errors or malicious blocks. In addition, if a node is found to have malicious behavior, their rights can be cut off by . This means that the number of network tokens they lock in the protocol is removed from the node and transferred to a temporary address or burned. burning for tokens refers to permanently removing tokens from circulation by sending them to addresses that no one can access on the network. In the Ethereum network, this is null address .

Other consensus mechanisms

In addition to Proof of Work (PoW) and Proof of Stake (PoS), there are many consensus mechanisms designed for specific networks with specific purpose. Below is a list of incomplete popular consensus mechanisms.

·Delegated Proof-of-Stage (DPoS)

·Proof-of-Authority, PoA)

·Proof-of-Activity, PoA)

·Brun Proof (PoB)

·Proof-of-Spacetime (PoSt)

·History (Proof-of-History, PoH)

· Practical Byzantine Fault Tolerance (pBFT) Consensus [Practical Byzantine Fault Tolerance (pBFT) Consensus]

Shared ledger - Accounting system (Comparison of UTXO and Account Model)

As mentioned earlier, blockchain encrypts and connects data blocks to each other through a hashing algorithm to form an ledger. This ledger is saved on thousands of nodes throughout the network, making the ledger "shared" among these networks. Any ledger, whether it is a shared blockchain ledger or a traditional accounting ledger, requires accounting. Bookkeeping refers to how transactions are accepted, executed and new balances are stored on the blockchain. In Web3, there are two main accounting models.

·Unconsumed transaction output (UTXO) model (such as Bitcoin network)

·Account model (such as Ethereum network)

To help understand these different accounting models, it is helpful to treat blockchain as state machine . state machine is a system that stores its state, and its state can be changed according to input to the device. This means that at any given point in time, the system is in a state that changes with any input to the system, such as through transactions. When input is provided to the system and the state changes, the system undergoes an state transition .

If we look at the blockchain from the perspective of a state machine, this means that at any given point in time, the blockchain system is in the n state, and any block added to the blockchain will result in a state transition and a new state of n+1. This new state of n+1 takes into account all transactions added to the new block, resulting in a new system state.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

State changes caused by blockchain and transactions

Unconsumable transaction output (UTXO) model

UTXO model and account model are the differences between how to record—or record transactions—the processing.

Simply put, in the UTXO model, there is no such thing as account balance. Instead, each transaction is a receipt indicating who sent who paid whom how much money. This is the origin of the name that is not consumed by , because the balance that users can transfer is how much of the previous transactions they have not spent.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

UTXO model working schematic diagram

When the user wants to send bitcoins, all bitcoins in the selected UTXO become transaction input (see UTXO0 above). A new UTXO is created with the number to be sent (see UTXO2 above). If UTXO holds more bitcoins than the bitcoins to be sent, the remaining bitcoins will be sent back to the user as a new UTXO (there are 0.5 bitcoins in the figure above, but 2.0 are held in UTXO0, so UTXO2 contains 0.5 to be sent, and UTX03 contains 1.5 to be sent).

This also implements an interesting feature: Due to the UTXO model, the source of each native token can be traced back to its creation, because each transaction output must have a corresponding input. For a Bitcoin network using the UTXO model, this means that each Bitcoin can be traced back to the block it was mined. Therefore, the concept of balance does not exist in the UTXO model. Instead, the balance is a summary of all transaction receipts in the network.

Every transaction on the network defines exactly how much Bitcoin is obtained from the input of which transaction. The system then verifies whether the transaction input is not used, whether the sender has the authority to send Bitcoin, and whether the receiver meets the correct parameters for receiving Bitcoin. Therefore, the UTXO model can be considered as an verification system . Although

is not included in the previous example, the transaction fee handed over to the miner is also deducted as part of the transaction.UTXO3 is not 1.5 coins, but maybe 1.499 coins, the difference is the transaction fee.

account model

account model is closer to the digital representation of traditional bank accounts. In each state transition, a collection of all accounts and balances is stored, rather than the account balance must be calculated based on a set of receipts, as in the UTXO model. In order to start a state transition, a transaction needs to be initiated to instruct the system to change the balance. Then, the system calculates the change in the balance of each account in , and in the next state, the new balance set is stored. How the

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Account model works Description

In the UTXO system, each transaction input (UTXO received from previous transactions) is individually verified and must be greater than the output, while in the account model, the account balance must be greater than the transaction output. This means that in a UTXO system, multiple UTXOs can be combined and verified separately to create one or more transaction outputs, while in the account model, only the balance needs to be verified.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

If you use multiple UTXO as input and how the UTXO model works

More information about UTXO model vs. account model, I strongly recommend reading Horizen.io on this question .

virtual machine (VM), smart contracts and Turing completeness

virtual machine is a computer-simulating software. It replaces physical devices, and all physical components of a virtual computer run as software in another system. For example, a Windows virtual machine can run on MacOS, allowing the entire Windows system to run within MacOS. The physical components of Windows virtual machines are simulated by software, so the Windows system does not know about it. The concept of

also applies to blockchain networks: a separate virtual machine component exists with a shared ledger, which allows computing tasks to be executed. This means that in addition to the shared ledger that stores balances (account model) or balance changes (UTXO model), there is a separate computing component to calculate balances. This computing component can also be used for more complex logic beyond simple balance calculations. This is why it paves the way for smart contract - it will be introduced in detail later. The first such system to be widely successful is the Ethereum Virtual Machine (EVM) .

Bitcoin Script can also be considered a virtual machine because it is a computing component of the Bitcoin network, which nodes use to verify UTXO and execute transactions. However, Bitcoin scripts are quite limited and cannot run complex logic like EVM.

Ethereum Virtual Machine (EVM)

EVM is a software that simulates a specific computer system and runs on an Ethereum node. The main purpose of EVM is to calculate the world state of the Ethereum network and run smart contracts. EVM innovation lies in two aspects:

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews. EVM implements decentralized computing in the state of the world, including computing logic for executing somewhat complex smart contracts

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews. EVM is able to execute code independently and without trust on a decentralized blockchain network (smart contract)

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

A blockchain and a virtual machine (VM)

When a network claims "EVM-compatible ", this means that the network can deploy and execute smart contracts written for Ethereum virtual machines. EVM is the most popular virtual machine and has become the de facto standard for smart contract computing in Web3. Having EVM compatibility allows newer networks to bootstrap their ecosystem by making projects easier to port to their network. This standardization also makes token bridge between networks easier, as both networks can run the same code.

A deep dive into a fantastic self-explanation of the EVM architecture, I guide readers to takenobu T.'s ( has become obsolete as the "merger" marks the transition from PoW to PoS on September 15, 2022. The PoW aspect of this speech is already outdated ).

smart contract

A smart contract is a program stored in a decentralized network. When specific conditions are met, it can be executed independently by the virtual machine.These conditions may refer to any condition that is activated when a particular event occurs on the network or when a user interacts with a smart contract. The complex computing power of smart contracts also enables the creation of ERC-20 tokens and NFT (non-fungible tokens).

smart contracts and EVMs are what drives the industry to transcend blockchain and encryption and implement the concept of Web3: Because of these innovations, it is possible to have composable applications that run autonomously on non-censored decentralized networks. The combination of these innovations is the origin of Web3’s huge dApp ecosystem.

dApp is a decentralized application that uses a combination of smart contracts and is usually an easy-to-access network-based front-end to enable interaction with the blockchain network. The smart contracts of dApp can also be accessed directly through nodes, but the network-based front-end greatly reduces access barriers. Today, the most well-known dApp is probably Uniswap.

Solidity language, Rust language and Bitcoin Script

Solidity. It is the most commonly used smart contract programming language on the Ethereum blockchain. Developers use Solidity to encode their smart contracts, compile them into bytecode, and then deploy the bytecode to the network. Solidity is an object-oriented and statically typing programming language, built on C++, Python, and JavaScript.

Rust is one of the most popular smart contract programming languages ​​on the Solana, Polkadot and NEAR chains. Rust is a low-level static type programming language known for its speed, efficiency, and design best practices. Although it is a younger language, it has been rated as the most popular programming language by StackOverflow for two consecutive years in 2020 and 2021. Just like Solidity, the code is compiled and the bytecode is deployed on various networks.

As long as the code can be compiled into bytecodes that can be read and interpreted by the network, block links are subject to various programming languages. This also applies to the Bitcoin network, whose main scripting language is Bitcoin Script. The difference between Bitcoin Script and Solidity/Rust is that Bitcoin Script is not actually a programming language, but a scripting system for transactions. In the Bitcoin network, scripts are a list of instructions recorded with each transaction, which describes how the next person who wants to spend the transferred Bitcoins gets them. Remember that UTXO is an unused transaction output; therefore, each output can have accompanying requirements that need to be met before the output can be allowed to become the input to another transaction.

Turing Completeness

From the perspective of Turing Completeness, the difference between Solidity/Rust and Bitcoin Script has become clearer. Turing completeness refers to the concept of an abstract machine (Turing machine): given infinite time and computing resources, it can compute any problem as long as the problem can be encoded or logically constructed.

's more complex logic problems require the use of conditional statements and loops, which Solidity and Rust are supported as complete programming languages. However, Bitcoin Script does not support these. This is because the Bitcoin network does not allow complex computing, but instead relies on a rather simple instruction set that works around the idea of ​​transactions (no smart contracts). While this makes the Bitcoin network less prone to errors and arguably safer, it does limit its programmability.

Ethereum, Solana and Polkadot can be considered quasi-Turing complete. Although they are able to perform complex calculations due to the existence of Solidity and Rust, and theoretically solve any logical problem with enough time, they are limited by gas fee. Gas fee is the fee charged by the network to perform any computing tasks. While time and computing resources can theoretically be infinite, the number of native network tokens may not be. Therefore, although these networks are Turing-complete in theory, in practice they can only be considered quasi-Turing-complete at best.

The difference between Turing completeness and non-Turing completeness is very important for better understanding of the ability to and what can be built on the network.There are more nuances in Turing machine and Turing completeness. Interested readers can read more in here .

From EIP to ERC

ERCh (Ethereum Request for Comment) refers to the technical coding standards used in the Ethereum blockchain. The ERC stipulates some of the rules and actions that Ethereum smart contracts must follow, and how to implement them.

However, ERC is already a conventional standard and has been included in the Ethereum documentation that the developer agrees to use. Before an ERC became an ERC, it started as an EIP (Ethereum Improvement Proposal). EIP is essentially a very detailed forum post where users can argue, discuss and vote on changes in the Ethereum blockchain and ecosystem.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Process from EIP to ERC

This system is widely used throughout the Web3 ecosystem, from the network (for example, Bitcoin uses BIP—Bitcoin Improvement Proposals) to dApps (for example, AAVE uses AIPS—AAVE Improvement Proposals).

ERC Token Standard

ERC-based tokens are built on the Ethereum network, but they are technically different from Ethereum tokens, which are native tokens for the Ethereum network. Ethereum tokens are defined as part of the network and are the underlying “currency” of the network that pays for transactions and smart contract execution in the form of gas fees, while ERC-based tokens are defined in smart contracts. The

ERC standard smart contract defines all parameters and all behaviors of the token and can be viewed online using etherscan.io or any other EVM-compatible network block explorer. Block Explorer is a tool that allows you to view real-time and historical information stored on the blockchain. Due to this standardization, the behavior of ERC-based tokens is predictable, allowing dApps and other smart contracts to interact with any smart contract that uses these standards.

Next, we will introduce the ERC-20, ERC-721, ERC-1155 and ERC-4626 standards. The first three standards involve the creation of homogeneous and non-homogeneous digital assets that survive on the blockchain, while the ERC-4626 standard specifies the profit function applied to the ERC-20.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

ERC-20, ERC-721 and ERC-1155 token standards and their homogeneity

ERC-20 tokens (homogeneous tokens)

ERC-20 is a homogeneous token standard. Homogeneity means that one asset can be swapped with the other, while two assets cannot be distinguished from each other. For example, a dollar bill is homogenized because it can be exchanged with any other dollar bill. The

ERC-20 standard allows the creation of homogeneous tokens on EVM-compatible networks. Curve tokens (CRV), Uniswap tokens (UNI) or AAVE tokens (AAVE) are examples of homogenized tokens, but the digital tokens of fiat currencies are also ERC-20, such as USDTh or USDC, which are pegged to the US dollar.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

ERC-20 token is a homogeneous token

ERC-721 token (non-fungible token)

ERC-721 standard defines non-fungible tokens (NFT). What makes NFT unique is its name: tokens are non-forgery, which means that each token is unique. NFT is an exciting development because the content of each NFT can be anything the creator wants, from personal photos to deeds for real estate or any other certificate. NFTs implement publicly verifiable digital ownership of any physical or unique digital asset.

popular NFTs include Cryptopunks, Bored Ape Yacht Club and Ethereum Name Service (ENS) .

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

ERC-721 (NFT) is a non-fungible token

ERC-1155 (Multi-Token)

ERC-1155 is the so-called "multi-Token": they combine ERC-20 (homogeneous token) and Functions of ERC-721 (non-fungible tokens).This means that in addition to implementing new use cases through multiple “unique” homogeneous assets such as a sword in the game (non-fungible) and 100 supplies (homogeneous), multiple token types can also be managed in a single smart contract.

merges these features into a smart contract, which can make smart contracts create efficiency in the space used in EVM. This also creates simplicity for larger and more complex projects, as multiple sets of tokens can be managed from a single smart contract.

The popular ERC-1155 includes ENJIN NFT, which uses ERC-1155 to track assets in a few blockchain-based games, as well as ticketing applications that may require the creation of a large number of unique asset sets as part of a contract. Examples of projects using ERC-1155 include The Sandbox Metaverse, Fanz, and Azure Heroes.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

ERC-1155 Tokens combine the functions of homogenized tokens and non-homogenized tokens

ERC-4626 (The Vault Standard)

ERC-4626 to standardize the token vault. A vault is a profitable smart contract that accepts deposits from ERC-20 tokens and provides depositors with a token reward (earnings) of another token. It is essentially a multi-signature asset management smart contract that generates tokens as a form of a deposit reward, and can later be redeemed for tokens initially deposited in the vault.

For example, xSushi is a profitable token that can be exchanged for SUSHI token (the governance token of SushiSwap dAppp), which basically represents the user's share of revenue activities generated in the Sushi DeFi protocol.

This token standard enables developers to accept any ERC-20 token without having to manually integrate each token and consider their specific design decisions. This reduces the risk of encoding errors that may lead to asset losses.

Yearn V3 is the first major protocol to use the ERC-4626 standard. Protocols such as Balancer and Rari Capital have also begun to implement the standard .

Blockchain vs. Directed Acyclic Graph (DAG)

Directed Acyclic Graph (DAG) is a different approach to data structures, and some projects use it as an alternative to blockchain shared ledger structure. Transactions on the blockchain are included in the block, which are verified and chained in chronological order. The blockchain is copied to all nodes on the network.

In DAG, transactions are verified one by one, and each transaction is associated with the next transaction. To verify a transaction, two other transactions determined by the network must also be verified. This leads to a network-like structure that can be easily scaled and allows parallel computing of transactions, which can greatly increase throughput speed. Since verifying transactions is very direct, miners play a very small role in this system: any user who interacts with the network can verify transactions from other users, which greatly reduces transaction costs.

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

Blockchain Vs. DAG

Directed Acyclic Graph describes this structure well:

· Directed: The data structure can only move in one direction (add new data)

· Acyclic: When moving along the -directed path between data points, it is impossible to encounter the previous data point (non-ring)

· graph : A nonlinear data structure composed of nodes/vertices and edges (connections between nodes)

Although this structure brings benefits in terms of transaction throughput, verification speed and transaction cost, DAG faces completely different challenges. While in theory this system allows for powerful decentralization, the reduction in transactions will theoretically lead to a reduction in cybersecurity: fewer transactions mean fewer random validators, which increases the possibility that a single validator or a group of validators controls most transactions. If an entity controls most of the network activity, it becomes easier to bring malicious activity into the network.

To address the above challenges, DAG-based networks have turned to centralized solutions: implementing central coordinators, providing routes to transactions to be verified, controlling "witness" validators with higher authority, or directly privatizing the verification network.

Despite these challenges, the DAG network fills an important gap in the Web3 ecosystem: they are slightly more centralized, high-throughput networks that manage heavy transaction loads, and more use cases will be found as mainstream Web3 applications progress.

Monolithic and modular blockchain

decentralized networks are complex systems composed of various components that interoperate with each other to create a trustless and unchangeable network. Networks such as Bitcoin, Ethereum, Solana, Polkadot, and NEAR are all considered monolithic blockchain —they are all “formed by monolithic” networks, and any change in a component requires updates to the entire network. modular blockchain takes out these different components and lets them be replaced with other components.

modular blockchain system includes:

· Execution layer: transaction execution and smart contract

· Settlement layer: transaction verification, transaction settlement

· Consensus layer: consensus mechanism

· Data availability: shared ledger

If you want to be the first readers when the second part is released, or want to have a very firm and thorough view of recent events in Web3, subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter! - DayDayNews

monolithic blockchain and modular blockchain. Adapted from: Celestia website

By splitting the system into multiple components, each component can be optimized to improve the efficiency and security of each component. Layer 2 will be introduced in detail in the next part of this series, which can be said to be the first step toward modularization. Layer 2 offloads the execution layer, executes transactions and smart contracts on a separate network, and feeds the results back to the Layer 1 single network where settlements, consensus, and shared ledgers are managed.

Although modularity has many benefits, modular systems will only be powerful in their weakest links. With modular components, individual components may be more likely to be targeted. In addition, adding modularity to the network has also introduced a new level of complexity, which must ensure the normal operation of the network, whether from the technical perspective or the value of the network native tokens. If the settlement layer can be replaced by another settlement layer using different tokens, it is difficult for a network to prove the existence of tokens first.

Despite these challenges, the concept of modular blockchain provides an exciting direction for the development of new projects and new technologies that can help expand and grow the Web3 ecosystem. Popular modular blockchain projects include Celestia and Cosmos.

Layer 1 Network Summary

Web3 is a huge concept that combines blockchain, encryption and ecosystems built on them, and related technologies.

Bitcoin is a layer 1 network that popularizes decentralized blockchain technology, while Ethereum is a network that provides quasi-Turing complete computing functions, realizing smart contracts. It is the idea of ​​hashing data from early blocks to concatenate data blocks, coupled with the distribution of all copies of stored data on many nodes, that immutability and permanence of data are achieved. In addition to these technical elements, node infrastructure must also be in place to play a role: if there is only one node on the network, the network is essentially centralized and faces the challenge of centralization: data can be changed, deleted, and access to it can be restricted by nodes.

In addition to the basic data structure, there is another problem with

. How do nodes on the network know whether the data provided to them are correct. This is summarized as "the problem of Byzantine generals." Bitcoin solves this problem with its Proof-of-Work consensus algorithm, which requires nodes on the network to solve computationally expensive encryption problems to prove that they have completed the verification work required to verify a block. There are alternative consensus algorithms, such as Proof-of-Stake, which require much less energy and are considered better for the environment.

Bitcoin and Ethereum are two of the most popular blockchain networks at the time of writing, and they use very different accounting patterns. The Bitcoin network uses the UTXO model, while the Ethereum network uses the account model. The UTXO model can be considered as a "verification system", and each UTXO is a transaction bill.The account model is more like a database of accounts and balances, updated as each new block is added to the blockchain.

Ethereum's computing component is called "Ethereum virtual machine" and allows execution of smart contracts. Smart contracts are applications stored on decentralized blockchain networks that can be executed independently according to programmable trigger standards. Depending on the blockchain you are using, smart contracts can be written in Solidity, Rust, or other programming languages. Standardization of

smart contracts is necessary to achieve better interoperability between smart contracts. ERC is a coding standard that has been solidified in Ethereum documentation and is a "successful" EIP. EIP is a suggestion that anyone in the Ethereum ecosystem can make and is open to anyone to view, discuss and vote. If an EIP is voted to pass, the proposed changes are applied to the network. The four most popular ERC token standards are ERC-20 (homogeneous token), ERC-721 (non-fungible token, or “NFT”), ERC-1155 (multi-coin) and ERC-4626 (voucher standard).

Although blockchain has always been the most popular ledger format for Web3 decentralized networks, alternative formats have emerged as existing structures are adjusted to specific use cases. Directed Acyclic Graphs (DAGs) are an example of this alternative structure that relies on validating transactions rather than full blocks. Modular networks are an extension of the idea that we need to rethink existing structures. Modular networks are designed to divide distributed networks into different functional layers, each of which can be optimized individually.

Conclusion

This is the first part of the series "Mastering the Basics of Web3". Thank you for reading! If you like this post, consider sharing it! If you have any feedback on this post or want to discuss its content, please contact @0xPhillan.

on Twitter If you want to be the first readers when the second part is released, or you want to have a very firm and thorough view of the recent events of Web3, please subscribe to Web3edge Newsletter and follow @Web3edge_io on Twitter!

This article is written by 0xPhilan for Web3edge - Follow @0xPhilan on Twitter!

technology Category Latest News