Issue Report - Partial Execution and Inaccurate Balances in cSwap Transactions

I hope this message finds you well. I’ve come across a recurring issue while executing swaps on cSwap that I believe needs attention and resolution. Here’s the breakdown:

Problem: When executing a swap on cSwap, regardless of the pool’s liquidity, transactions are almost never fully filled. This results in failed transactions and unnecessary follow-ups. For example, during a swap worth $5, the front end displayed an expected result, but the actual outcome was different. In a specific scenario involving a swap of 0.5 ATOM, the front end indicated that I would receive 65 CMDX tokens. However, after the swap, only 59 CMDX tokens were reflected in my balance, and the deducted ATOM was approximately 0.46. While doing the same transaction using CLI, I was able to get 59CMDX for .455 ATOM. The difference here might me minuscule for small swaps, but this causes trouble in bigger swaps.

Proposed Solution: To address this issue, I propose implementing measures to account for slippage beforehand. Integrating backend calculations into the front-end display could offer users a more accurate representation of the outcome before confirming the swap. This step aims to eliminate partial executions, ensuring users receive the expected amount of tokens in cases where the liquidity is enough to do a full swap.

Additional Suggestion: Furthermore, introducing an “Estimate Swap Amount Out” function could prove beneficial. This feature would be particularly useful for projects looking to integrate cSwap into their backend processes, providing a reliable calculation tool for determining the amount of tokens users will receive after a swap.

Next Steps: I’m reaching out to the Comdex community to discuss this issue, gather additional insights, and collaborate on finding the best solution. Your experiences and thoughts on this matter are highly valuable.

Let’s work together to enhance the cSwap experience for everyone!

Hey @usagent,
Apologies for the delayed response and the inconvenience caused by the swap discrepancies on cSwap. We’ve noted the feedback, and want you to know that it’s being actively worked on by the devs as you’ve recommended. This includes more accurate swap outcome in the UI and the development of an “Estimate Swap Amount Out” function. Certain improvements you mentioned are already live on mainnet.
Thank you for your patience and support as we address these issues. Updates on our progress will be shared.

1 Like