Why Does the Quote Get Worse?
Walk the curve with three sizes and separate spot price, average execution, impact, and fee.
- Separate pre-trade spot price from average execution
- Explain why depth determines large-order impact
- Identify which output variable slippage protection constrains
- PREVIOUSWithout an Order Book, the Pool Is the Counterparty
- CURRENTWhy Does the Quote Get Worse?
Walk the curve with three sizes and separate spot price, average execution, impact, and fee.
- NEXTWhere Do LP Fees Come From?
Think about these questions first.
Choose an answer before opening the explanation. You can add anything unexpected to your review list.
Q01If fees fall to zero, does a large trade stop slipping?+
No. Fees are an extra deduction; price impact comes from moving the reserve ratio along the curve. With finite depth, a large order still gets an average price away from the pre-trade spot.
A trade’s “price” can mean the pre-trade spot price, the average execution price, or the output after fees. Compare three swap sizes and separate these numbers instead of treating them as one quote.
One pool, three sizes
Choose a small, medium, and large input. Does output scale linearly? Does price impact stay constant? Does the fee grow in proportion to input?
Credits / TOKEN
The pool does not wait for another order. Its reserve ratio produces the next quote.
Swap fees stay in the pool and slowly grow k; adding or removing liquidity also changes the reserve scale.
One curve, three trade sizes
Choose a preset, execute the swap, and compare average execution price with price impact.
Start with the two reserves, then drag the swap size. Small trades stay near the spot price; large trades travel farther along the curve.
- 01
Pool created: 120,000 credits + 1,000 TOKEN,initial price 120 credits / TOKEN。
Use the slider to return to an earlier step. Continuing from there replaces the later history with a new sequence.
With 120,000 credits and 1,000 TOKEN, the pre-trade spot price is about 120 credits per TOKEN. It is a tangent to the curve, not a promise that any quantity can trade at 120.
Depth determines impact
Buying TOKEN raises credit reserves and lowers TOKEN reserves. In a small pool, the same order is a larger fraction of depth, so the curve moves farther. This is why useful liquidity means assets near the current price, not only total value locked.
Fees and price impact are different costs
The fee is a fixed percentage removed before the curve calculation. Price impact comes from moving along the curve and depends on depth and trade size. Setting the fee to zero does not make a large swap execute at spot.
Expand: how this step works
fee = floor(amountIn × feeBps / 10,000)
usableIn = amountIn - fee
amountOut = reserveOut × usableIn / (reserveIn + usableIn)
executionPrice = amountIn / amountOut
priceImpact = executionPrice / spotPriceBefore - 1
Real protocols ask for amountOutMinimum or a maximum slippage. That protects the output boundary; it does not freeze the pool price.
Why does zero fee still not make a large swap execute at the old spot price?
Read slippage protection as a safety boundary
A real call says more than “swap 12,000 credits”: it also says “I must receive at least this much TOKEN.” If someone trades first, the quote can worsen. Below the minimum, the transaction should fail instead of silently accepting a worse fill.