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

Add an estimate of gas fee's for withdrawals when releasing funds #5510

Closed
3 of 5 tasks
daunatv opened this issue Dec 18, 2023 · 0 comments · Fixed by #5668
Closed
3 of 5 tasks

Add an estimate of gas fee's for withdrawals when releasing funds #5510

daunatv opened this issue Dec 18, 2023 · 0 comments · Fixed by #5668
Assignees
Labels

Comments

@daunatv
Copy link

daunatv commented Dec 18, 2023

Story

So when you prepare to withdraw and release funds from Vega you will not know the gas cost until your funds are ready for withdrawal and at that point you can't change your mind.
We have had users trying to withdraw 25 USD but at the time they realised gas fee's were so high that it basically cost them 25 USD to withdraw it was too late, so now they leave them at pending.

Would be good to give an estimate of the fee so that someone does not try to withdraw a tiny amount that does not end up being financially viable.

Screenshot 2023-12-18 at 11 21 11 Screenshot 2023-12-18 at 11 15 38

Tasks

  • Add the gas estimate to the table above with the linits / delays etc
  • If the cost of gas is "high" show a warning
    • Ideally we could look at historic withdrawals and compare to an average and show it as green / amber / red relative to this
    • An easier solution might be to just compare the gas cost to the size of your withdrawal, if your're paying more in gas than you're withdrawing that could be a warning
    • Or we could simply look at historic data and set some thresholds manually, that would be the easiest (LETS DO THIS cos its easy)

Current implementation:

It compares the gas fee to the withdrawal amount and colours the gas fee estimation:

  • red - if the amount is lower than the base gas fee
  • amber - if the amount is lower than the maximum gas fee
  • white/black - otherwise

Additional notes

Check ethers methods and / or metamask API to have a look at this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants