tendermint / liquidity

Cosmos SDK Liquidity module
Apache License 2.0
138 stars 56 forks source link

Tiny amount of coin left after "max" swap option #307

Closed Kopyno closed 3 years ago

Kopyno commented 3 years ago

Summary of Bug

After swaping MAX amount of selected coin via "max" button, minimum amount of this token is still showing in balance.

image

image

image

Version

I don't know how to find out the version but my contest wallet address is following: cosmos15j58q4ujcy3ae2lgaeuk9tm9luukxy3zqqflhm

Steps to Reproduce

When I noticed this "bug" with DVPN --> AKT and BTSG --> AKT I have decided to do it again so I can make print screens. It happened again with DVPN but BTSG seemed to swap flawlessly without any BTSG left. I did print screens and decided to do it with DVPN for the third time. However after third attempt DVPN balance was showing zero.

Therefore I am not sure if this is a bug but I am pretty sure I have selected the "max" option every time. Maybe it will be visible to you in the action log of my wallet somehow.

Here is how I did it: I had selected "max" amount of the selected coin to swap into the AKT. Then after the swap I noticed that the balance is not showing zero but there is minimum amount left. I think this is not supposed to happen when you select "max" option.

However since I was able to reproduce this two times out of three, maybe it is not a bug and it has something to do with slippage. I really don't know.


For Admin Use

maydany commented 3 years ago

Yes, as you said it is fractional success and one of powerful feature of liquidity module https://github.com/b-harvest/liquidity Thank you for this level of reporting!! very impressive 👍