REPORT
CEPATO Technical Note2025.11.24

What Is Web3? From State Machines to Decentralized Finance, the Clearest Look at What Web3 Actually Is

Taking Web3 apart: from node discovery to DeFi, the most radical architectural migration in the history of computer science.

Chongxi
Author:Chongxi
steam: —·spotify: —
Tags:#Web3#Blockchain
ANALYSIS

0. Introduction#

The word Web3 has been chewed to death by marketing accounts. This article aims to systematically take apart the Web3 that’s wrapped up in marketing noise. We’ll wipe away the foam on top of the gold and introduce you to the most radical architectural migration in the history of computer science: moving trust from centralized human institutions onto decentralized mathematical protocols


1 How Nodes Connect#

Web3 has no central server, only peer nodes.
The question is: without a DNS server, how does my computer know where you are?

1.1 Node Discovery Protocol Discovery Protocol#

This is completely different from HTTP. It uses a DHT distributed hash table based on the Kademlia algorithm

  • Enode ID: the ID card of every node

    • Format: enode://<128-bit public key>@<IP address>:<port>
    • When you start a Geth client, it generates this unique URL
  • Bootnodes:

    • This is a hardcoded list of seed nodes in the code
    • When a new node comes online, it first goes and queries the Bootnodes for online nodes
    • The Bootnodes return a pile of IPs they know about. Your node then connects to those IPs and, spreading like a virus, uses Gossip to find the whole network

1.2 Communication Protocol RLPx#

Once you’ve found each other, how do you send data? It certainly can’t be HTTP Ethereum uses RLPx (Recursive Length Prefix Transport Protocol)

  • Handshake:

    1. A sends an Auth message (an ECDH key exchange encrypted with the other party’s public key)
    2. B returns an Ack
    3. An encrypted channel is established (a long-lived TCP connection)
  • Multiplexing:

    • Different sub-protocols run simultaneously over this TCP connection:
    • eth/66: exchanges block headers and transaction data
    • snap/1: fast-syncs snapshot data

2. Data Structures#

The blockchain is not one giant Excel sheet With Excel, when you modify a single row, the hash of the entire file changes, and you’d have to recompute the hash of 1TB of data, which obviously isn’t feasible

Web3 uses the Merkle Patricia Trie (MPT)

2.1 What Is a Tree#

This is a monstrous structure that combines a hash tree Merkle Tree with a prefix tree Radix Trie

  • Key: the hash of the account address (Keccak256(Address))
  • Value: the RLP encoding of the account contents ([Nonce, Balance, StorageRoot, CodeHash])

2.2 The Four Node Types#

At the database level, the MPT tree is assembled from four kinds of nodes:

  1. Leaf Node: [Key, Value]. This is where the data actually lives (your balance, for instance)

  2. Extension Node: [Shared Key, Next Node Hash]

    • If a bunch of addresses all start with 0xabc..., we don’t need to store 0xabc ten thousand times; we store it once with a pointer hanging below. This is called path compression
  3. Branch Node: an array of length 17

    • The first 16 correspond to the hexadecimal 0-f
    • They determine whether the path goes down 0 or down f
  4. Null Node: the empty node

2.3 State Updates#

When you modify a balance:

  1. We don’t copy the entire tree.
  2. We only modify the affected leaf node
  3. Then we recompute the hash of every parent node along that path, all the way to the root
  4. The old nodes still exist (which gives us historical rollback), but a new Root Hash is generated
  5. This new Root Hash is placed into the new block header

3. The Micro-Execution of the EVM#

How does the EVM turn bytecode into a transfer?

3.1 A Detailed Look at the Memory Model#

The EVM runtime has three regions, each with completely different properties:

  1. Stack:

    • Structure: LIFO (last in, first out), maximum depth 1024
    • Function: all computation (addition, subtraction, multiplication, division) happens here
    • Instruction: ADD takes two numbers off the top of the stack, adds them, and pushes the result back on top
    • Characteristic: essentially free (extremely low Gas), but it disappears when the function ends
  2. Memory:

    • Structure: a linear byte array
    • Function: temporary storage for strings, arrays and return values
    • Cost: it is billed quadratically — the more memory you request, the more exponentially your Gas climbs (this prevents you from blowing up a node’s RAM)
    • Characteristic: data is cleared after the transaction ends
  3. Storage:

    • Structure: a key-value map
    • Function: permanently written into the blockchain state (the MPT tree)
    • Instruction: SSTORE (write), SLOAD (read)
    • Cost: astronomical. Writing a non-zero value costs 20000 Gas
    • Characteristic: permanently stored, synchronized across the whole network

3.2 The Execution Flow of Concrete Instructions#

