P07-L03 · P07 · P07-M01
Estimate pool impact while stating route fee and reserve limitations
Prerequisites: P07-L02
Learning objectives
- Compute output and average execution price in a fee-free constant-product model.
- Distinguish average-price impact from post-swap marginal-price change.
- Identify assumptions preventing a model result from being an exact live quote.
EN source master · P07-L03 · 45 minutes estimated · needs_review
Learning objectives:
- Compute output and average execution price in a fee-free constant-product model.
- Distinguish average-price impact from post-swap marginal-price change.
- Identify assumptions preventing a model result from being an exact live quote.
Why this matters
A token can display a large valuation while a small exchange changes its quoted price sharply. Market capitalization estimates value using a price and a supply measure; liquidity concerns the terms on which units can actually be exchanged. The skill here is to calculate a stated pool model and explain where that estimate stops being an executable quote.
Explanation
Keep the units visible
Define the base asset as the token being measured and the quote asset as the unit used to express its price. In the original hypothetical pool below, X is 100,000 base tokens and Y is 100 quote units. The marginal reserve ratio is Y/X = 0.001 quote per base token. This is not a promise that 10,000 tokens can all be obtained at that price.
A constant-product model holds X × Y constant for a fee-free swap. Uniswap's v2 pricing documentation provides an example of this two-reserve mechanism [S-PRICING]. This lesson derives original numerical examples for that idealized model. It does not assert that every Solana launchpad, concentrated-liquidity pool or routed exchange follows these exact equations.
For an input q of quote units with zero fees, the model's base output is Xq/(Y+q). New reserves are X minus output and Y plus q. The average execution price is q/output. That average differs from both the old marginal price and the new marginal price; failing to say which price you measured makes an “impact” percentage ambiguous.
Work a complete example
With q=10, output is 100,000×10/110 = 9,090.9091 base tokens. The average price is 10/9,090.9091 = 0.0011 quote per token. Relative to the old marginal price of 0.001, the average is 10% higher. New reserves are approximately 90,909.0909 base and 110 quote; their ratio is 0.00121. The post-swap marginal price is therefore 21% higher than before, a different measurement from the average execution change.
These are model calculations, not historical trade records. They use real-number arithmetic. An actual implementation uses token units, integer rounding, fees and protocol rules. When a fee fraction f reduces effective input, a common model substitutes q(1−f) inside the pricing calculation. The amount remaining in reserves depends on the implementation's fee treatment. Do not silently claim exact outputs from a generic formula.
The calculation is asymmetric in how amounts are specified. Selling a stated quantity of base is not the same as reversing a prior quote input under all conditions. Other trades may occur between the two operations. A snapshot estimate cannot promise the state will remain unchanged until a transaction executes.
Distinguish price impact from execution uncertainty
Price impact describes the change attributable to consuming liquidity under a specified model/state. Slippage commonly describes the difference between an expected quote and actual execution, and interfaces can use the word differently. Always write the comparison explicitly. A permissive slippage setting is not additional liquidity; it merely changes which execution outcome a user might accept.
Route composition matters. A quoted route may cross multiple pools with different fees and asset representations. A deep first pool cannot make a thin downstream pool disappear. If the provider gives only total notional liquidity, you still need directional reserve/depth data to estimate the output for a particular amount.
Concentrated liquidity, transfer fees, hooks, frozen accounts or other token behavior can invalidate the simple model. A pool may hold assets that are not fully active at the current price. A chart's value conversion can change because the quote asset itself changes price. Your report should preserve base units and quote units alongside any external valuation.
Interpret a loss of depth carefully
If both reserves fall proportionally, the marginal ratio can remain the same while the same trade causes more impact. This is central to liquidity-risk investigation: a stable displayed price does not establish stable exit capacity. Compare like-for-like snapshots, account for fee/reserve conventions, and record whether a change was a swap, a withdrawal or unresolved.
The lesson's output is a bounded calculation with assumptions and missing inputs. It is not a recommendation to enter, exit or select a “safe” trade size. A research tool can improve visibility, but an unknown route or stale reserve snapshot remains unknown.
Key terms
- Reserve: amount used by the stated pool model.
- Marginal price: local price for an infinitesimal change under that model.
- Average execution price: total quote input divided by base output.
- Price impact: a stated execution-versus-reference difference.
- Slippage: execution-versus-expectation difference under an explicit convention.
- Directional depth: exchange capacity for a specified direction and amount.
Historical example
ILLUSTRATIVE EXAMPLE — FIX-P07-03. Zero fees, no rounding, no intervening trades, unrestricted transfers and a simple constant-product pool. Quote units are fictional, not USD, SOL or stablecoins.
| Scenario | Base reserve X | Quote reserve Y | Quote input q |
|---|---|---|---|
| Original pool | 100,000 | 100 | 10 |
| Deeper comparison | 1,000,000 | 1,000 | 10 |
| Original pool, larger input | 100,000 | 100 | 20 |
Both initial pools have the same marginal ratio. In the deeper comparison, output is 9,900.9901 and the average price is 0.00101: a 1% increase over the initial reference, rather than 10%.
What the evidence proves
OBSERVED: The input table and arithmetic rules are supplied facts of the fictional exercise.
INFERRED: Conditional on those rules, the deeper pool produces less average-price impact for the same input. This is a model conclusion, not a live quote.
What the evidence does not prove
UNKNOWN: Actual routing, fees, reserve freshness and transfer constraints of any real token.
INSUFFICIENT EVIDENCE: Market cap alone cannot establish directional depth. These results cannot guarantee execution or future price. The fixture contains no real-token safety evidence.
Common mistakes
Quoting post-swap price as average price; forgetting units; treating total valuation as spendable liquidity; using zero-fee math for an exact live quote; or assuming a wide slippage allowance improves market depth.
Practical exercise
Calculate base output, average execution price and post-swap marginal price for the original pool with q=20. Compare with q=10. Then list three conditions that would invalidate treating the output as an exact real-world quote.
Show worked correction
Worked correction and expected reasoning
Output = 100,000×20/120 = 16,666.6667. Average execution price = 20/16,666.6667 = 0.0012, which is 20% above the initial 0.001 reference. New reserves are 83,333.3333 and 120, so the post-swap marginal ratio is 0.00144, or 44% above the initial ratio. For q=10 the corresponding average and final changes were 10% and 21%. Doubling input does not double output.
Fees, integer rounding, an intervening swap, different route composition or restricted/fee-bearing transfers would prevent exact equivalence. An acceptable conclusion states the model, reserve units, assumed state and unknown real execution conditions.
Grade out of ten: output (two), average price and correct reference (two), final marginal price (two), interpretation of nonlinear output (one), three model limits (three). A percentage without a named reference receives no comparison credit.
Checklist
- Name base/quote units and pool model.
- Verify the direction and input amount.
- Separate average execution from final marginal price.
- State fees, rounding, routing and freshness assumptions.
- Report calculated estimates without promising a fill.
Summary
Depth, trade size and model assumptions jointly determine execution estimates. Identical displayed starting prices can conceal very different capacities, and average-price impact is different from the final reserve ratio.
Summary
A valuation is not a withdrawal budget. Use a named price reference. Preserve every assumption that separates a model estimate from a real execution record.
Visual specifications
Plot original and ten-times-deeper model outputs for q=10 and q=20. Show initial marginal, average execution and final marginal prices in separate labelled panels; attach formulas and units. Supply the exact exercise table and rounding note as accessible text.
Visual delivery rules: dark navy/black, cyan/electric-blue/violet accents, units and uncertainty explicitly labelled. Use deterministic charts or SVG, not fabricated screenshots. At 390 px stack annotations and provide the data table as a text alternative; verify 768 px and desktop later. In Arabic localize labels and layout with native RTL, while isolating addresses/hashes LTR and retaining the actual direction of transfers and chronology. Use only the supplied official ZECOIN logo if branding is added. No visual asset or mobile/RTL rendering is claimed ready.
Tools
Use RADAR only when the exact network, asset and needed fields are supported and their provenance is visible. This is a read-only educational inspection, not a trade or a token launch. Use the supplied offline dataset if access or data is unavailable; missing information remains unknown. A future Open in ZECOIN action needs validated runtime routing and source coverage. No executable asset CTA is supplied for illustrative identifiers. Academy participation and commercial status never change Radar observations.
Sources & claim boundaries
- Uniswap v2 Pricing — Two-reserve constant-product pool pricing; not a model for every launch or pool. Checked 2026-09-30.
The tables and exercise fixtures are original educational material unless explicitly designated HISTORICAL. Fictional identifiers are deliberately invalid as blockchain addresses. Documentation supports mechanism definitions, not the invented exercise values. Source inspection is editorial research, not a live-chain measurement. Sources may change; re-review before publication.
Next lesson
P07-L04; proceed after completing the exercise and reviewing each quiz explanation.
Visual specifications
P07-L03-V01
How does output change with input size and reserve depth?
Illustrative fee-free constant-product estimates; not executable quotes.
Plot original and ten-times-deeper model outputs for q=10 and q=20. Show initial marginal, average execution and final marginal prices in separate labelled panels; attach formulas and units. Supply the exact exercise table and rounding note as accessible text.
At the same initial price, the deeper pool has less impact for a ten-quote input; average and final prices differ.
390px: stacked annotations and text table; 768px and desktop acceptance pending
RTL labels/layout; identifiers LTR; preserve factual axis, chronology and edge direction.
FIX-P07-03
P07-L03-V02
Which claims are observed, inferred, unknown or insufficiently supported?
Evidence classification for this lesson; no investment verdict.
Four labelled rows; show claim, evidence pointer, boundary and next verification step.
Text table of four evidence states and the limits of each conclusion.
390px: stacked annotations and text table; 768px and desktop acceptance pending
RTL labels/layout; identifiers LTR; preserve factual axis, chronology and edge direction.
FIX-P07-03
Sources & claim boundaries
S-PRICING · official_documentation
Uniswap v2 Pricing
- Supported claim
- Two-reserve constant-product pool pricing; not a model for every launch or pool.
- Verification boundary
- Primary publisher page read; historical ledger transactions not independently replayed.
- Checked at
- 2026-09-30
https://developers.uniswap.org/docs/protocols/v2/concepts/pricing
Dataset provenance
id: FIX-P07-03
dataStatus: ILLUSTRATIVE
observedAt: null
network: offline mathematical model
identifiers: fictional base and quote units
timeBasis: static initial reserve state
assumptions: ["zero fees","no rounding","no other trades","constant product","unrestricted transfers"]