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

fix: routing-api still honor portion amount from URA for exact out #390

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

unicorn-here
Copy link
Collaborator

@unicorn-here unicorn-here commented Oct 12, 2023

bug is we removed the portionAmount for exact out https://github.com/Uniswap/routing-api/pull/387/files#diff-dc59a746b92820090d0a892e1c87af0233d56b63105153041d3af30705b3c9afL273-R279 But URA still passes down portionAmount for exact out in https://github.com/Uniswap/unified-routing-api/blob/main/lib/providers/quoters/RoutingApiQuoter.ts#L190-L197.

There's a URA clean-up PR that removes URA from sending down the portionAmount at all https://github.com/Uniswap/unified-routing-api/pull/282/files#diff-629f71c698e1f122086df5a5ef4ef75d8b58a8759f3f2e897a2ab6ffe52b1322L194-R125. But it's not ready to get merged. In order to unblock e2e testing, routing-api needs to honor portionAmount from URA if it exists. If not, then honor portionBps and compute portionAmount. This logic is needed, because routing-api integ-test doesn't send portionAmont even for exact out.

We will want to revert this PR, once Uniswap/unified-routing-api#282 gets merged.

@unicorn-here unicorn-here force-pushed the fix_portion_amount_exact_out branch from 976e417 to 2499b57 Compare October 12, 2023 01:51
@unicorn-here
Copy link
Collaborator Author

https://app.warp.dev/block/NvZUx7lC7khBqg5BT6s0YW has correct amountOut 100150 after addressing the feedbacks.

@unicorn-here unicorn-here merged commit 91fed2c into main Oct 12, 2023
3 checks passed
@unicorn-here unicorn-here deleted the fix_portion_amount_exact_out branch October 12, 2023 01:56
@unicorn-here unicorn-here restored the fix_portion_amount_exact_out branch October 13, 2023 20:07
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.

3 participants