-
Notifications
You must be signed in to change notification settings - Fork 2
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: Support cyclic swaps #102
base: main
Are you sure you want to change the base?
Conversation
b4154b6
to
8fe9c4f
Compare
8fe9c4f
to
5577b5a
Compare
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.
Just one major comment, the other one more minor. Please have a look!
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.
thank you @royvardhan ! Can we improve the PR name a bit please? the first part of the name doesn't mean much without more context. it should be a feat and something like: feat: Support cyclic swaps
… add testCyclicSwapWithTwoPools test to verify
62a66ff
to
ecf425a
Compare
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.
Thanks! It's looking good. Just a little request.
c29eaea
to
ae99f80
Compare
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.
Thank you 🙏🏼
While adding a cyclic swap test, I discovered that we are adding the
amountIn
toamountOut
whentokenInIndex
andtokenOutIndex
are same. I added acyclicSwapAmountOut
tracker to trackamountOut
in case of cyclic swap, and added both sequential and split swap tests that circles back to USDC(the start token of the swap)