Multi-hop
Many TON jettons don’t have a direct pool with the asset you’re selling — but they probably have a TON pool. chop chains two pool swaps inside one DeDust transaction so you don’t pay two settlement gases.
How it works
DeDust pools accept a SwapStep chain in their swap payload. The first hop’s vault forwards the intermediate output directly into the second hop’s pool, all within one inbound message from the user. From the user’s wallet, it’s a single signed transaction.
User → DeDust Vault → Pool 1 (USDT/TON) → Pool 2 (TON/MEM) → User
\____________________ one message _____________________/chop finds the multi-hop path automatically. When asked to quote USDT → MEM (no direct DeDust pool exists), the DeDust adapter:
- Tries the direct pool. Returns
null— doesn’t exist. - Tries USDT → TON, then TON → MEM. Both exist.
- Reports a single quote whose
metafield holds two pool addresses, with gas budget set for two hops (~0.4 TON).
What you see in the response
From the API’s perspective a multi-hop is still one leg. The legs array tells you the DEX, not the number of pools touched. The only signal that the route is multi-hop is the higher totalGas (~0.45 TON instead of ~0.25 TON).
{
"bestRoute": {
"legs": [
{
"dex": "dedust",
"amountIn": "2000000",
"expectedOut": "14011837925064",
"minAmountOut": "13871719545813",
"messageCount": 0
}
],
"totalGas": "450000000"
}
}Slippage on multi-hop
chop only enforces minAmountOut on the final hop’s output. The intermediate (e.g. TON in a USDT→TON→MEM swap) isn’t bounded — but that doesn’t matter for safety, because the final-hop limit is what determines whether you receive enough of the asset you actually wanted. Worst case the swap completes with less of the intermediate than expected, but you still get at least minAmountOut of the output or the entire thing aborts.
StonFi multi-hop
StonFi’s public simulation API only returns single-pool routes. Multi-hop on StonFi would require chaining two of their router transactions, which isn’t atomic — that’s a planned addition. For now, multi-hop is DeDust-only; if DeDust doesn’t have both legs, the swap won’t route.
See Routing & splitting for how multi-hop interacts with cross-DEX splitting.