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

fix: fiat amount lps gas fee maths #7787

Merged
merged 4 commits into from
Sep 24, 2024
Merged

fix: fiat amount lps gas fee maths #7787

merged 4 commits into from
Sep 24, 2024

Conversation

NeOMakinG
Copy link
Collaborator

@NeOMakinG NeOMakinG commented Sep 23, 2024

Description

Inside the validation, we are taking the minimum dust threshold in account with the gas fees, but as a presentational value, we are only displaying the gas fees without the dust threshold

This PR does add the dust threshold to the gas amount to make sure what we display is equal to the actual security check

As a followup, we might want to bring back the 0.0001 dust threshold as written in the thorchain doc: https://dev.thorchain.org/saving-guide/quickstart-guide.html#basic-mechanics

Really low deposit could be not working anymore for BTC (under around 15$ deposits), but it would permit to withdraw from the BTC pool with a smaller amount

Issue (if applicable)

closes #7778

Risk

Low

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

  • Go to a sym BTC pool, try to withdraw sym
  • The gas fee amount should reflect the price for the actual dust threshold (0.0003 BTC, which is around 18$ at the time of writing) + the gas fees

Engineering

n/a

Operations

n/a

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

For BTC, the gas fee was under 1$

Now
image

Other pools are sane, tested AVAX, COSMOS, FOX
image

Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, confirmed current dust amount (0,0003 BTC i.e ~19 USD) is properly added and surfaced to users

image

@NeOMakinG NeOMakinG enabled auto-merge (squash) September 24, 2024 07:54
@NeOMakinG NeOMakinG merged commit 2f94c02 into develop Sep 24, 2024
3 checks passed
@NeOMakinG NeOMakinG deleted the btc-gas-lp branch September 24, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting "Not enough BTC to cover gas" trying to withdraw from BTC/Rune asym LP
2 participants