Written By
Nader
Product Manager

What is Slippage?

June 1, 2021

Traders and DeFi users often talk about slippage and how it impacts them, but most newcomers to DeFi are unfamiliar with the term. Today we will look at what slippage means, why it happens on decentralized exchanges, and ultimately how to adjust your slippage tolerance on Zapper.

Defining Slippage

Slippage occurs when the output of a trade ends up being different from what was expected due to a change in the market by the time the trade is executed.

Slippage: Let's say I want to sell 10 apples at $1 each. However, in between submitting the trade and it being executed there is a drop in the price of apples. Therefore, I end up getting $9.50 for selling 10 apples instead of $10.

Price Impact: Low liquidity in a market can also lead to price issues. Imagine I'm trying to spend $10 to buy 10 apples at $1. But only 5 apples are being sold at $1. I would have to buy the rest at $1.10. Therefore, I get 9.5 apples for $10 due to a lack of liquidity.

How Slippage Works in DeFi
Since there aren't enough apples being sold at $1 some will be purchased at $1.10 due to the price impact of the trade

Slippage on a Decentralized Exchange

Similar to traditional exchanges, there are two main scenarios where expected output can be different while trading on a decentralized exchange.

Slippage: Transactions in Ethereum are generated by a user, submitted to be processed by a miner, and finally added on-chain. However, since there is some latency between a user seeing a price on a decentralized exchange and the actual transaction being processed, the price could be drastically different by the time the transaction is settled.

Price Impact:  If the size of a trade is too large relative to the amount of liquidity in the exchange it can harm the price. Many decentralized exchanges follow a constant product formula for determining the output of a swap. In the image below, we can see that given this constant product curve, the larger swaps will push the price out towards the edges of the curve. As a result, if you try to swap a large amount of token B in a single transaction the worse the conversion rate will be for token A if the volume of the swap is large relative to the total liquidity of that pair.

How slippage impacts trading on a decentralized exchange
Price Impact for swapping token B for token A

Uniswap v3 tries to fix this issue with the idea of concentrated liquidity, which you can read more about here.

Swapping on Zapper

In the example below, a user is swapping ETH to DAI and will be routed through Uniswap V2 for the best price. Their slippage tolerance is set to 2%, which means that 2% is the largest amount of slippage that they are willing to incur for their swap. As a result, the minimum amount that they will receive will be 629.784 DAI for the trade. Meaning the whole transaction will fail if the swap yields less than 629.784 DAI by the time the miner processes it.

Trading on Zapper with Slippage Tolerance
Swapping ETH for DAI on Zapper Exchange

Setting Slippage Tolerance

Zapper allows users to set the specific amount of allowed slippage on their trades. Desktop users can select their slippage tolerance by clicking on the cog icon in the upper right corner.

Setting Slippage Tolerance on Zapper

2% and 3% slippage are the two selectable options meaning that you are willing to allow for up to 2% or 3% slippage on your trades. There is an option to add in a custom slippage percentage. However, be careful when entering a custom amount. It is recommended that you use it for lower slippage amounts and don't enter in an amount that is greater than 3% unless you're confident you are willing to trade with greater slippage in a less liquid pool.

Mobile view

Users on mobile can set their slippage tolerance by clicking on the Settings option under the side navigation bar. Once in Settings, the slippage options will look similar to the desktop options above.

Get started trading on Zapper
Access liquidity across 20+ DEXs

Related Posts