Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapper attempts to swap more than in wallet and fees beyond the input amount #5723

Closed
0xean opened this issue Nov 29, 2023 · 5 comments · Fixed by #6241
Closed

Swapper attempts to swap more than in wallet and fees beyond the input amount #5723

0xean opened this issue Nov 29, 2023 · 5 comments · Fixed by #6241
Assignees

Comments

@0xean
Copy link
Contributor

0xean commented Nov 29, 2023

Overview

Attempting to swap from BNB to ETH on the app with Frame injected as MetaMask

References and additional details

In the recording you can see me attempting to trade 1.4 BNB, the transaction that is created is for ~1.9 BNB ... way more than my total balance..

Screen.Recording.2023-11-29.at.1.06.59.PM.mov

This is also hidden if you dont click into the Expected amount tab, but is damn confusing when the Send shows 1.4 BNB

Screenshot 2023-11-29 at 1 09 34 PM

Acceptance Criteria

  • We should never suggest a transaction that is beyond what a user has in their wallet
  • we should also fix the UX here so a user isn't blindsided that they think they are sending 1.4 BNB but are ask to sign a tx sending ~2.0 BNB

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response

@0xean
Copy link
Contributor Author

0xean commented Nov 29, 2023

this also happens with avalanche -> ETH with lifi

@kaladinlight kaladinlight mentioned this issue Nov 29, 2023
3 tasks
@0xean
Copy link
Contributor Author

0xean commented Nov 29, 2023

Issues:

  1. Advancing in the trade flow beyond what a user has in their wallet
  2. Constructing a tx beyond what a user has in their wallet and beyond what the UI has showed
  3. Sorting incorrectly because the input amount is much larger than expected so the output isn't comparable with other providers
  4. Displaying in main UI that input is going to be higher for LiFI (or reduce the amount we tell lifi we are sending by their fees, or get them to fix this!)

@0xean
Copy link
Contributor Author

0xean commented Nov 29, 2023

Next steps:

  1. reach out to lifi - @0xean
  2. enforce 1 and 2 above - @woodenfurniture
  3. create sanity check that we never ask a user to sign a transaction that is larger than what a user input - @woodenfurniture

@woodenfurniture woodenfurniture self-assigned this Nov 29, 2023
@woodenfurniture
Copy link
Member

disabling the following bridges should avoid the issue in the short term
['stargate', 'amarok', 'arbitrum']

I'm going to action that and follow up with the other checks

@0xean 0xean moved this from To schedule to Up next in ShapeShift Dashboard Dec 4, 2023
@0xean
Copy link
Contributor Author

0xean commented Jan 29, 2024

@woodenfurniture - should we close this ticket at this point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants