-
Notifications
You must be signed in to change notification settings - Fork 9
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
V3 BatchSwaps #263
V3 BatchSwaps #263
Conversation
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.
Swap code is getting quite complex 👀
Makes sense given that we have to support single and batch swaps from 2 vault versions 😅
Overall I think looks good 👍
Will do a final review once Router is updated and we're able to add proper integration tests.
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.
Overall implementation looks really nice. 👏
I added some small comments for us to discuss.
Note: if you get the branch up to date with main, it has extended timeouts on the failing tests, so they don't break CI anymore.
…d in both to reuse as much common code as possible.
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.
LGTM! 👍
Biggest change is how we create call for V3 batchSwaps. Each independent path in
swapExactIn/Out
needs to have itsminAmountOut
/maxAmountIn
set correctly using the user defined slippage (compared to V2 where we just updated a single limit index). Discussed with Daniel/Juani and we belive the Router swap queries (not curently implemented) will be able to return the updated path amounts. These can then be used with user definied slippage to update the relevant paths during call build.