Say the code is a = b + c. In EVM bytecode it looks like this:

  1. PUSH1 0x05 (push the value 5 onto the stack) -> Stack: [5]
  2. PUSH1 0x03 (push the value 3 onto the stack) -> Stack: [3, 5]
  3. ADD (the addition operation)
    • The CPU pops 3 and 5.
    • It computes 3+5=8.
    • It pushes 8 onto the stack.
    • Stack: [8]
  4. PUSH1 0x00 (prepare to store into Slot 0) -> Stack: [0, 8]
  5. SSTORE (the store instruction)
    • The CPU pops 0 (Key) and 8 (Value).
    • Physical action: writes MPT_Update(Key=0, Value=8) into LevelDB.
    • Charge: deducts 20000 Gas from the user

4. The Transaction Layer#

When a transaction travels over the wire, it isn’t JSON — it’s a serialized binary stream

4.1 Recursive Length Prefix)#

This is a minimalist serialization format invented by Ethereum.
If it’s a single byte, store it directly. If it’s a string of bytes, add a prefix in front indicating the length; this compresses space to the extreme

4.2 Transaction Structure#

A Raw Transaction contains the following fields (RLP-encoded in order):

  1. nonce: a counter (anti-replay)
  2. gasPrice: how much you’re willing to pay per unit of Gas
  3. gasLimit: the maximum Gas you’re willing to spend
  4. to: the destination address (if empty, it means creating a new contract)
  5. value: the transfer amount (Wei)
  6. data: this is the smart contract’s function call data (such as 0xa9059cbb...)
  7. v, r, s: the ECDSA digital signature

4.3 How Signing Works#

When you click Send Transaction, what is your wallet doing?

  1. Hashing: compute h = Keccak256(RLP(nonce, gasPrice, ... data))
  2. Signing: using your private key dAd_A and a random number kk, compute (r,s)(r, s) from the elliptic curve formula
  3. Packaging: append v, r, s to the end of the transaction

Verification on the node side: When a node receives the transaction, it doesn’t need to know your private key. Using v, r, s and h, it can compute a public key QQ via the inverse elliptic curve operation If Address(Q) == From_Address, the signature is valid and the transaction is legitimate

5. The Consensus Layer#

How can tens of thousands of nodes reach agreement?

5.1 The Validator Workflow#

These days it’s no longer about mining, hashing, but about proving presence: Attestation

  1. Staking: you must lock 32 ETH into the deposit contract. This money is your hostage
  2. Randao: every 12 seconds the system randomly selects a proposer Proposer, also known as the miner
  3. Proposing: the chosen one packages transactions and broadcasts the new block
  4. Attestation: several thousand other validators form committees and vote by signature on this block, agreeing that it is valid

5.2 The Penalty Mechanism#

  • Double Signing: if you sign two different blocks at the same height (attempting to fork the chain)
    • 1 ETH or more is instantly slashed from your 32 ETH, and you’re kicked off the network
  • Inactivity Leak: if you go offline and fail to participate in voting
    • Your balance drains away like a leak, until you fix your server or the money runs out

6. Smart Contracts#

Before we go on, let’s fill in some terminology

1. Oracle#

  • The blockchain is closed off: it doesn’t know the current dollar price of ETH, nor today’s temperature
  • That creates a need for a bridge service that writes real-world data (prices, weather) onto the blockchain
  • In a leveraged position, it is the referee. If it says the price dropped, the contract will execute liquidations

2. Gas#

  • Why does a single click on-chain cost me tens of yuan?
  • Because executing a smart contract consumes the computing power of every node on the network. Gas is the computing service fee you pay the miners
  • The more complex the code (more loops, more stored data), the more expensive the Gas

3. DApp, Decentralized Application#

  • Definition: Frontend (webpage/APP) + Smart Contract (backend)
  • The pretty webpage you see (Uniswap’s interface, say) is just a shell; it turns your clicks into transaction instructions and sends them to the blockchain

4. DAO, Decentralized Autonomous Organization#

  • Who sets the interest rates in the Aave lending protocol?
  • The people holding the governance token Token vote on it. It’s like a company’s shareholders’ meeting, except voting power is automatically tallied by code according to how many coins you hold

6.1 Definition#

This thing is neither smart nor a contract

In computer science, the precise definition of a smart contract is:

bytecode stored on a blockchain, with a unique address, immutable, and deterministically executed

  • It has no AI and doesn’t think. It is just a rigid If-This-Then-That script
  • It has no legal force (in most countries, at present). It’s more like the mechanical apparatus of a vending machine; it doesn’t really qualify as a contract

6.2 The Vending Machine Model#

This is the most classic textbook model for understanding smart contracts (proposed by Nick Szabo):

  1. Traditional transaction (Web2/counter): you give the clerk your money →\to the clerk confirms the amount →\to the clerk hands you a Coke →\to change.
    • Risk: the clerk might take the money and run, might miscount, might refuse to sell to you
  2. Smart contract (Web3/vending machine): you put your money into the slot →\to the gears turn →\to now, if the amount is sufficient, the Coke must drop
    • No middleman. Once you insert the coin, the outcome is physically/mathematically determined

6.3 Code Walkthrough#

We’ll use the most common language, Solidity (Ethereum’s programming language, which looks like JavaScript/C++), to write the simplest possible piggy bank contract

PRTCL // SOLIDITY
// 1. 声明版本
pragma solidity ^0.8.0;
// 2. 定义合约(就像定义一个 Class 类)
contract PiggyBank {
// --- 状态变量 (写在区块链硬盘上的数据) ---
address public owner; // 存钱罐的主人是谁?
uint256 public balance; // 里面有多少钱?(uint256 是正整数)
// --- 构造函数 (部署时只运行一次) ---
constructor() {
owner = msg.sender; // 谁把这个合约部署上链,谁就是主人
balance = 0;
}
// --- 函数:存钱 ---
// payable 关键字表示这个函数能接收真金白银(ETH)
function deposit() public payable {
balance += msg.value; // 余额增加
}
// --- 函数:取钱 ---
function withdraw(uint256 amount) public {
// A. 身份验证
require(msg.sender == owner, "你是所有者吗你就整,滚出去");
// B. 余额检查
require(amount <= balance, "bro没钱了");
// C. 转账操作
balance -= amount;
payable(msg.sender).transfer(amount);
}
}
  1. Deployment: When you send this code to the blockchain through your wallet, it gets compiled into bytecode (a pile of 60806040... that only machines can read) and assigned a contract address starting with 0x

    • From that moment on, this code cannot be modified or deleted
  2. Invocation: When you click the Deposit button on this contract, you’re actually sending a transaction to this contract address

    • The EVM wakes up
    • It loads this contract’s code
    • It executes the deposit function
    • It modifies the state of the balance variable
    • Every node on the network updates this variable in sync
  3. Immutability: Note the require(msg.sender == owner) inside the withdraw function

    • In a real bank, if someone holds a gun to the teller’s head, the teller can transfer your money out
    • In a smart contract, if the private key signature is wrong, not even Lester could move that money. The code’s logic is absolute iron law

7. DeFi, Decentralized Finance#

7.1 Leverage in Web3#

  • Traditional finance (credit loans): You want to borrow a million to trade stocks. The broker/bank looks at your salary records, property deeds and credit score. If they think you’re reliable, they lend to you

    • This is based on human credit
  • Web3 finance (collateralized loans): The blockchain doesn’t know who you are, and it can’t sue you in court. So how does it dare lend you money? The answer: overcollateralization dun dun dun

7.2 How Leverage Works#

Say you hold 1 ETH (worth $3000), you’re bullish on ETH going to $5000, and you want to add leverage to earn more

Step one: collateralize You deposit 1 ETH into Aave’s smart contract

  • Your assets: $3000 (ETH)
  • The contract gives you a health factor

Step two: borrow The contract lets you borrow stablecoins (USDC) equal to 80% of your collateral’s value You borrow 2400 USDC

  • You now hold: 1 ETH (in the contract) + 2400 USDC (in your wallet)
  • Note: at this point there is still no leverage

Step three: loop — this is where the real leverage comes in With the 2400 USDC you borrowed, you go to an exchange and buy 0.8 ETH Then you deposit that 0.8 ETH into the contract again

  • The contract now holds: 1.8 ETH
  • The contract sees your collateral increased and lets you borrow again, 80% of the value of that 0.8 ETH, and so on around the loop

In the end
Your principal was only $3000, but you control ETH worth $5000 or more

  • ETH rises 10%: you earn 10% of $5000, not 10% of $3000. That’s leverage

7.3 Liquidation#

Since it’s a loan, the contract has to make sure the borrower’s principal isn’t lost. There’s a hardcoded line in the contract: the liquidation threshold

Say the price of ETH crashes Your 1.8 ETH depreciates, and its value is about to fall below the total USDC you borrowed The moment it crosses the mathematical red line:

  1. The oracle tells the contract: ETH has now fallen to $2000
  2. The contract triggers the Liquidate function
  3. The contract automatically auctions off your collateralized ETH to repay the USDC you borrowed
  4. If there’s anything left over, it gets returned to you

In this process there are no collection calls, no grace period, only code being executed, and your principal can evaporate in an instant

7.4 Overcollateralization#

Here we’ll go deeper into traditional lending versus web3

  • Traditional banks:

    • You put up nothing at all and borrow 100,000 yuan on the strength of a pay stub
    • You run off: the bank loses 100,000. The bank calls the police, the court seizes your assets, and you’re blacklisted on the credit report
    • What you need to know is that the bank is afraid of you running off
  • Web3 protocols:

    • You want to borrow 80 yuan (USDC), so you must first deposit Bitcoin (BTC) worth 100 yuan into the smart contract
    • You take the 80 yuan and run off
    • It turns out the protocol is holding Bitcoin worth 100 yuan. It sells your Bitcoin, deducts the 80 it lent you, and even makes a profit
    • The protocol couldn’t care less whether you run off; they’d even prefer it

In the decentralized world there are no police and no courts, and code only trusts the assets it holds in its hands

7.4.0 Why Borrow on Web3 at All#

  • At this point someone will probably curse: if I have that hundred yuan, why not just spend it? Why would I borrow?

If you apply Web2 logic (going to a bank for a mortgage), Web3’s overcollateralization looks completely insane

But here’s what I want to tell you

You’re treating Web3 lending as a consumer loan or a relief loan
DeFi lending today is fundamentally a financial leverage tool and an asset management tool

The people who actually borrow this kind of money fall into only the following four categories. Every one of them is very shrewd, and it’s not because they’re poor


7.4.1 The Gambler#

This is the biggest use of DeFi lending (over 80%). They don’t borrow in order to spend; they borrow in order to buy more of the same asset

You’re bullish on Bitcoin (BTC) going up a lot. You hold BTC worth 100,000 yuan

  • Don’t borrow: BTC rises 10%, you earn 10,000
  • Borrow on Aave:
    1. Deposit the 100,000 in BTC as collateral
    2. Borrow 80,000 USDT (a stablecoin)
    3. Turn around and go to an exchange to buy into BTC with that 80,000 USDT
    4. You now effectively control 180,000 worth of BTC (even though 100,000 of it is collateralized)
  • Result: BTC rises 10%, you earn 18,000. Your profit is magnified 1.8 times

This isn’t borrowing to get by — it’s financing a stock trade. They’re willing to collateralize because they firmly believe the collateral will appreciate and don’t want to sell it, but they want more capital to amplify their returns


7.4.2 The Short Seller#

If you think a coin is going to fall, how do you make money? In the spot market you can only buy low and sell high, but in a lending protocol you can short

You think A is about to go to zero

  1. You collateralize 1000 USDC (real money)
  2. You borrow 100 A (worth 800 USDC)
  3. You immediately sell those 100 A on an exchange for 800 USDC
    • You now hold: 1000 collateral + 800 cash = 1800 in assets
    • You owe the protocol: 100 A
  4. Wait for A to crash 50%
  5. You spend 400 USDC to buy back 100 A
  6. You return those 100 coins to the protocol
  7. You sold for 800 at the start, and it only cost you 400 to buy back, so you net 400 USDC

Lending protocols are the infrastructure of the shorting mechanism. No lending, no shorting


7.4.3 HODLing#

This is the rich man’s playbook. In the US and many other countries, selling assets incurs a massive capital gains tax, but borrowing does not

You’re an early Ethereum investor holding 1000 ETH (worth, say, $3 million). You need $100,000 to buy a Porsche

  • Option A (sell coins): you sell 33 ETH

    • Tax office: your cost basis was a few bucks back then, and you’re selling at this price now, so pay 20%–40% tax
    • Consequence: you lose a fortune in tax, and you lose those 33 ETH forever (if they go up later, it’s none of your business)
  • Option B (collateralize): you collateralize your ETH, borrow 100,000 USDT, withdraw it and buy the car

    • Tax office: this is debt, not income, no tax due
    • Consequence: you drive off in the Porsche, and those 1000 ETH are still in your name. As long as ETH doesn’t crash, you can pay off the interest slowly later; and if ETH moons, you’re rolling in it

This is the famous rich-person strategy: Buy, Borrow, Die (buy assets, borrow against them to spend, die with the debt). DeFi lets ordinary people use it too


7.4.4 The Farmer#

Here, borrowing is about earning interest somewhere else

  • The borrowing rate on Aave is 3%
  • The mining yield on some Uniswap pool is 10%
  • The play: you collateralize assets, borrow at a 3% cost, and earn a 10% return
  • Result: a risk-free or low-risk 7% spread

7.4.5 The Truth Is Brutal#

Someone will probably ask

  • If we really treat this as relief debt, what if I don’t have enough value to collateralize?

The answer is brutally simple: DeFi today cannot save them

  • CeFi/banks: lend based on credit The bank lends to you because it has seen your salary records, employment verification and credit report. The bank believes you’ll earn money in the future, so even if you have none right now, it dares to lend. This is called a credit loan

  • DeFi: lends based on assets The blockchain doesn’t know who you are, doesn’t know whether you work at that big company, and can’t put you in prison when you default So the blockchain trusts human nature not at all. It only trusts the money in its hands

Web3 is desperately trying to solve this. The hot directions right now are RWA (real-world assets on-chain) and DID (decentralized identity)

  • What if, in the future, you could turn your property deed into an NFT and collateralize it? (RWA)
  • What if, in the future, an on-chain Sesame Credit score could be formed on-chain? (Soulbound Token / DID)

Only when that day comes can DeFi truly serve those ordinary people who have no money but do have credit. DeFi today is, in essence, a super-casino and capital circulation tool serving capital (asset holders) and traders, not a charity or an inclusive bank.


7.5 Who Does the Liquidating?#

  • Say you collateralized 100 worth of BTC and borrowed 80. Suddenly BTC crashes to 81, and you’re about to be insolvent (below 80). Who sells off your debt?

Nobody is sitting at a computer watching your account The liquidations are performed by a swarm of bots we call liquidators

The process goes like this:

  1. Trigger: A rule is hardcoded into the smart contract: if (collateral value < borrowed amount * 1.05), anyone is allowed to call the liquidate() function

  2. Patrol: There are tens of thousands of scripts running 24 hours a day around the world, constantly listening to every lending account on-chain

  3. Discovery: The instant your BTC value crosses the red line, these thousands of bots, like sharks smelling blood, race to send transactions to the smart contract, trying to trigger the liquidate function

  4. Execution:

    • The bot helps you repay part of the debt (say 40)
    • In return, the contract sells your BTC to this bot at a discounted price (say 5%–10% off)
  5. Outcome:

    • The protocol recovers the debt
    • The bot pockets the spread (it paid 40 to settle your debt and walked away with BTC worth 44)
    • Your BTC was forcibly sold at a low price, and you took a big loss

The one liquidating you isn’t some official body — it’s a third-party arbitrage bot trying to earn that 5% penalty. It’s a self-maintaining system built on greed


7.6 Flash Loans#

In Web3 there is exactly one situation where you can borrow hundreds of millions without putting up a single cent. It’s called a flash loan It’s also the technique behind many hacker attacks

But it has an extremely hardcore physical constraint: atomicity

You write a smart contract containing three steps:

  1. Borrow $100 million from Aave (no collateral)
  2. Use that $100 million to speculate, arbitrage, or shuffle funds around (whatever you like)
  3. Before the same transaction ends, you must repay the money with interest

What if you lose money in step 2 and can’t repay in step 3? The EVM declares the transaction failed and rolls back the entire process

It’s as if time ran backwards: In the history of the blockchain, you never borrowed that money, and the $100 million never left the vault. You only pay a tiny bit of Gas to prove that you once tried to do it

So even with a flash loan, you cannot abscond with the funds, because if you don’t repay, the loan simply does not exist on the physical timeline


8. Automated Market Makers#

In Web3, to save on expensive storage fees (storing tens of thousands of orders on-chain is far too costly), we invented x×y=kx \times y = k

8.1 The Constant Product Formula, CPMM#

This is an extremely elegant mathematical model. It needs no market maker placing orders; as long as there’s a liquidity pool, trading is possible

  • Model: a pool holds two assets, A (quantity xx) and B (quantity yy)
  • Iron rule: before and after a trade, the product of the two quantities in the pool, kk, must stay unchanged (ignoring fees) xold×yold=k=xnew×ynewx_{\text{old}} \times y_{\text{old}} = k = x_{\text{new}} \times y_{\text{new}}

8.2 Deriving the Interaction#

Say the pool holds:

  • ETH (xx): 10
  • USDC (yy): 30,000
  • Current price: 3000 USDC/ETH
  • k=10×30,000=300,000k = 10 \times 30,000 = 300,000

You want to buy 1 ETH with USDC

  1. You send some USDC to the contract (call it Δy\Delta y)
  2. You want to take out 1 ETH (Δx=1\Delta x = 1)
  3. Calculation:
    • ETH remaining in the pool must be: xnew=10−1=9x_{\text{new}} = 10 - 1 = 9
    • To keep k=300,000k=300,000, the USDC in the pool must become: ynew=300,0009=33,333.33y_{\text{new}} = \frac{300,000}{9} = 33,333.33
    • So the USDC you must put in (Δy\Delta y) is: Δy=ynew−yold=33,333.33−30,000=3,333.33\Delta y = y_{\text{new}} - y_{\text{old}} = 33,333.33 - 30,000 = 3,333.33
  • The initial price was 3000, but buying this 1 ETH actually cost you 3333.33
  • Slippage: this single trade pushed the price from 3000 up to 3333. The more you buy, the more expensive the unit price. This is the automatic adjustment of the supply and demand curve

8.3 Impermanent Loss#

This is the mathematical trap every liquidity provider (LP) has to understand

  • When you deposit ETH/USDC into a pool to make a market, if ETH skyrockets, your ETH gets bought out by arbitrageurs (because it’s cheap in the pool), and you’re left holding nothing but depreciating USDC
  • Automatically selling rising assets and buying falling ones. This is a short volatility strategy

9. How Oracles Are Implemented#

The biggest flaw of a smart contract is that it’s blind The EVM is deterministic and cannot make HTTP requests (such as GET binance.com/price), because different nodes requesting at different times might get different results, and consensus would collapse

So how does Chainlink bring the real world onto the blockchain?

9.1 Architectural Design#

  1. On-chain part: a simple storage contract
    PRTCL // SOLIDITY
    contract PriceFeed {
    int256 public price;
    function updatePrice(int256 _price) public { ... }
    }
  2. Off-chain part, Oracle Nodes: hundreds of independently operated servers listening to exchange APIs

9.2 How Data Gets On-Chain#

  1. Aggregation: 21 nodes each fetch the ETH price from Binance and Coinbase
    • Node A: 3001
    • Node B: 3002
    • Node C: 2999
    • …
  2. Consensus: they sign the data off-chain (over an Off-chain P2P network) and take the median. The median filters out individual malicious quotes
  3. Writing: one designated node sends this final data package, bearing 21 signatures, to the on-chain contract
  4. Verification: the on-chain contract verifies that the number of signatures meets the threshold, then updates the price variable

This is why DeFi lending protocols depend on Chainlink. If Chainlink were hacked, every lending protocol would suffer cascading liquidations due to bad prices


10. Scaling#

Ethereum L1 is too expensive and too slow (TPS ~15). We need to scale without sacrificing security, so Rollups were invented

The core idea is execute computation off-chain, store the results and proofs on-chain

10.1 Optimistic Rollups#

Examples: Arbitrum, Optimism.

  • How it works:
    1. L2 nodes run transactions off-chain at high speed
    2. Every few minutes, thousands of transactions are compressed and a new State Root is computed
    3. This Root is published to Ethereum L1
    4. Optimistic assumption: L1 assumes the Root is correct by default and accepts it directly
  • Fraud Proof:
    • If, within the 7-day challenge period, someone finds that the Root is wrong (the L2 node secretly altered a balance, say)
    • The challenger submits mathematical evidence to L1
    • L1 re-executes that single transaction. If it indeed turns out wrong, the L2 node has its deposit slashed and the state is rolled back
  • Cost: withdrawals must wait 7 days, which is the challenge period — think of it as a cooling-off period

10.2 Zero-Knowledge Rollups#

Examples: zkSync, Starknet

  • How it works:
    1. L2 nodes package transactions
    2. Mathematical magic: generate a zero-knowledge proof (SNARK/STARK). This proof uses cryptography to guarantee: the 1000 transactions I just executed really did produce the new Root through their state changes, with absolutely no tampering
    3. Submit the Root + proof to L1
    4. L1’s verification contract checks the proof. If it passes, the state is confirmed immediately
  • Advantage: it is mathematical truth, so there’s no need to wait 7 days
  • Disadvantage: generating the proof is extremely CPU-intensive

11. The Dark Forest#

In Web3, hacking isn’t about bypassing a firewall — it’s about calling your code legitimately

11.1 Reentrancy Attack#

This was the culprit behind The DAO incident (which caused Ethereum to fork)

Example of vulnerable code:

PRTCL // SOLIDITY
function withdraw() public {
uint bal = balances[msg.sender];
require(bal > 0);
// 1. 转账
(bool success, ) = msg.sender.call{value: bal}("");
// 2. 扣余额
balances[msg.sender] = 0;
}

How the attack works:

  1. The hacker writes a malicious contract
  2. The hacker calls withdraw()
  3. When the target contract reaches msg.sender.call (the transfer), it triggers the malicious contract’s fallback function
  4. Inside the malicious contract’s fallback function is a line of code: call the target contract’s withdraw() again
  5. At this point, step 2 of the target contract (zeroing the balance) hasn’t executed yet, so bal > 0 still holds
  6. Result: recursively, the hacker withdraws the money again and again until the pool is drained, and only then does the balance get zeroed

How to defend?: the checks-effects-interactions pattern (deduct first, transfer after)

11.2 Front-Running and Sandwich Attacks, MEV#

The mempool is completely public. Miners/validators have god’s-eye view

You send a transaction: buy ETH with 1000 USDC. This large order will push the ETH price up 1%

An attacker (Searcher Bot) spots this transaction:

  1. Front-run: the bot sends a transaction buying ETH with a higher Gas fee than yours. Miners package its transaction first.
    • As a result, the bot raises the price before you buy
  2. Your transaction executes: you buy ETH at a higher price (you lose out). The price is pushed up further
  3. Back-run: the bot sells ETH right after your transaction
    • As a result, the bot buys low and sells high, eating your slippage

This is Maximal Extractable Value. It’s an inevitable side effect of the blockchain being a public, transparent ledger


12. NFT#

You probably also think an NFT is just buying a picture — that’s the biggest misunderstanding You spend hundreds of thousands on a monkey avatar, and what you bought isn’t the picture at all

12.1 The Core Principle#

Imagine you pay for the naming rights to a star

  • Do you get the star? No — the star is still up in the sky, anyone can look at it, anyone can photograph it
  • So what did you buy? You bought a piece of paper that says: the star at coordinates ~ now belongs to Chongxi
  • Who recognizes this piece of paper? Suppose there is an astronomical ledger recognized by all of humanity and absolutely impossible to alter (the blockchain), and it is the only copy in the world

An NFT is one line of text in that great ledger:

The thing numbered #8888 belongs to #your wallet address

As for whether that #8888 is a picture, a song, or a dragon-slaying sword in a game, the blockchain genuinely doesn’t care. It only cares about establishing ownership

12.2 Why Isn’t Bitcoin an NFT?#

  • Bitcoin (fungible) = banknotes The hundred-yuan note in your hand and the one in mine are exactly the same. Swap them and nothing changes. That’s what fungible means

  • NFT (non-fungible) = property deed Yours is a ticket for row 1, seat 1; mine is a ticket for the last row, by the toilet door They’re both tickets, but they’re worth completely different amounts and can’t be freely swapped. That’s what non-fungible means

