Direct Answer
An automated market maker quotes trades from pool state and a pricing rule rather than matching a buyer with a specific seller. Price impact is the change caused by the trade itself; slippage is the difference between expected and actual execution; slippage tolerance is a user-defined boundary that can cause a transaction to revert when conditions worsen.
Key Takeaways
- Trade size relative to active liquidity is a primary driver of price impact.
- Displayed price, expected execution, minimum output, and final execution are different values.
- Arbitrage moves AMM prices toward external markets and changes LP inventory.
- A wider slippage tolerance improves execution probability but increases the acceptable worst case.
- Split routing can improve execution while adding contracts and complexity.
- MEV and public transaction ordering can affect realized outcomes.
What This Page Covers
This page explains how a swap moves from a quote to final execution and why an AMM's price cannot be evaluated without trade size, active liquidity, fees, route, and state changes.
AMM Pricing Intuition
In a constant-product pool, the simplified invariant is:
x × y = k
A trader adds one asset and removes the other while the product remains approximately constant after fees and rounding. Each additional unit becomes more expensive because the reserve being purchased shrinks. The quoted marginal price therefore changes across the trade.
Other AMMs use different curves, concentrated ranges, stableswap designs, hooks, dynamic fees, or hybrid models. The invariant determines how inventory and price respond to a transaction.
Price Impact Versus Slippage
Price impact is the difference caused by executing against finite liquidity. It can be estimated from the current pool state.
Slippage is the difference between the expected result at quote time and the actual result. It can arise from price impact, other transactions, market movement, routing changes, fee-on-transfer tokens, oracle conditions, or delays.
Slippage tolerance is a guardrail. A swap with an expected output of 1,000 and 0.5% tolerance may encode a minimum near 995, depending on interface calculations. If execution would produce less, the transaction should revert. The tolerance is not a fee and does not guarantee the displayed result.
Active Liquidity and Fee Tiers
Concentrated-liquidity pools can have substantial total value but limited active liquidity near the current price. Execution depends on the liquidity available across the price movement caused by the trade.
Different fee tiers compensate LPs for different asset behavior and competition. A lower fee may improve trader price while attracting or requiring more volume. A higher fee may compensate LPs for volatility but increase transaction cost. Routing engines compare pools and paths, but the chosen route can change before execution.
Arbitrage and Pool Repricing
If an AMM price differs from external markets enough to cover fees and costs, arbitrageurs can buy the cheaper asset and sell the more expensive one. Their trades change pool reserves and align prices.
This process is essential to AMM pricing, but it means LPs transact against informed flow during market moves. Arbitrage profits are related to the provider's relative loss versus continuously rebalancing at external prices. Fees may or may not offset that effect.
Execution Controls and MEV
A swap transaction can be observed before inclusion on public networks. Other participants may trade around it, back-run it, or exploit an overly wide tolerance where protocol and network conditions allow.
Useful controls include constrained slippage, reasonable deadlines, private transaction routes where trustworthy and appropriate, trade-size reduction, route review, and avoidance of illiquid tokens with unusual transfer behavior. No control eliminates all execution risk.
Practical Decision Framework
Use the QUOTE sequence:
- Q — Quantity: Compare trade size with active liquidity.
- U — Underlying route: Identify pools, fees, intermediate tokens, and aggregators.
- O — Output boundary: Verify expected and minimum output.
- T — Timing: Review deadline, network conditions, and state-change risk.
- E — Execution evidence: Inspect final output, fee, events, and route after confirmation.
Reject a quote that cannot be explained in units the user understands.
Worked Example
A pool holds 1,000 Token X and 1,000,000 stablecoin units, implying a rough spot ratio of 1,000 stablecoins per X before fees.
A trader wants 50 X. Under a constant-product model, removing 5% of X requires adding more than 5% of stablecoin reserves because price worsens throughout the trade. The average execution price will be above the initial ratio. A fee further increases cost.
If another transaction buys X first, the trader's output worsens. A minimum-output condition may protect the trader by reverting. Increasing slippage tolerance to force success accepts a lower output; it does not create liquidity.
Common Mistakes
- Calling price impact and slippage the same thing.
- Judging liquidity from TVL without checking the active range.
- Setting slippage extremely high for unfamiliar tokens.
- Assuming an aggregator route is static.
- Ignoring intermediate-token and bridge exposure.
- Comparing only gas cost and ignoring execution price.
- Failing to verify final output after confirmation.
Risks and Limitations
AMM examples are simplified. Real pools can use custom curves, concentrated ranges, dynamic fees, hooks, transfer-tax tokens, rebasing assets, or external oracles. Aggregators add routing contracts and dependencies. Public ordering can expose trades to MEV. Reverted swaps can still consume gas.
Execution quality is context-specific. A small trade can be material in a thin pool, while a larger trade may execute efficiently in deep active liquidity.
Practical Checklist
- Check token contracts and transfer behavior.
- Compare trade size with active liquidity.
- Inspect the route and fee tiers.
- Review price impact, expected output, and minimum output.
- Set a deliberate slippage tolerance and deadline.
- Estimate gas and failure cost.
- Consider splitting or delaying the trade when liquidity is poor.
- Verify the final route and received amount.
- Save the transaction record.
Frequently Asked Questions
Is slippage always bad?
Some difference between quote and execution is normal in changing markets. The objective is to constrain it to an acceptable amount, not assume zero.
Why did my trade revert?
The minimum output, deadline, balance, allowance, gas, contract condition, or another requirement may have failed.
Does a high fee tier mean better LP returns?
Not automatically. Returns depend on volume, active share, price movement, competition, and adverse selection.
Can arbitrage harm traders?
Arbitrage generally aligns prices, but transaction ordering and MEV can worsen specific executions. Guardrails matter.
Why does an aggregator use multiple pools?
Splitting or routing through intermediate assets can reduce total execution cost, though it adds complexity and contracts.
Summary
AMM execution is a function of the pricing rule, active liquidity, trade size, route, fees, state changes, and user guardrails. Distinguishing price impact from slippage is essential for interpreting quotes and protecting execution.
Sources and Further Reading
Educational disclaimer: Educational information only; not investment, tax, legal, or personalized financial advice. DeFi positions can lose some or all committed assets through market movement, liquidation, smart-contract failure, governance action, oracle failure, bridge failure, stablecoin instability, operational mistakes, fraud, or other causes.