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 use max_streaming_quantity quantity in memos #5734

Closed
wants to merge 2 commits into from

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Nov 30, 2023

Description

See #5733 (comment) for reference - this tackles part of our problem by ensuring our streaming quantity conforms to the one returned by the quote as max_streaming_quantity.
This does not yet tackle the issue of 0 limit memos returned by THOR we then ignore and set our own limit instead.

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)

Risk

  • At worst, this should come as no change to our current logic, as 0 indicates let the network decide the best streaming quantity. Meaning that would be explicit instead of implicit here, but the actual limit used by THOR would be the same
  • At best, using an explicit quantity would make some current failing trades go through, if the 0 limit doesn't automagically work as it should

Testing

  • do a streaming swap and ensure it is still going through

Engineering

  • Ensure the interval we use for streaming swaps is the one we're getting from the quote as max_streaming_interval

Operations

Screenshots (if applicable)

Tested with two pairs/amounts as the quantity may differ depending on the pairs/amounts

10,000 USDT -> DAI

  • Develop - 0 quantity
Screenshot 2023-11-30 at 11 38 01
  • This diff - 53 streaming quantity
image

0.08 BTC -> DOGE

  • Develop - 0 quantity
image
  • This diff - 2 quantity
image

Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@gomesalexandre gomesalexandre marked this pull request as ready for review November 30, 2023 14:21
@gomesalexandre gomesalexandre requested a review from a team as a code owner November 30, 2023 14:21
@gomesalexandre gomesalexandre marked this pull request as draft November 30, 2023 18:02
@gomesalexandre
Copy link
Contributor Author

Closing in favor of #5748 - we may want to re-add explicit swap quantity in the future if we decide to expose memos to the user, but for now let's roll with the good ol' if it ain't broken don't fix it

@0xean 0xean deleted the feat_thor_max_streaming_quantity branch June 18, 2024 21:33
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