P11-L01 · P11 · P11-M01
Explain how reserve changes determine executable prices
Prerequisites: P01-L06 · P03-L04 · P08-L03
Learning objectives
- Explain how reserve changes determine executable prices
- Distinguish marginal reserve ratio from finite-swap execution.
- Identify which AMM version and assumptions the model represents.
EN source master · P11-L01 · 30 minutes estimated · needs_review
Offline formative study. No wallet connection, real funds, private keys, signatures, live trade or personal portfolio inputs. Visuals are specifications; this is neither runtime content nor certification.
Why this matters
A pool's displayed ratio is not the average price available for an arbitrary-size swap.
Explanation
Name the mechanism and version
An automated market maker (AMM) exchanges against pooled assets rather than matching another user's posted order [AMM]. Different versions and pool designs require different accounting. This lesson uses a frictionless full-range constant-product model inspired by v2; fees, transfer-tax tokens, concentrated liquidity and external transactions are excluded.
Write reserve units
Let x be reserve of assetX and y reserve of assetY. Under no-fee x×y=k, adding Δx yields new y=k/(x+Δx), so output Δy=y−k/(x+Δx). The marginal Y-per-X ratio is y/x [V2]. It describes a tiny local change; average finite-swap output per input differs because reserves change along the path.
Inspect the state transition
With x100 X,y1000 Y, k100000 X·Y. Input10 X leavesx110, y909.0909, output 90.9091 Y. Average 9.0909 Y/X is below starting ratio 10; post-swap ratio 8.26446 Y/X is a different number again. Label all three instead of calling each 'price'.
Mechanism is not safety
A large reserve or TVL number does not authenticate withdrawability, genuine token value, contract permissions or future liquidity. LP withdrawal, token transfer rules, execution ordering and network cost can change the real outcome. Documentation explains the model; fictional reserve values are not externally observed. No live swap or wallet interaction is required.
Key terms
- Reserve: model's amount held for each asset.
- Invariant: rule relating reserves during the modeled swap.
- Marginal ratio: local reserve ratio with units.
- Average execution: total modeled output divided by input.
Historical example
ILLUSTRATIVE poolSIM-X/Y with x100 X,y1000 Y, fee 0 and invariant100000 X·Y; input 10 X. All values are fictional, with unlimited toy precision; no chain or contract address.
Visual specifications
AMM reserve/LP structure diagram: before 100 X/1000 Y, after 110 X/909.0909 Y, output 90.9091 Y; separate start, average and final ratios. No TVL safety badge.
What the evidence proves
The fictional no-fee reserve transition and distinction among three price descriptions.
What the evidence does not prove
Actual reserves, safety, executable depth, a real token valuation or current protocol parameters.
Evidence classifications
- OBSERVED: FIX-P11-L01 stipulates starting reserves 100/1000.
- INFERRED: output 90.9091 Y follows from the no-fee invariant.
- UNKNOWN: any real pool's token permissions and withdrawals.
- INSUFFICIENT EVIDENCE: knowing the mechanism proves the assets safe.
Common mistakes
- Multiplying input by starting ratio as exact output.
- Applying v2 assumptions to every AMM.
- Calling reserve value available exit liquidity.
Practical exercise
Calculate k, new reserves, output, starting ratio, average execution and ending ratio. Name three exclusions that would require new inputs in a real claim.
Deliver calculations or annotations, claim/source table and limitations. Suggested allocation: study 12 minutes, exercise 8, correction/quiz 10; estimate subject to calibration.
Show worked correction
k100×1000=100000. x'=110,y'=100000/110=909.090909; output 1000−909.090909=90.909091 Y. Starting 10 Y/X; average 90.909091/10=9.090909 Y/X; ending 909.090909/110=8.264463 Y/X. Fees, transfer restrictions and competing state changes are excluded; the calculation is conditional, not a quote.
Formative rubric (5 points): reproducible inputs, correct method, correct result, claim-specific evidence scope, explicit limitations. Invented observation, advisory output or unsupported safety claim requires correction regardless of score.
Checklist
- Name model/version.
- Carry reserve and price units.
- Separate marginal/average/final.
- State safety and execution exclusions.
Summary
AMM reserve arithmetic explains a conditional exchange mechanism; finite execution, marginal ratio and safety are separate questions.
Summary
- Distinguish marginal reserve ratio from finite-swap execution.
- Identify which AMM version and assumptions the model represents.
Next lesson
P11-L02 after correction review.
Tools
NONE in the authoritative catalog. The supplied offline fixture/package is sufficient; no paid feature or unverified Production capability is required. Lab/certification metadata denotes downstream associations, not access gates or live awards.
Sources & claim boundaries
- [AMM] Uniswap — How it works — Pools exchange assets with prices responding to relative reserves; version scope matters. Checked 2026-10-01; locator turn9view6.
- [V2] Uniswap v2 core whitepaper (March 2020) — Reserve ratio, constant-product mechanics and input-fee invariant; version-specific, not a live deployment snapshot. Checked 2026-10-01; locator turn14view0.
Visual specifications
P11-L01-V01
Explain how reserve changes determine executable prices
ILLUSTRATIVE — fictional inputs; no signal or safety guarantee.
AMM reserve/LP structure diagram: before 100 X/1000 Y, after 110 X/909.0909 Y, output 90.9091 Y; separate start, average and final ratios. No TVL safety badge.
AMM reserve/LP structure diagram: before 100 X/1000 Y, after 110 X/909.0909 Y, output 90.9091 Y; separate start, average and final ratios. No TVL safety badge.
At 390px stack chart/table, assumptions, correction and source panel; provide complete text equivalent. Rendering pending.
RTL explanatory prose; numeric values, IDs and chronological axes stay LTR; preserve dependency directions.
FIX-P11-L01
Sources & claim boundaries
AMM · PRIMARY_DOCUMENTATION
Uniswap — How it works
- Supported claim
- Pools exchange assets with prices responding to relative reserves; version scope matters.
- Verification boundary
- Documentation supports mechanism only; fixture values are original stipulated inputs. Historical publications remain attributed.
- Checked at
- 2026-10-01
https://developers.uniswap.org/docs/get-started/concepts/how-uniswap-works
V2 · PRIMARY_DOCUMENTATION
Uniswap v2 core whitepaper (March 2020)
- Supported claim
- Reserve ratio, constant-product mechanics and input-fee invariant; version-specific, not a live deployment snapshot.
- Verification boundary
- Documentation supports mechanism only; fixture values are original stipulated inputs. Historical publications remain attributed.
- Checked at
- 2026-10-01
https://app.uniswap.org/whitepaper.pdf
Dataset provenance
id: FIX-P11-L01
dataStatus: ILLUSTRATIVE
observedAt: null
timeBasis: T/SIM markers are fictional order, not timestamps.
source: Author-created fixture embedded in this lesson.
scope: No market observation, usable address, secret, signature or personal financial data.