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

Calculating fixed delivery quotes for different asset scales results in wrong exchange rate #3163

Closed
mkurapov opened this issue Dec 6, 2024 · 0 comments · Fixed by #3165
Closed
Assignees
Labels
type: bug Something isn't working

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Dec 6, 2024

Bug description

When we are getting local quotes for a fixed delivery amount (i.e. in the cases where we have an incoming amount on the incoming payment, or have specified a receiveAmount in the quote request) across two different asset scales, we are incorrectly inverting the exchange rate:

This is the result of getting a quote from asset scale 2 to asset scale 9:

Image

The quote from the above should instead be a 10:
100,000,000 (scale 9) -> 10 (scale 2). Moving the decimal place 7 places

@mkurapov mkurapov added the type: bug Something isn't working label Dec 6, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Dec 6, 2024
@BlairCurrey BlairCurrey self-assigned this Dec 6, 2024
@BlairCurrey BlairCurrey moved this from Backlog to In Progress in Rafiki Dec 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Rafiki Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants