-
Notifications
You must be signed in to change notification settings - Fork 45
[Feature] Multi-Hop Swap Routing Logic #178
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignhelp wantedExtra attention is neededExtra attention is needed
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignhelp wantedExtra attention is neededExtra attention is needed
Description: Implement a Router contract capable of chaining multiple swaps together in a single transaction (e.g., swapping Token A -> Token B -> Token C).
Context / Motivation: Users shouldn't need to perform multiple manual transactions if a direct pair (A to C) doesn't exist or lacks liquidity. The Router is essential for seamless UX.
Acceptance Criteria: - [ ] Create a
swap_exact_tokens_for_tokensfunction that takes aVec<Address>representing the path.amount_out_minslippage parameter.Technical Pointers: The router shouldn't hold funds; it should act as an intermediary. Rely heavily on
env.authorize_as_client()to allow the router to pull the initial token from the user, then handle subsequent cross-contract calls.