Skip to content

Add STON.fi two-hop swap support#1114

Merged
0xh3rman merged 3 commits intomainfrom
stonfi-multi-hop
May 11, 2026
Merged

Add STON.fi two-hop swap support#1114
0xh3rman merged 3 commits intomainfrom
stonfi-multi-hop

Conversation

@0xh3rman
Copy link
Copy Markdown
Collaborator

@0xh3rman 0xh3rman commented May 10, 2026

Simulator Screenshot - iPhone 17 - 2026-05-10 at 20 09 25

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces multi-hop swap support for the STON.fi provider, enabling path-finding through intermediary tokens such as TON and USDT. Key changes include the implementation of path simulation logic, updates to the STON.fi v2 transaction builder to handle multi-hop payloads, and a refactor of address types. Feedback indicates that the minimum output for the second hop in a multi-hop swap should be scaled based on the first hop's slippage to prevent unnecessary transaction reverts. Additionally, it was recommended to allow multi-hop routes for native assets to improve routing efficiency.

Comment thread crates/swapper/src/stonfi/tx_builder/v2.rs Outdated
Comment thread crates/swapper/src/stonfi/provider.rs
Comment thread crates/swapper/src/stonfi/provider.rs
Comment thread crates/swapper/src/stonfi/provider.rs Outdated
Comment thread crates/swapper/src/stonfi/provider.rs
@gemcoder21
Copy link
Copy Markdown
Contributor

or maybe add tsTON to multi hope too

@0xh3rman 0xh3rman merged commit c0a5cd6 into main May 11, 2026
4 checks passed
@0xh3rman 0xh3rman deleted the stonfi-multi-hop branch May 11, 2026 02:45
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.

2 participants