-
Notifications
You must be signed in to change notification settings - Fork 13
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
BE-695 | Implement PrepareResultPoolsInGivenOut API #621
base: BE-694
Are you sure you want to change the base?
Conversation
Implements `PrepareResultPoolsInGivenOut` API for computing exact amount out quotes. This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact amount out quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewer: This test file duplicated router/usecase/route/route_test.go
thus it was removed
tokenIn = pool.ChargeTakerFeeExactOut(tokenIn) | ||
|
||
// Update effective spot price | ||
effectiveSpotPriceOutBaseInQuote.MulMut(tokenIn.Amount.ToLegacyDec().QuoMut(tokenOut.Amount.ToLegacyDec())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for reviewer: I did some searching but still not entirely sure whether this formula is correct?
|
Implements
PrepareResultPoolsInGivenOut
API for computing exact amount out quotes.This is smaller chunk of bigger PR-607 ( #607 ) implementing computing exact amount out quotes.