So on the blockchain, Bitcoin only records how many coins you have
Whereas an NFT must record which specific number you own

12.3. The Biggest Lie#

The most absurd and also most technical aspect of NFTs

Because blockchain space is worth its weight in gold. To store an ordinary 1MB high-res image on the Ethereum chain, the gas fee alone might cost tens of thousands, even hundreds of thousands of yuan — not even a wealthy project team could afford it

So what do they do? Store a link

Your NFT actually contains just one line of something like a URL:

TokenURI: https://…/oiiaoii.jpg

The brutal part:

  • The NFT you paid a million for is just one line of code on the blockchain, and that line of code points to an image on some server
  • If the project team can’t afford to renew the server, or they run off and shut it down, your NFT is still on-chain, but that URL no longer opens
  • The result is that the property deed you paid a million for turns into a blank sheet of paper

The solution Reputable projects nowadays store images on IPFS (a kind of decentralized hard drive) What makes IPFS special is this: as long as even one computer in the world still holds the image, the link stays valid forever. It’s like pointing the property deed at a library that will never go out of business

12.4 What Ownership Means#

What annoys people most is this: I can download this picture too, I can set it as my avatar, so why should it cost a million?

  • You go to the Louvre; you can photograph the Mona Lisa, print the photo and hang it at home, even paint a copy clearer than the original
  • But when you take the photo to Sotheby’s, nobody will pay you any attention
  • Only the person holding the certificate of authenticity can sell the painting for a sky-high price

In the world of Web3, everyone’s wallet is transparent Whether you own this NFT or not, one lookup on-chain tells anyone the answer

  • You downloaded the picture and set it as your avatar — people check your wallet, find it empty, and see it’s pure posturing
  • You bought the NFT and set it as your avatar — people check your wallet, find a real record, and think damn, a veteran

The value of an NFT lies not in looking, but in the bragging rights verified by the entire network

12.5 The Approval Mechanism#

When you sell an NFT on a marketplace, you’ll notice you don’t need to transfer the NFT to the platform So how can the platform automatically sell your NFT to someone else while you’re asleep?

It uses a mechanism similar to a real-estate agent:

  1. Approval: The first time you list it, your wallet pops up a window asking you to confirm. This step is actually signing a power of attorney on-chain:

    I authorize Opensea, this agent, to freely use the property deed named #8888 in my wallet at any time

  2. Signature: You fill in a price: 10 ETH This step is actually you writing a note:

    Whoever gives me 10 ETH, the agent hands them the property deed This note doesn’t go on-chain; it’s just posted on Opensea’s server (to save on fees)

  3. Closing: A buyer shows up and likes it. The buyer gives 10 ETH to Opensea’s smart contract The contract takes your power of attorney, grabs the NFT straight out of your wallet, shoves it into the buyer’s hands, and pays you at the same time

Why is it that so many people click a link and their NFT is gone? Because the phishing site the scammers built, disguised as a giveaway page, pops up a confirmation box that is actually a power of attorney with the highest privileges The moment you click confirm, the scammer has the right to empty out every NFT you own, without ever needing to know your password

13. The Truth#

Talking only about disruption and not risk makes you a liar; talking only about the vision and not the present makes you a con artist

Today’s Web3 is deeply split. On one side is brilliant mathematics and exquisite architecture; on the other is scams everywhere and inefficient duplicated construction

The whole world is building roads (public chains): ten thousand highways have been laid, but the only things driving on them are a few toy cars (apps), and everyone sitting in those cars is a gambler hoping to pick up cash along the road

Why is it like this? It’s caused by a misalignment of incentives

  • Issuing a public chain is far too profitable:

    • If you develop an app (a decentralized YouTube, say), you have to grind away at operating users, and monetization is extremely difficult

    • But if you develop a public chain (Layer 1 / Layer 2), issue a coin, and tell a story about being a faster Ethereum, capital will pour in like crazy

    • This means engineers don’t go solve real-world pain points; they grind furiously over TPS (transactions per second). Public chain performance has long been excessive — what’s missing is people using them

    • Ethereum, Solana, Aptos, Sui… every chain is a separate country. Moving user assets across chains is extremely hard, and the experience is terrible. It’s like how using WeChat still means separate Android and iOS versions, and the account data on the two sides isn’t even shared

  • Real DApps never took off:

    • Only three categories of decentralized application are still active: lending (DeFi), gambling (GameFi), and flipping pictures (NFT)
    • No consumer-grade application that genuinely changes ordinary people’s lives, like Uber or WeChat, has appeared

If you want to enter the industry or invest, you must face these four horsemen of death head-on

