This article is released as a part of the Deepwaters Ponder catalog, which is intended for educational purposes and furthering the public’s understanding of decentralized finance.

What is Slippage in DeFi and How Does Slippage Occur?

Price discovery is a natural part of financial trading, with markets generally dictating prices through the intersection of supply and demand. Unfortunately, the added volatility and volume of trading throughout markets can create a disconnect between the market price and the transaction price.

The gap between market and transaction prices can create both positive and negative slippage. Negative slippage is receiving less of an asset than the market price and positive slippage, which is a rarity, would provide the user with more of an asset than the market price upon completing the trade.

In response to concern from traders, DeFi exchanges (DEX) have adopted user interfaces which help to set expectations for slippage rates through their user interfaces (UI)—letting each user set their limits and feel fulfilled with the outcome of each transaction.

The Uniswap V3 UI, for reference, has an inbuilt automatic slippage tolerance setting, along with a function allowing users to manually set limits to ensure fair trade.

The price difference, à la slippage, is related to how much liquidity is within an Automated Market Maker (AMM) on a DEX. With more liquidity, users are less likely to suffer from slippage, as there will be more traders to complete orders. The XYK (x * y = k) market maker, like Uniswap, makes users vulnerable to slippage through the ratio of liquidity within pools.

I.e. To actually have an invariant pricing system (K), Token X and Token Y must remain consistently balanced relative to their combined value.

E.g. Tim decides that he would like to exchange 7,000 of Token X to an X-Y asset pair. In the pool, there are 50,000 of each token, valued at the same price.

The price of the overall asset pair X and Y must remain constant, but by providing 7,000 of Token X, Tim has changed the scarcity of each asset. The price has changed, but the pool must remain of equal value.

The ratio now stands at 57,000 Token X, but as more people provide X, like Tim, they receive less Token Y in return due to the scarcity.

Tim receives 6140 Token Y.

The ratio now stands at 57,000 Token X and 43,859 Token Y. Although the ratio and price of each token have changed, the value of the pair remains the same.

The more people follow Tim’s lead, each successive person will receive less Y, hence “slippage”.

Tim’s trade had a significant impact on the ratio of the pair, but if he had placed a smaller trade or if there was more liquidity within the pool, he would be subject to less slippage.

As discussed in our article on gas fees, higher gas fees can facilitate faster transaction speeds and thus, provide an advantage in volatile markets.

A higher slippage tolerance acts similarly, allowing people to “front-run”, meaning that a transaction can be carried out faster, albeit with the associated high prices.

Additionally, front-running is notorious for connotations with “sandwich” attacks, which artificially inflate the prices of pending transactions on the blockchain mempool through higher fees and execute parallel trades to outpace and profiteer through slippage. However, in the case of hype for cryptocurrency projects and assets, or alternatively, tokens with low liquidity and volume, the slippage tolerance needed to process any given transaction may be high.

The future of DeFi rests in the hands of exchanges seeking to mediate pricing through true market prices for swaps vis-à-vis aggregation and properly addressing the issues surrounding volatility.

It can’t slip out of our hands.

Do you you want to enter the deep waters? Join our newsletter.