CHAPTER 01 / 8 · Understand the mechanics
Become part of the market.
Explain who supplies assets, who trades, and where LP fees come from.
An open market needs more than a place to display prices. It needs assets that people can actually exchange. A liquidity provider makes those assets available under shared on-chain rules.
Jump to the interactive experiment ↓Who takes the other side of a trade?
Imagine a trader who wants ETH and holds USDC. Someone must supply the ETH and accept the USDC. In an order book, individual orders specify prices and quantities. In a standard AMM, LPs supply inventory to a contract and a pricing rule determines the exchange. The trader buys from that inventory; the participating LPs end up with less ETH and more USDC.
The AMM is the mechanism, not a person forecasting a fair price. A wallet authorizes the user’s actions; the contract applies the rules and settles the asset exchange on-chain.
TRY IT YOURSELF
Make the mechanics visible.
Switch between “Buy ETH” and “Sell ETH” below. Follow the assets entering and leaving the pool. Then ask which token the LP is accumulating.
Trader
Sends USDC
Pays applicable feesAMM liquidity
ETH out · USDC in
Pricing and settlement rulesLP position
Less ETH · more USDC
Eligible liquidity earns LP feesConceptual flow, not a quote. The tokens and fee allocation follow the actual pool rules.
Where does the first price come from?
A pool does not discover a fair value by looking at an exchange screen. Its initializer chooses a starting price. In a simple full-range constant-product example, 100 ETH and 270,000 USDC imply a marginal price of 2,700 USDC per ETH. This is the price of an infinitesimally small trade before fees, not a promise to sell any quantity at 2,700.
Uniswap v3/v4 stores a square-root price and uses active liquidity. Do not divide all actual token balances to infer its price: positions may cover different ranges. The constant-product example is our starting model, not a literal balance-sheet description of a concentrated pool.
- x: ETH inventory; y: USDC inventory; P: USDC per ETH.
AssumptionsFull-range illustration only. Concentrated pools use stored square-root price and active liquidity.
Why does the pool follow the wider market?
If ETH becomes more expensive elsewhere, a trader may buy it from the cheaper pool and sell elsewhere. Buying removes ETH from the pool and adds USDC, pushing its price upward. When pool ETH is expensive relative to other venues, the reverse trade can push it down.
This is an economic incentive, not an automatic synchronization service. Fees, gas, latency, available inventory and policy constraints can stop an apparent arbitrage being worthwhile. If nobody transacts, an external price update alone does not move the standard pool’s stored price.
GO DEEPERWhere does an AMM price come from?
Someone chooses the initial price
A pool starts from a chosen price. In Uniswap v3/v4 that price is initialized in square-root form; it is not discovered by a vote or guaranteed correct by an oracle. Funding liquidity then supplies executable capacity. For the simple full-range x·y=k illustration, P=y/x is the marginal USDC price of ETH. With 100 ETH and 270,000 USDC, P=2,700. An initialized price without funded liquidity is not a promise you can trade there.
External markets anchor incentives, not every state update
If ETH becomes more expensive elsewhere, buying cheaper ETH from the pool and selling externally may be profitable. That trade raises the pool price. In the opposite direction, arbitrage can sell ETH into the pool. Fees, gas, competition, latency and risk mean alignment is imperfect. Without executed swaps, changing an external reference alone does not move a standard curve’s stored price. Nor does the next arbitrage trade have to align it exactly.
Concentrated liquidity changes the depth along the path
Inside an active range let s=√P. A price increase consumes quote amount L(s_new−s_old) and releases base amount L(1/s_old−1/s_new), before fees. At an initialized tick, active L changes by that tick’s net liquidity; the next segment must use the new L. Summing the real token balances of a v3/v4 pool and dividing them is not a reliable spot-price formula: out-of-range inventory is included, and v4 PoolManager custody is shared. In fixed-point on-chain data, also apply token order and decimal scaling before displaying sqrtPriceX96 as a human price.
What exactly is the LP being paid for?
LPs make assets available for immediate exchange under known rules. Eligible active liquidity earns the LP portion of fees when it is used. In a simplified interval with a 0.30% LP fee, 10,000 USDC of fee-paying input creates 30 USDC of LP fees; a position supplying 10% of active liquidity throughout earns 3 USDC. Crossing ticks or changing liquidity requires allocation step by step.
A fee is compensation for a service, not guaranteed profit. The inventory you receive can lose value. A Hook or protocol charge is a separate component and must not be added to the LP share unless the actual accounting allocates it there.
- Q: fee-paying input volume; f: LP fee rate; s: your fraction of active liquidity.
AssumptionsOne fee band and fixed share. Allocate changing fees/liquidity step by step. Excludes other fee recipients and inventory P&L.
Open markets still need an investment objective
Providing liquidity helps people exchange assets through shared on-chain rules, supporting a more decentralized, permissionless and censorship-resistant market. It also commits your capital to an inventory-changing strategy. Ask whether you want both assets, which direction you want to accumulate, and what loss you can tolerate.
In AMM Markets, some pools restrict LP entry because their policy serves a particular mandate. That is distinct from swap access. Read the LP access policy, token restrictions and strategy terms before choosing a market; openness does not make every mandate suitable for every investor.
CHECK YOUR UNDERSTANDING
What does this mean for you?
Would you be comfortable ending up with more of either asset in the pair?
CONNECT IT TO AMM MARKETS
From understanding to a real decision.
In AMM Markets, start with the asset pair and LP access policy. Public and restricted markets serve different objectives. Explore the information first; connecting a wallet is a separate decision.
Explore the markets ↗Opens a live service. Exploring is separate from submitting a transaction.References and scope
Course edition: October 2026. Distinguish protocol principles from product instructions; actual market parameters come from the live interface and on-chain state.