A decentralized exchange can quote 990 tokens for a $1,000 swap, but the transaction may settle with only 985 tokens. On a larger trade, the difference can become much more expensive, even when the market price appears relatively stable.
Two mechanisms explain much of this discrepancy: price impact and slippage.
Price impact measures how your own trade affects the execution price because liquidity is limited. Slippage measures how the actual execution differs from the quote you accepted before the transaction was processed.
The distinction matters because changing slippage tolerance does not eliminate price impact. A swap can execute within a 0.5% slippage setting while already carrying a substantial loss from insufficient liquidity.
Understanding slippage vs price impact helps traders evaluate DEX quotes, avoid expensive swaps, and recognize when a transaction exposes them to additional market risks.
Slippage vs Price Impact: What’s the Difference?
Both concepts describe execution quality, but they measure different effects.
Price impact is caused by the size of your transaction relative to available liquidity.
Slippage occurs when the execution conditions change between receiving a quote and completing the trade.
Slippage vs Price Impact Compared
| Feature | Price Impact | Slippage |
|---|---|---|
| Main cause | Your trade consumes liquidity | Market changes before execution |
| Can be estimated before swapping? | Yes | Only as potential exposure |
| Increases with trade size? | Generally | Not necessarily |
| Affected by pool depth? | Yes | Yes |
| Controlled by slippage tolerance? | No | Limited by the setting |
| Can occur in a stable market? | Yes | Less likely without other changes |
| Potential MEV exposure | Can make attacks attractive | Wide tolerance increases risk |
A large swap can suffer price impact even if no other trader interacts with the pool.
Conversely, a small swap can experience slippage if another transaction changes the pool’s reserves before execution.
These effects can also occur simultaneously.
What Is Price Impact in DeFi?
Most decentralized exchanges use automated market makers (AMMs) to determine swap prices.
In a traditional order-book market, trades execute against available buy and sell orders.
In a basic AMM, trades interact with tokens deposited into a liquidity pool.
For a classic constant-product pool, the relationship is:
x × y = k
Here, x and y represent the pool’s token reserves, while k is the constant product.
When a trader deposits one token and withdraws another, the reserve ratio changes.
This shifts the price.
The larger the trade relative to pool reserves, the greater the price movement.
A small swap in a deep pool might have negligible price impact. The same swap in a shallow pool could be considerably more expensive.
Price Impact Example: $100 vs $10,000 Swap
Consider a hypothetical liquidity pool containing:
- 100,000 USDC.
- 100,000 TOKEN.
- Initial price: 1 TOKEN = $1.
- Total pool value: $200,000.
Assume a constant-product AMM without trading fees, so the example isolates price impact.
The expected token output is:
Tokens Received = Token Reserve × USDC Input / (USDC Reserve + USDC Input)
How Trade Size Affects Execution
| Swap Amount | Ideal Tokens at $1 | Actual Tokens Received | Average Execution Impact |
|---|---|---|---|
| $100 | 100 | 99.90 | 0.10% |
| $500 | 500 | 497.51 | 0.50% |
| $1,000 | 1,000 | 990.10 | 0.99% |
| $5,000 | 5,000 | 4,761.90 | 4.76% |
| $10,000 | 10,000 | 9,090.91 | 9.09% |
Illustrative constant-product calculations, excluding swap fees, external price movements, and concentrated liquidity.
A $100 swap receives approximately 99.90 tokens, almost matching the initial market price.
A $10,000 swap receives only 9,090.91 tokens instead of the ideal 10,000.
That is approximately $909.09 less value when measured at the initial $1 reference price.
The trade hasn’t necessarily experienced any additional slippage. The difference is already embedded in the AMM’s expected execution.
This is why transaction size matters so much in low-liquidity markets.
Why the Pool Price Moves More Than Your Average Execution Price
A constant-product swap doesn’t execute entirely at one price.
The trade moves progressively along the AMM pricing curve.
For the $10,000 example, the average execution price is approximately $1.10 per TOKEN.
However, the pool’s marginal price after the swap rises to approximately $1.21 per TOKEN.
These figures describe different measurements.
The average execution price reflects the total tokens received for the amount spent.
The final marginal price describes the pool’s price after its reserves have changed.
DEX interfaces may calculate or label price impact differently, especially for concentrated-liquidity pools and multihop routes.
For practical decisions, the quoted token output relative to a reliable reference price is often more useful than the percentage alone.
What Is Slippage in Crypto Swaps?
Slippage is the difference between the expected execution and the actual execution.
Suppose a DEX quotes 990 TOKEN for your swap.
You submit the transaction, but another trader swaps against the same pool before yours is executed.
The price changes, and your transaction receives 985 TOKEN instead.
Slippage can be calculated as:
Slippage = (Quoted Output − Actual Output) / Quoted Output × 100
In this example:
(990 − 985) / 990 × 100 = 0.51%
The swap experienced approximately 0.51% negative slippage.
Unlike the original price impact, this change occurred after the quote was generated.
Slippage can also be positive if execution conditions improve, although the treatment of favorable differences depends on the DEX and routing mechanism.
How Slippage Tolerance Works
Slippage tolerance sets the maximum deterioration from the quoted output that a swap can accept under the specified execution rules.
For an exact-input swap, the interface commonly calculates a minimum output.
Minimum Tokens Received = Quoted Tokens × (1 − Slippage Tolerance)
Assume the DEX quotes 990 TOKEN.
Slippage Tolerance Example
| Tolerance | Quoted Output | Minimum Output |
|---|---|---|
| 0.1% | 990 | 989.01 |
| 0.5% | 990 | 985.05 |
| 1.0% | 990 | 980.10 |
| 3.0% | 990 | 960.30 |
| 5.0% | 990 | 940.50 |
The important point is that slippage tolerance applies to the quoted amount, not necessarily the original market price.
If a $10,000 swap already has 9.09% price impact, setting tolerance to 0.5% doesn’t reduce that initial impact.
It only limits additional adverse execution relative to the quote.
A transaction generally reverts if its minimum output condition cannot be satisfied.
The trader may still incur a blockchain transaction fee for the failed attempt.
How Trading Fees Affect the Final Swap Amount
Price impact and slippage aren’t the only factors reducing swap output.
Liquidity pools commonly charge trading fees that are incorporated into execution calculations.
Consider the same hypothetical pool with a 0.3% swap fee.
Swap Results With a 0.3% Pool Fee
| Swap Input | Fee on Input | Output Without Fee | Output With Fee |
|---|---|---|---|
| $100 | $0.30 | 99.90 TOKEN | 99.60 TOKEN |
| $1,000 | $3.00 | 990.10 TOKEN | 987.16 TOKEN |
| $10,000 | $30.00 | 9,090.91 TOKEN | 9,066.11 TOKEN |
Constant-product example using an input fee deducted before the pricing calculation.
The pool fee reduces the effective input amount available for the swap.
The remaining input still moves along the pricing curve.
When evaluating a quote, distinguish between the direct pool fee, the price impact embedded in the quoted amount, and any additional slippage.
Adding all three percentages mechanically can double-count costs if the quote already incorporates fees and price impact.
Why Low Liquidity Causes High Price Impact
A liquidity pool with $20 million in balanced reserves can generally absorb a $10,000 trade more efficiently than a pool containing $20,000.
The underlying reason is the proportion of available reserves consumed by the transaction.
In the earlier example, a $10,000 purchase represents 10% of the pool’s initial USDC reserve.
A large change in reserve balances causes a substantial movement along the constant-product curve.
Factors Behind High Price Impact
| Factor | Likely Effect |
|---|---|
| Small liquidity pool | Greater impact for the same trade |
| Large order relative to reserves | Higher execution cost |
| Liquidity concentrated away from current price | Less immediately available depth |
| Fragmented liquidity across DEXs | Potentially worse individual routes |
| Sudden liquidity withdrawal | Larger price movement |
| Better routing across multiple pools | May reduce impact |
Modern concentrated-liquidity AMMs complicate the calculation because available liquidity varies across price ranges.
Total value locked (TVL) alone may not reveal the depth available at the current trading price.
A pool with substantial TVL can still produce high price impact if most liquidity is positioned away from the active trading range.
What Is a Sandwich Attack in DeFi?
A sandwich attack is a form of Maximal Extractable Value (MEV) exploitation.
It occurs when an attacker places transactions around a victim’s pending swap to profit from the resulting price movement.
A simplified attack involves three transactions.
First, the attacker buys the target token before the victim’s transaction.
Second, the victim’s purchase executes at a worse price because the attacker has already moved the pool’s pricing curve.
Third, the attacker sells after the victim, potentially capturing a profit.
The victim receives fewer tokens than originally expected.
Why Slippage Tolerance Matters for MEV
| Tolerance Setting | Potential Trade-Off |
|---|---|
| Very tight | Lower accepted price deterioration, more failed swaps |
| Moderate | Some flexibility for ordinary market movement |
| Very wide | More room for adverse execution and MEV extraction |
Wide slippage tolerance can make a transaction more attractive to sandwich attackers because the victim agrees to accept a much worse execution price.
But tight tolerance isn’t an absolute defense.
MEV exposure also depends on transaction visibility, liquidity, ordering mechanisms, and the protection provided by the wallet or routing service.
How to Reduce Slippage and Price Impact
The most effective approach is to check execution quality before signing.
1. Compare the Quote With a Reference Price
Check the expected token amount against a reliable market price.
A token appearing cheap on a DEX isn’t necessarily a bargain if available liquidity is insufficient.
2. Review Price Impact Before Confirming
If the interface warns about unusually high price impact, investigate before continuing.
A 10% impact should not be treated as a routine cost of swapping.
3. Consider Smaller Trades
Breaking a large trade into smaller orders may help when liquidity has time to recover between executions.
However, splitting transactions back-to-back in the same unchanged constant-product pool does not eliminate the cumulative price impact.
4. Compare Liquidity Sources
DEX aggregators can route orders through multiple pools to improve execution.
This can reduce the impact of trading against one shallow pool.
Always compare the final expected output rather than assuming an aggregator guarantees a better result.
5. Use Appropriate Slippage Tolerance
A tighter setting restricts additional adverse execution but may cause swaps to fail during volatility.
Avoid increasing tolerance simply to force an unfavorable trade through.
6. Use MEV Protection Where Available
Some wallets and DEX interfaces support private transaction submission or MEV protection.
These mechanisms can reduce exposure to certain sandwich attacks, although they do not eliminate all execution risks.
How to Check Whether Your Swap Was Executed Fairly
After a swap completes, compare the quoted output with the amount actually received.
For an exact-input trade, inspect the blockchain transaction’s token transfers.
Then distinguish three measurements:
| Metric | What It Reveals |
|---|---|
| Reference market price vs original quote | Initial execution quality |
| Original quote vs actual received amount | Additional execution slippage |
| Minimum received vs actual output | Whether execution respected the accepted floor |
If a swap delivers exactly the minimum accepted amount, that doesn’t automatically prove manipulation.
However, it may justify examining intervening transactions and potential MEV activity.
The blockchain transaction history provides evidence of what executed, although proving a specific sandwich attack may require additional analysis.
Frequently Asked Questions
What is the difference between slippage and price impact?
Price impact comes from your own trade consuming liquidity. Slippage is the difference between the expected quote and actual execution after market conditions change.
Does 0.5% slippage tolerance mean my total swap cost is 0.5%?
No. The quoted amount may already include pool fees and substantial price impact. The tolerance generally controls additional adverse execution relative to that quote.
Why does a $10,000 swap have higher price impact than a $100 swap?
A larger trade consumes more of the pool’s available reserves and moves further along the AMM pricing curve.
What is high price impact in a crypto swap?
There is no universal threshold. However, several percentage points of adverse impact can represent a material cost and deserve investigation before execution.
Can a swap have price impact but zero slippage?
Yes. If the transaction executes exactly as quoted, it may experience no additional slippage even though its initial price impact is substantial.
Is higher slippage tolerance better?
Not necessarily. A wider setting can reduce failed trades but also permits more adverse execution and may increase vulnerability to sandwich attacks.
Can DEX aggregators reduce price impact?
Yes, when multiple suitable liquidity sources are available. Routing across pools can improve the quoted execution compared with relying on one shallow pool.
Are sandwich attacks the same as ordinary slippage?
No. Ordinary slippage may result from unrelated market activity. A sandwich attack deliberately exploits transaction ordering to worsen a victim’s execution.
Can a failed swap still cost money?
Yes. When a transaction reverts because its execution conditions are not met, blockchain processing fees may still be charged.