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

feat: thorchain savers withdraw sweep #5640

Merged
merged 14 commits into from
Nov 20, 2023

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Nov 20, 2023

Description

The follow-up of #5614, for withdraws.

Additionally:

  • improves perf so that react-escape-hatched queries use the same 5000ms staleTime, to avoid spamming THOR
  • abstracts THOR getHasEnoughXYZ into reusable methods
  • improves the minimum dummy 10_000 bps quote to handle missing expected_amount_out and quote.fees.outbound to ensure we get an outbound fees quote

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #5619

Risk

Withdraws are borked because of UTXO reconciliation and high fees currently, so this should only bring improvements.

Testing

  • Ensure withdraws trigger a sweep step when there aren't enough funds in your zeroth/active address
  • Ensure withdraws do not trigger a sweep step after sending enough for withdraw dust amount + Tx fees to your zeroth/active address
  • Ensure EVM native/token assets as well as Cosmos withdraws are still happy

Engineering

Operations

Screenshots (if applicable)

Sweep needed

Screenshot 2023-11-20 at 13 53 56 Screenshot 2023-11-20 at 13 53 56 Screenshot 2023-11-20 at 13 54 36 Screenshot 2023-11-20 at 13 54 47 image

Sweep not needed i.e all funds in zeroth address

image image image image

Minimum not met

image

Minimum met, but too low fees (UX to be confirmed by @reallybeard)

image

EVM withdraw

image image image image

ATOM withdraw

image image image image

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

src/lib/poll/poll.ts Outdated Show resolved Hide resolved
@gomesalexandre gomesalexandre marked this pull request as ready for review November 20, 2023 14:39
@gomesalexandre gomesalexandre requested a review from a team as a code owner November 20, 2023 14:39
@woodenfurniture woodenfurniture self-assigned this Nov 20, 2023
Copy link
Member

@woodenfurniture woodenfurniture left a comment

Choose a reason for hiding this comment

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

🧹
some non-blocking comments, but lgtm

@gomesalexandre gomesalexandre enabled auto-merge (squash) November 20, 2023 21:14
@gomesalexandre gomesalexandre merged commit a32d4ec into develop Nov 20, 2023
3 checks passed
@gomesalexandre gomesalexandre deleted the feat_thorchain_savers_withdraw_sweep branch November 20, 2023 21:20
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.

Unable to deposit/withdraw from UTXO ThorChain Saver Vaults
2 participants