All Collections
Swap
Why is my swap failing?
Why is my swap failing?

Solana's SPL token swaps

Jakov avatar
Written by Jakov
Updated over a week ago

Troubleshooting Common Swap Errors on Our Decentralized Exchange (DEX)

Swapping tokens on our in-wallet swap tab is a convenient way to exchange cryptocurrencies. However, you might occasionally encounter errors during the process. This guide addresses common swap errors and provides solutions to help you resolve them independently.
​

Understanding Swap Errors:

Before diving into specific errors, let's understand how swaps work on decentralized exchanges, DEXes:

  1. Initiation: You select the tokens you want to swap and the amount you wish to exchange.

  2. Smart Contract Check: The DEX verifies if there's enough liquidity (available tokens) in the relevant pool to facilitate your swap.

  3. Execution: If sufficient liquidity exists, the swap is executed, and you receive the desired tokens. However, if there's insufficient liquidity or other issues, the swap may fail.

Common Swap Errors and Solutions:

  1. Slippage Tolerance:

    • Error: The swap fails due to exceeding the slippage tolerance.

    • Explanation: Slippage refers to the potential difference between the estimated price you see initially and the actual price executed on the blockchain. To protect users from significant price swings, there is a default slippage tolerance (often 0.5%). If the actual price change during the swap exceeds this tolerance, the swap is canceled to prevent excessive losses.

    • Solution: You can retry the swap by adjusting your slippage tolerance. Click the icon in the top right corner to access these settings.


      Increase the slippage tolerance in small increments (e.g., 0.25% or 0.5%) until the swap executes successfully. Be aware that a higher slippage tolerance allows for a larger price difference but may also result in you receiving slightly fewer tokens in return.

  2. Insufficient Liquidity:

    • Error: The swap fails due to insufficient liquidity in the pool for your desired trade.

    • Explanation: Swaps happen through liquidity pools, which hold reserves of both tokens being exchanged. If the pool doesn't have enough of the token you want to receive, the swap cannot be completed.

    • Solution: There are two options:

      • Choose a different swap route: Explore these options and select a route with sufficient liquidity.

      • Reduce your swap amount: If alternative routes aren't suitable, try reducing the amount you want to swap. This might increase the chances of finding a pool with enough liquidity to accommodate your trade.

  3. Network Fees and VPN Issues:

    • Error: The swap fails due to insufficient SOL for network fees or VPN interference.

    • Explanation: Swapping on our DEX incurs network fees paid in SOL, the Solana blockchain's native token. Ensure you have enough SOL in your wallet to cover these fees (recommended minimum: 0.01 - 0.05 SOL). Additionally, some VPNs can disrupt communication with the DEX.

    • Solution:

      • Ensure sufficient SOL: Check your wallet balance and top up on SOL if needed.

      • Disable VPN (temporarily): Try disabling your VPN or switching to a different server location. Re-enable it only after a successful swap.

  4. 0x1771 Error (Advanced):

    • Error: You encounter the specific error code 0x1771.

    • Explanation: This error typically indicates insufficient liquidity. However, in some cases, adjusting the slippage tolerance can resolve it.

    • Solution (for advanced users only): Carefully increase the slippage tolerance in small increments as mentioned earlier. Remember, higher slippage allows for a larger price difference but reduces the number of tokens received.


​Understanding Price Impact
​

When swapping tokens on DEXs, it's important to consider price impact. Price impact refers to the influence your swap has on the price of the tokens being exchanged. Here's a breakdown:

  • Liquidity Pool Size: Smaller liquidity pools are more susceptible to price impact. When you swap a significant amount of tokens in a small pool, it can affect the overall price of the tokens within the pool.

  • Trade Size: Larger trades inherently have a higher price impact. Swapping a large amount of one token for another can cause the price of the token you're buying to increase and the price of the token you're selling to decrease.

Minimizing Price Impact:

  • Smaller Swap Amounts: Consider breaking down your swap into smaller transactions, especially when dealing with larger quantities. This can help reduce the overall impact on the token price.

  • Lower Slippage Tolerance: A lower slippage tolerance minimizes the potential price difference between the estimated and actual swap price. However, this might also lead to failed swaps if the market price fluctuates significantly
    ​

Additional Tips:

  • Always double-check the tokens you're swapping and the amount before initiating a swap.

  • Review the latest transaction fees to ensure you have enough SOL to cover them.

  • If you encounter errors beyond those mentioned here, feel free to contact our customer support team for further assistance.

By understanding these common swap errors and their solutions, you can troubleshoot them effectively and ensure a smooth swapping experience on our DEX.

Did this answer your question?