Kyberswap routing: Split Paths, Token Amounts and Execution Costs
ยท last updated
Kyberswap routing can divide a swap across DEXs when their combined liquidity improves the quoted output for the selected trade. A route may also pass through intermediate tokens before reaching the token you want to receive. Trade size, available liquidity and gas costs influence which path the Aggregator selects. Splitting therefore reflects a calculation for a particular input amount and network. It does not mean that every trade needs several venues or that the quote fixes the final receipt.
In short: A split route is useful when the extra output value outweighs added execution costs for the same token amount and network.
Split Allocations and Intermediate Hops
Parallel paths distribute portions of the starting token amount among liquidity sources, with each branch contributing to the combined quote. A hop is one swap along a path; intermediate tokens connect successive hops. Route details show how these parts fit together: DEX labels identify venues, while pool entries identify the liquidity used within them. A longer route display can therefore reflect intermediate hops, parallel allocations or both. Read final output separately from intermediate-token amounts, because adding them together would count successive parts of the same conversion as separate receipts.
Why Can the Same Token Pair Use a Different Route?
Changes to the input amount or available liquidity can make the Aggregator rank a different route highest for the same pair.
An AMM, or automated market maker, quotes trades against liquidity in its pools. Increasing the input changes how much liquidity the trade needs and can change its price impact. Distributing that amount can reduce dependence on one pool when other sources provide a better combined quote.
Gas can change the ranking too, because splitting may add execution work across additional pools. The highest gross token quote and the most favourable gas-adjusted route can therefore differ.
Routing is also network-specific. The Aggregator splits ordinary swap routes among liquidity sources within the same network. Another supported network has its own pools and token contracts. Selecting a different network changes the search space, even when familiar symbols appear on both. Multi-chain availability does not make an ordinary swap a search across every chain.
Pools, Limit Orders and Market Maker Quotes
Supported AMM and order-book DEXs supply different forms of liquidity, and the Aggregator can also use active Limit Orders. Using an existing order in an instant swap differs from creating your own order for future settlement. Creating a Limit Order sets a preferred price, with execution dependent on available liquidity and a matching taker.
On Ethereum Mainnet, professional market makers provide off-chain quotes that the Aggregator settles on-chain when they offer more favourable rates. The quoting stage produces a trading offer, while settlement carries out the exchange on the selected network. Available sources and quotes determine which of these mechanisms can participate in a particular trade.
V1 Routing and Execution Parameters
V1 API settings control route selection and the conditions for executing an encoded transaction. These defaults apply to API requests; trading interfaces can select their own settings.
| V1 API Parameter | Value and Effect on the Swap |
|---|---|
onlyDirectPools
|
true
restricts routes to the input and output tokens without intermediate-token hops.
|
onlySinglePath
|
true
restricts the returned route to a single path.
|
gasInclude
|
true
by default; includes gas costs when searching for the best route.
|
slippageTolerance
|
The V1 build request uses basis points: 1 basis point equals 0.01%. An omitted value defaults to 0. |
deadline
|
The V1 build request uses Unix time in seconds. Its default is 20 minutes ahead; the deadline cannot be in the past. |
| A transaction deadline does not preserve the price of an earlier quote. | |
Slippage tolerance controls the minimum output accepted during execution, and the transaction reverts if it cannot reach that bound. A larger tolerance permits a larger difference below the quote. The execution deadline sets a separate time limit; neither setting reserves market liquidity or fixes the displayed price.
What Does a Larger Quoted Output Cost?
A larger quoted output improves the trade only when its additional value outweighs any additional execution expense. The output token and gas payment use different units, so comparing their values requires a common unit, such as USD. Subtracting raw gas units from token output mixes incompatible quantities, while estimates can differ from final charges.
Direct Aggregator swaps carry no protocol swap fee, while network gas and liquidity-source fees can still apply. An integrating application can configure its own fee. The fee base matters: an input-token charge affects the assets supplied, while an output-token charge affects the assets received. Charges configured by an application therefore belong in the assessment of its quoted trade.
For trades subject to surplus collection, output above the estimate initially accrues to the Aggregator operator. Dust collection captures unconsumed input or intermediate tokens that remain during execution. The confirmed slippage settings still apply, so these collection rules do not remove the minimum-output constraint.
Quote Freshness, Token Units and Authorization
Standard V1 requests separate route discovery from transaction building, allowing an application to refresh its quote before encoding a swap.
The build request uses the unchanged
routeSummary
returned by the route request.
The encoded response supplies data for the router; execution still requires the subsequent on-chain transaction.
Input and output amounts use each token's smallest units, so their raw values require separate decimal conversions. Dividing the raw amount by 10 raised to the relevant token's decimal count gives the amount in whole-token units. Using the input token's decimals to read the output can therefore misstate the expected receipt.
Market movement can make a route stale during review, while changing the pair or amount changes the requested trade. An application needs an updated quote when those inputs change to keep its route summary relevant.
ERC-20 spending approval grants a specified contract an allowance, which authorizes token transfers within that limit. Where approval is necessary, its spender must match the intended router; approval alone does not execute the swap. The subsequent transaction still requires authorization, including review of the recipient and execution constraints.
The Boundary Between Swaps and Other Routes
Same-network aggregation converts tokens through local liquidity, while Cross-chain Swap moves assets between supported networks using its own provider routes. The cross-chain feature also has its own fee structure, separate from the direct Aggregator swap fee. A route diagram containing several DEXs does not establish bridging: the source and destination networks determine whether the operation crosses chains.
Liquidity entry adds another distinction. KyberZap can use Aggregator routing to obtain the assets and proportions that a selected pool requires. KyberEarn supplies pool discovery and position management around that operation. Conversion inside a deposit serves the liquidity position, while a standalone swap targets the chosen output balance. Select the operation by the intended destination and the asset or position that it should create.
Kyberswap routing: quick answers
Does a Routing Response List Every Possible Path?
The standard V1 route endpoint returns the route that the Aggregator algorithm ranks best for the request. Its response may describe several branches within that chosen route. Those branches represent allocations inside one proposal, rather than an exhaustive menu of competing quotes.
Can a Routed Swap Use Only third-party Liquidity?
A routed swap can use only third-party liquidity when the selected pair has suitable liquidity on supported DEXs on that network and the returned quote selects those sources, even if the tokens have no pools on the Aggregator's own platform.
How Long Should an Application Cache a V1 Routing Quote?
V1 guidance recommends no more than 5-10 seconds of client-side route caching, with a fresh route before swapping after a delay; this is a refresh recommendation, not a guarantee that the quoted price remains valid.
Are Token Symbols Enough to Identify a Routing request's Assets?
An ERC-20 routing request needs the intended token contracts on the selected network, because matching symbols do not establish matching assets. Input and output selections must identify the token to sell and the token to receive. Similar names are especially easy to confuse.
Will Increasing Slippage Tolerance Fix a Missing Route?
Increasing slippage tolerance cannot supply missing liquidity. Unrecognized tokens and an absence of eligible pools are separate route-query errors; tolerance governs acceptable execution movement after routing. A larger tolerance can permit a worse price without resolving either error.
Can a Shared Swap Link Add Charges to a Routed Trade?
A shared swap link can carry charges configured by another platform or offer an optional tip. These amounts appear before confirmation. When the trader chooses to pay a tip, the entire amount goes directly to the sharer's configured wallet.