Skip to content
AMM Markets
← All lessons

RESEARCH NOTE R1 · Research notes · complete derivations

Where does an AMM price come from?

Distinguish initialization, the pool curve, external price discovery and a trader’s all-in quote.

17 min · Explain, experiment, decide

An options desk is used to a pricing model or an order book producing a quote. A standard AMM quotes from its funded state according to a deterministic rule. The outside market influences it through incentives and actual execution, not through an automatic copy of a screen price.

Jump to the interactive experiment ↓
01

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.

02

A trade moves the state along a curve

Without fees, buying 10 of those ETH requires the pool to finish at x=90 and y=300,000. You pay 30,000 USDC: average price 3,000; the next infinitesimal trade starts near 3,333.33. These are three prices: starting marginal, average execution, ending marginal. A quote or an unexecuted request changes none of them. A large order traverses more of the curve and may exhaust a range or fail a constraint.

The invariant constrains the next inventory
x·y=k
ΔUSDC=kx−q−y
  • x: ETH inventory; y: USDC inventory; P: USDC per ETH.
  • q: ETH bought out of the pool, with 0 < q < x.

AssumptionsFull-range constant-product model, no fees; k is fixed during a swap.

03

LP funding changes the curve, not just the point

In the full-range model, adding both assets in their current ratio scales reserves from (x,y) to (cx,cy). Spot y/x stays fixed while k becomes c²k. A proportional withdrawal does the reverse. At twice the reserves, k is four times as large and the same fixed-size swap has less impact. This is a move to another hyperbola, not a rigid parallel shift. Swaps without fees instead move along a fixed k. In real fee-compounding pools, retained fees can also increase k. For v3/v4, use active L and ticks rather than one global k: a new out-of-range position does not add depth at the current price. A deposit UI that offers one-token entry may perform an additional swap; separate that trade from the liquidity addition.

More capital; the same starting price
Pnew=cycx=P
knew=c2k
  • x: ETH inventory; y: USDC inventory; P: USDC per ETH.
  • c: reserve multiplier. 1.5 adds 50%; 0.5 removes half.

AssumptionsProportional entry/exit in the full-range model; neither an unbalanced deposit nor a concentrated range formula.

04

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.

05

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.

06

ADPP adds policy around execution

Separate the stored curve price, external research reference, and all-in trader quote. Directional LP and hook fees alter the cost of a trade. Price bounds constrain which executions are permitted. Neither should be described generically as replacing the stored spot with a research price. Hooks can have custom semantics, so use the deployed contract and a real simulation for an executable quote. Our Router verifies the supported policy values bound to its quote; it does not freeze the market.

TRY IT YOURSELF

Make the mechanics visible.

Separate the knobs: move only the external price, then change trade size or the hypothetical input fee. Observe the difference between the existing pool spot and the post-trade state. Compare proportional LP entry/exit with a swap along the curve. Nothing is executed.

Reserve multiplier
1.00 ×
ETH inventory before swap
100.00 ETH
USDC inventory before swap
270,000.00 USDC
Invariant relative to original
1.00 ×

Original: 100 ETH and 270,000 USDC. Proportional scaling preserves the starting spot of 2,700 USDC/ETH.

Reserves and invariant curves0k300k600k900kCurve USDC reservesA/BC0100200300ETH curve reserves
Change the depth, then move along the curve
A · Original poolB · After proportional LP entry/exitC · After hypothetical swap

A→B changes liquidity, keeping the reserve ratio and price fixed. B→C is a swap along the selected invariant curve (gold segment). New k is a different hyperbola, not a rigid translation. This models proportional full-range funding, not arbitrary single-token deposits; in concentrated liquidity only overlapping ranges add active depth.

Compare marginal and average execution prices
Larger trades move farther along the curve0.00002,7555,510USDC / ETH01530ETH trade size
Larger trades move farther along the curve
Post-trade marginal priceAverage including assumed feeExternal reference
Existing pool spot2,700.00USDC / ETH
Average execution3,000.00USDC / ETH
Simulated ending spot3,333.33USDC / ETH
Hypothetical trade from the fixed starting state
Trader pays30,000.00 USDC
Trader receives10.00000 ETH
Fee separated from curve reserves0.00 USDC
Difference versus external reference, before other costs-3,000.00 USDC

Each scenario starts from the selected proportional liquidity state; trades do not accumulate. Moving only the external reference changes the comparison, not the curve. This simplified input fee stays outside curve reserves; it is not exact v2 or ADPP accounting. The reference assumes unlimited external depth and no gas or hedge costs, so the difference is not executable arbitrage profit.

CHECK YOUR UNDERSTANDING

Only the external ETH price changes; no swap executes. What moves in a standard concentrated pool?

What does this mean for you?

When a screen says “price”, can you tell whether it is a marginal pool price, a research reference, or the average price for your intended order?

CONNECT IT TO AMM MARKETS

From understanding to a real decision.

Read the market spot alongside depth and price bounds, then use the Router for an amount-specific executable quote. This experiment deliberately excludes ADPP-specific hooks and gas; it explains pricing mechanics only.

Explore amount-specific Router quotes ↗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.

Answer the knowledge check correctly to record progress.