DeFi market structure
DEX liquidity, price impact and slippage
A displayed token price may differ from the average price available for a larger exchange. To understand that difference, identify the pool, examine its liquidity and compare quotes at stated sizes. The hypothetical calculation below shows how a constant-product pool works; it omits costs and cannot predict a live quote.
Educational research methods, without recommendations to buy, sell or hold an asset. Crypto assets can lose all their value. Read the risk disclosure.
By AlfaDAOPublished Updated
1. Identify the exact market and observation point
Begin with the network, both token contract addresses, the pool or pool identifier, the protocol version and the observation block or time. Write the quote direction in full: exchanging token A for token B is a different question from exchanging B for A. Include token decimals and specify whether amounts are raw integers or displayed units. Matching tickers on two websites does not establish that they describe the same assets or pool.
Keep the research read-only while gathering this information. A pool screenshot can omit its network, fee setting or selected route. Save the original pool link and a quote record instead. If an aggregator uses several pools, list those legs individually; a single displayed average price can conceal a thin intermediary market or an extra asset exposure.
2. Separate total value from depth near the quote
Total value locked is an accounting summary, not a promise that any requested amount can be exchanged near a displayed price. For concentrated-liquidity designs, liquidity is assigned to price intervals; positions outside the current interval are inactive. The distribution across the intervals your hypothetical order would cross matters more to this question than a lone total. Consult the documentation for the actual protocol version rather than applying a v2 reserve formula to a concentrated-liquidity pool.
Build a small comparison using several clearly stated input sizes and the same observation time. Record quoted output, route and effective output per input unit for each size. This reveals where the quote deteriorates without pretending that a depth curve stays fixed. Liquidity providers and other transactions can change the available state before a later transaction executes.
Source references
3. Keep price impact, tolerance and fees in separate fields
In this worksheet, price impact means the difference attributable to moving through available liquidity relative to the chosen reference price. Slippage means a difference between the quote observed and the execution ultimately obtained. A slippage tolerance is an acceptance limit, not a forecast of the difference. State the comparison convention because interfaces may include or exclude fees when describing their own impact figure.
Write down the quoted amount, minimum acceptable output or maximum input, expiry if applicable, pool fees, any interface or route fees, and estimated network cost. Protocol versions can have different fee mechanisms, so do not assume that the lowest displayed tier describes the total cost. Increasing a tolerance does not add liquidity or correct an expensive quote; it changes the boundary of what an execution request will accept.
4. Work through a deliberately simplified pool
Imagine a fee-free constant-product pool containing 100 units of A and 10,000 units of B. Its initial reserve ratio is 100 B per A, and the product is 1,000,000. Adding 10 A while preserving that product leaves approximately 9,090.91 B in the pool, so the output is approximately 909.09 B. The average output is about 90.91 B per A, below the initial reserve ratio. Applying the initial ratio to the entire amount would incorrectly imply 1,000 B of output.
This example omits fees, other transactions, rounding, unusual token behavior and alternative routes. It also does not model concentrated liquidity. Its purpose is to show why a marginal reserve price is not an executable average for an arbitrarily large order. Reproduce the arithmetic in a worksheet, label the assumptions beside it, and use a live protocol quote when researching an actual pool.
Hypothetical fee-free constant-product pool (not a live quote)
| Measure | Illustrative calculation | Result |
|---|---|---|
| Initial product | 100 A × 10,000 B | 1,000,000 |
| B reserves after 10 A enters | 1,000,000 ÷ 110 A | Approximately 9,090.91 B |
| Output to the trader | 10,000 B − 9,090.91 B | Approximately 909.09 B |
| Average output per A | 909.09 B ÷ 10 A | Approximately 90.91 B per A |
Source references
5. Test what could invalidate the comparison
Compare a fresh quote with an independent reference appropriate to the assets and observation time. A manipulated or temporarily imbalanced pool is a poor sole source of its own fair price. Uniswap documents why naively executing against a pool reserve lookup can expose a transaction to adverse ordering. Treat an unexplained discrepancy as an investigation question rather than an automatic opportunity.
List practical failure cases: liquidity removal, a changed route, a fee change, a paused or restricted token, a stale quote, or a different network selected in the wallet. Compare both directions and more than one size when useful. Do not assume that splitting an order guarantees better execution; separate actions can introduce additional costs and changing market conditions. No test here requires submitting a trade.
Source references
6. Record the quote and its limits
Save the pool address, observation block, input sizes, quote outputs, route and costs. Replace descriptions such as deep liquidity with those figures. Quotes taken at different blocks or for different routes need separate rows; averaging them can hide the reason they differ.
A later quote may change after liquidity moves or another transaction executes. Keep the earlier snapshot dated. Neither snapshot establishes the price or liquidity that will be available when someone later tries to exit.