🟩More about Slippage Tolerance
Symbiosis guide: Slippage tolerance explanation
Last updated
Symbiosis guide: Slippage tolerance explanation
Last updated
This article explains the importance of slippage tolerance and what happens when an on-chain or cross-chain swap cannot be completed because the slippage tolerance limit has been exceeded.
Let's begin with an example. Suppose you want to swap 101 USDT for USDC on Ethereum, which is an on-chain swap. The Symbiosis WebApp identifies the best route for this swap and displays certain values:
The 'to receive' token amount you see already accounts for the liquidity provider fees and other operational fees. But will you actually receive this exact amount? The real amount of tokens you receive might vary slightly from the displayed number, but it will always stay within the boundaries set by the slippage tolerance.
Slippage tolerance represents the maximum price fluctuation you're willing to accept for your trade to go through. To illustrate, if you see '100 tokens' as the 'to receive' amount and your slippage tolerance is set at 3%, the actual number of tokens you might end up with could be anywhere between 97 and 100. The calculation of cross-chain swaps is handled in a similar way, see the explanation below: Cross-chain Swap
Now, one might wonder: Why have slippage tolerance at all? Why not set it to 0%?
Setting a slippage tolerance to 0% would mean that you're not willing to accept any price deviation from the price displayed when initiating a trade. While this may sound appealing at first, there are practical reasons why it's not typically possible or recommended:
Price Volatility Especially in DEXs and DeFi platforms, prices can swing wildly. Minute market movements can cause a ripple in prices. At 0% slippage tolerance, even the slightest price drift would halt your trade.
Real-time Updates The price shown on your screen might lag slightly, given delays in data retrieval and display. By the time you press 'swap', the prevailing market price might have shifted, stopping your trade if you have no slippage tolerance.
Blockchain Confirmation Times There's a time gap between when you send a transaction to a blockchain and when it gets confirmed. Within this period, any ongoing transaction can nudge the price, potentially derailing your trade.
While it might be technically possible to set a very tight slippage tolerance close to 0%, doing so raises the odds of your transaction not going through. It's usually wise to set a realistic slippage tolerance, striking a balance between an acceptable price and the real-world mechanics of dynamic markets.
It's essential to differentiate between on-chain and cross-chain swaps:
If you do an on-chain swap and the price change goes beyond your set limit, your assets stay in your wallet. But remember, you'll still lose the fees (often called "gas" on many platforms) you paid to start the transaction.
Let's begin with an example. Suppose you want to swap 101 USDT on Ethereum for USDC on the BNB chain, which is a cross-chain swap. The Symbiosis WebApp identifies the best route for this swap and displays certain values:
It's similar to an on-chain swap but still there are some differences. The 'to receive' token amount you see already accounts for the liquidity provider fees and cross-chain fees. The actual amount of tokens you receive might vary slightly from the displayed number, but it will always stay within the boundaries set by the slippage tolerance.
Slippage tolerance represents the maximum price fluctuation you're willing to accept for your entire trade to go through. To illustrate, if you see '100 tokens' as the 'to receive' amount and your slippage tolerance is set at 3%, the actual number of tokens you might end up with could be anywhere between 97 and 100.
We come to the most interesting part: what happens when the price change surpasses our limit in the case of a cross-chain swap?
To understand this, it's essential to recognize that a cross-chain swap typically involves three sequential transactions across three distinct blockchain networks, equating to one transaction for each network.
Our example of a cross-chain swap: USDT on Ethereum for USDC on the BNB chain also consists of three transactions on different blockchain networks:
Swap of USDT for USDC on Ethereum,
Shift between Ethereum and the BNB chain on Symbiosis host chain,
Swap of BUSD for USDC on the BNB chain.
USDC on Ethereum and BUSD on the BNB chain serve as "transit tokens" for their respective blockchains. Transit tokens are used to facilitate cross-chain swaps between different blockchains.
If the transaction on the first (source) network surpasses the accepted price change, then your assets stay in your wallet.
If the transaction on Symbiosis host chain surpasses the accepted price change, then the cross-chain swap gets halted and you need to revert the operation to get your tokens back. Please see this guide: Stuck Transactions
If the transaction on the destination blockchain surpasses the accepted price change, then you will receive an appropriate amount of the transit token. In our example, it's BUSD on the BNB chain.
The default value for slippage tolerance is 2%. This value can be changed. When exchanging stablecoins, it's okay to set a lower slippage tolerance value. Still, please be aware that low slippage tolerance value may result in higher transaction fees, delays in transaction execution, or even failure to execute the transaction.
You can change the current value for slippage tolerance by pressing the cogwheel icon in Symbiosis WebApp:
The slippage tolerance limitgets distributed among these three transactions. This ensures that each individual transaction remains within its designated slippage tolerance fraction, guaranteeing that the cumulative price variation doesn't breach the overall slippage tolerance threshold.
Enter a new value and save the changes: