Skip to content

Add multihop swap support #62

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Add multihop swap support #62

wants to merge 2 commits into from

Conversation

busimus
Copy link
Contributor

@busimus busimus commented Dec 15, 2024

Added support for multihop swaps. It consists of multiple parts:

  1. Basic client-side router to suggest possible swap routes.
  2. Long form order encoder to build transactions for multihop swaps based on the chosen route.
  3. View-only contract CrocMultiImpact, which is used evaluate a multihop swap in one eth_call.
  4. An alternative swap class CrocSmartSwapPlan capable of utilizing all of the above while retaining all the usual swap features (slippage, fixed input or output, surplus).

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

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.

1 participant