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: use fee asset for dust amount conversion #8172

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Nov 21, 2024

Description

  • Use feeAsset to convert dust amount to ensure the correct amount of dust sent for savers withdrawal transactions. (fixed unobserved tx due to too low dust)
  • Always account for dust amount for "has enough fee balance" error to work for tokens as well as native asset
  • Update outbound fee to include 4x buffer to ensure there is enough asset to cover the withdrawal (fixed observed tx that can't complete due to not enough asset to process underlying swap out)
  • Update view to always show the dust amount denominated in fee asset (dust is always sent for a withdrawal and needs to be displayed token or native asset)
  • Remove decimal places on rune -> asset conversion (fixes withdraw max bug on usdc/usdt)

Issue (if applicable)

https://discord.com/channels/554694662431178782/886041582422356018/1309237779984551997

Risk

High Risk PRs Require 2 approvals

Low - savers withdrawals should succeed again (usdc/usdt)

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

Testing

  • Ensure you can withdraw usdc and usdt positions on ethereum
  • Ensure the correct dust amount fee is displayed to the user

Engineering

☝️

Operations

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

☝️

Screenshots (if applicable)

image
image
image
image

https://etherscan.io/tx/0x3b9976d9770edd28de241588cfb0f1af258b5c9c8fcb284261664fcc187ea56b
https://viewblock.io/thorchain/tx/3b9976d9770edd28de241588cfb0f1af258b5c9c8fcb284261664fcc187ea56b
https://indexer.thorchain.shapeshift.com/v2/actions?txid=3b9976d9770edd28de241588cfb0f1af258b5c9c8fcb284261664fcc187ea56b

@kaladinlight
Copy link
Contributor Author

Tx is now being picked up, but not completing the underlying swap in my test transaction.

@kaladinlight kaladinlight marked this pull request as ready for review November 22, 2024 18:19
@kaladinlight kaladinlight requested a review from a team as a code owner November 22, 2024 18:19
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.

1 participant