A. Irreversible technical death In Web2, if WeChat crashes it can be fixed; if Alipay gets hacked, the data can be rolled back In Web3, Code is Law is a double-edged sword

  • Sent money to the wrong address? Gone forever
  • Lost your private key? Nobody can save you
  • Smart contract had a bug and got drained by hackers? That was legitimate code execution; nobody will compensate you
    • For ordinary users, the psychological burden of this self-sovereignty is too heavy. Many people simply can’t handle that kind of freedom

B. Ponzi and bubbles

90% of Web3’s token economic models (Tokenomics) are essentially Ponzi schemes.

  • Play-to-Earn: where does the money come from? From the players who join later. Once no new players come in, the coin price instantly goes to zero (as with Axie Infinity)
  • High-yield mining: promising 100% annual returns? That’s just the inflation coins they printed being handed to you
  • Air coins: no cash flow, no earning power; the market cap rests entirely on consensus (that is, sentiment). The moment sentiment collapses, the value is zero

C. The regulatory hammer The biggest gray rhino

  • Anti-money laundering (AML): as long as regulators cut off the fiat on/off ramps (making banks refuse to transfer to exchanges), Web3 becomes a self-absorbed LAN, and liquidity dries up
  • Securities classification: if the US SEC rules that most tokens are securities, then all exchanges will need licenses, and most project teams will go to prison or pay massive fines

D. Centralization in disguise

Many projects that call themselves “decentralized” actually have their control in a 3-of-N multisig wallet.

  • The server is on AWS
  • The frontend is on Cloudflare
  • Even the nodes are run by the project team themselves
  • Once something goes wrong, it’s more dangerous than a bank, because banks are regulated and they are not

14. Gold Beneath the Foam#

If it’s all problems, why study it at all? Why are the world’s top elites, the smartest brains on Wall Street and in Silicon Valley, still rushing in?

Because beneath the foam, a change at the physical level has already happened. Just as the dot-com bubble burst in 2000 and Pets.com died, but the internet remained

14.1. The Payment Revolution#

This is currently Web3’s only genuinely large-scale application

  • In countries with severe inflation such as Argentina, Turkey and Nigeria, ordinary people convert their savings into USDT/USDC and keep them on their phones
  • This isn’t for speculating on coins; it’s for survival. It gives an African with no US bank account the right to hold dollar-denominated assets. That’s a first in human history
  • Remittances today take days and charge high fees; on-chain transfers take seconds, cost pennies, and run around the clock. The banking system’s SWIFT is destined to be phased out

14.2 Asset Tokenization#

Stop flipping your junk pictures; the future is about flipping the real world, mapping US Treasuries, real estate and stocks onto the chain

PRTCL // PLAINTEXT
* You can sell your 100 yuan of US Treasuries at 3 a.m. on a Sunday and turn it into a cup of coffee
* You can buy 0.0001 of the rental income rights to a building in New York.
  • The logic: it’s not about decentralization, it’s about liquidity and globalization. Giants like BlackRock are entering; this is the trillion-dollar market

14.3 Data Sovereignty and Digital Identity#

This is the only weapon against the AI era

  • In the AI era, how do you prove you’re human? How do you prove that this work was painted by you and not generated by AI?
  • Web3’s answer: your private key signature is an unforgeable digital fingerprint
  • Your social connections, your medical data, your creative output no longer live on Tencent’s or Google’s servers; they’re encrypted and stored on IPFS, with the key in your hands. Any app that wants to use the data must get your authorization (and might even have to pay!)

14.4 Frictionless Global Collaboration#

  • DAOs today are messy, but the code-level company is an advanced form
  • No finance department (automatic on-chain accounting), no cross-border transfer obstacles, salaries paid automatically according to contribution (code commits/votes). For open-source communities and global organizations, it’s a game-changer

15. Conclusion#

My view of Web3 as an individual developer

In Web2, we believe the server admin is benevolent: Don't be evil In Web3, we assume the environment is hostile, yet by relying on cryptography and game theory, the system still runs correctly: Can't be evil

Web3 today exists in a superposition of the internet in 1995 and the gold rush in 1840

  • It’s chaotic, savage, full of scammers and bandits
  • But there really is oil and gold buried beneath it, and the rails are already laid

Don’t be the person clapping on the sidelines, and don’t be the gambler with bloodshot eyes in the casino

Be the engineer who sells the shovels, builds the railroads, or puts up the first real supermarket on the wasteland

Chongxi
CHONGXIAuthor
Steam—
Spotify—
Published at:2025.11.24
Classified
Distribution Notice

What Is Web3? From State Machines to Decentralized Finance, the Clearest Look at What Web3 Actually Is

Author CHONGXI/2025.11.24/CEPATO-2025-1124-WHATIS

This work is licensed under CC BY-NC-SA 4.0. Redistribution, remixing and adaptation are allowed for non-commercial use, provided the same license is used and the original author is credited.

SubscribeDonate
Discussion
Archive_Ref
Copyright © 2011–2026 Chongxi & CEPATO
Powered by Astro & CEPATO-NEXT
StatusNon-Collaborative_Entity // CEPATO_NEXT_v27.0

Type a keyword to search