In previous lessons, the foundational structure of Web3 has become increasingly clear: users control assets with private keys, smart contracts define the rules, and tokens serve as carriers of value. But how do these assets move within the system and form a complete financial ecosystem?
In traditional finance, fund flows rely on intermediaries like banks, payment institutions, and exchanges; in Web3, these roles are decomposed into a series of on-chain mechanisms, automatically executed by smart contracts.
Therefore, the Web3 financial system is not simply a copy of traditional finance, but a reorganized structure.

Source: USDC official website
Within the on-chain financial system, stablecoins play a role similar to the “US dollar,” serving as the foundation for nearly all transactions and financial activities.
Common stablecoins include USDT and USDC.
Stablecoins are crucial for several reasons:
In most scenarios, fund flows often start with stablecoins, such as:
Thus, stablecoins can be understood as the “settlement layer” of the on-chain financial system.
Once assets can move, trading becomes one of the core activities. In Web3, trading mainly takes two forms: centralized exchanges (CEX) and decentralized exchanges (DEX).
CEX (such as Gate) is an extension of traditional exchanges, featuring:
DEX (such as Uniswap) operates via smart contracts, with key features:
The difference can be simplified as:
These two models are not mutually exclusive—they jointly form the foundational trading infrastructure of Web3.

In DEXs, there is no traditional “order book”; instead, an automated mechanism called AMM (Automated Market Maker) is used.
The core logic of AMM is to facilitate trades through a liquidity pool. Users do not trade directly with each other but swap with the pool.
The basic principle can be summarized as:
This mechanism has several key features:
However, it also introduces new concepts such as slippage and impermanent loss—important factors to consider in on-chain trading.
Since AMMs depend on liquidity pools, the question naturally arises: Who provides these funds?
The answer is liquidity providers (LPs).
LPs deposit assets into pools to provide market depth and earn rewards. These rewards typically come from:
Thus, LPs play a role similar to “market makers” within the system.
It’s important to note that providing liquidity is not without risk; common risks include:
Beyond trading, Web3’s financial system also includes lending and leverage functions.
The basic logic is:
This mechanism allows capital to be reused, increasing capital efficiency.
Typical applications include:
This process is similar to leverage structures in traditional finance but is entirely executed by smart contracts.
Connecting all the above modules reveals a complete on-chain financial loop:
This cycle can repeat continuously, forming complex fund flow structures. The key point is that all these actions are automatically executed by smart contracts.
This lesson can be distilled into three key insights:
Overall, on-chain finance is not a copy of traditional finance but a new structure centered around “code + liquidity.”