KyberSwap Route Example: Large USDC to ETH Swap Step by Step

KyberSwap Route Example: Large USDC to ETH Swap Step by Step


Start a KyberSwap route for 500,000 USDC to ETH by requesting a quote on Ethereum: the route summary must exist before swap calldata can be built. The KyberSwap aggregator provides the context for that quote, finding swap paths across supported liquidity sources. For a large order, KyberSwap Aggregator can split USDC across pools and hops to seek more ETH than a single pool would return. The built transaction sets a minimum output; the router either completes every leg and delivers ETH or reverts the swap.

  • You end with native ETH at or above the encoded minimum, or a reverted swap.
  • Following the path takes the route summary, built transaction, and on-chain receipt.

KyberSwap Route Construction From Quote to Calldata

KyberSwap route construction starts with the trade’s fixed inputs: Ethereum, USDC in, native ETH out, and 500,000 USDC as the input amount. The following split is illustrative, not a live quote. Pool liquidity and prices at the time of the request determine the actual route.

  1. Request the quote. Send the token pair, chain, and input amount to the Aggregator API’s route query. The routing service evaluates candidate liquidity sources and returns a route summary with an estimated output. At this point, the trader has a proposed path, not a transaction ready to sign.
  2. Read the split. Say the illustrative route assigns 200,000 USDC to one direct USDC/WETH Uniswap v3 fee-tier pool, 180,000 to another, and 120,000 through a Curve USDC/USDT pool before a USDT/WETH hop. Each branch ends in WETH, the token held by these ETH-side pools. The split seeks better marginal execution as size moves the price in each pool; extra hops remain useful only when their output outweighs their fees and gas.
  3. Make the input spendable. Before the router can pull USDC, its spender address needs sufficient allowance from the sending wallet. An existing allowance of at least 500,000 USDC satisfies this dependency; otherwise an approval transaction must confirm first. Under the EIP-20 approval model, that allowance lets the spender use transferFrom. A route is ready to build and submit once the wallet holds the USDC and the correct spender has the required allowance.
  4. Build the transaction. Pass the selected route summary to the API’s separate build call with the sender, recipient, and slippage tolerance. The response supplies the router address and encoded calldata. The tolerance becomes a minimum output in that transaction: it protects the quoted ETH amount against adverse movement between quote and execution. Inspect the recipient, spender, input amount, and minimum before signing; a fresh quote may produce a different split.

The Uniswap v3 Core whitepaper describes liquidity concentrated within price ranges and multiple fee-tier pools for one pair. As a swap crosses ticks, available liquidity and its marginal price change. That explains why two direct USDC/WETH pools can contribute different amounts. It does not establish this example’s allocation: current pool states, other candidate paths, fees, and gas decide that.

Atomic Settlement and the ETH Receipt

Atomic settlement means the router executes the chosen legs within one Ethereum transaction. It pulls the approved USDC, sends each branch through its specified pools, combines the WETH output, unwraps it, and sends native ETH to the recipient. If execution produces less than the encoded minimum, the whole swap reverts: the pool trades and USDC movement roll back, while the failed transaction still consumes gas. A prior, separately confirmed approval remains in place.

The ETH receipt needs a different check from an ERC-20 receipt. The USDC leaving the wallet and WETH moving through pools appear as token-transfer events. Unwrapping WETH produces native ETH, whose delivery is visible in the explorer’s internal transactions or call trace, rather than as an ETH entry in the token-transfer list. Match that native transfer’s recipient and amount to the built transaction’s recipient and minimum.

For a wallet that both sends USDC and receives ETH, its ETH balance change also includes gas paid for the swap. Use the native transfer amount to verify the swap output, then use the balance change to account for gas. The successful receipt, USDC transfer, pool-leg transfers, and final ETH trace together show how the quoted route settled.

What is price impact on KyberSwap?

Price impact on KyberSwap is the difference between the order’s execution rate and the rate available for a tiny trade at the starting pool state. A 500,000 USDC order can consume nearby liquidity and move through less favorable prices. Compare the full-order output of candidate routes, including pool fees and gas, because a low-fee pool can still have worse execution at this size.

How much slippage should I set for a large swap?

Set slippage from the output shortfall you can accept between quote and inclusion, after examining current liquidity and how quickly the route may change. A tighter tolerance raises the chance of a revert; a wider one permits a lower fill. Price impact already reflected in the quote is separate from this tolerance. Requote near submission and inspect the resulting minimum ETH out rather than choosing a percentage from order size alone.

What is the KyberSwap router contract?

The KyberSwap router contract is the on-chain executor named in the built transaction. It uses the authorized USDC input, follows the encoded route, enforces the output minimum, and delivers the requested asset. Verify the router address returned for the current build before approving or submitting; the route summary alone is not the transaction destination.

Next Decisions for a Large USDC Order

Is a KyberSwap limit order better than a market swap for a large order?

A limit order fits when receiving at least a chosen rate matters more than immediate completion. A routed market swap fits when the current quote meets the trader’s minimum and execution now matters. Compare likely fill time, partial-fill terms, and the net ETH received under each method before choosing.

How does KyberSwap compare with 1inch on large orders?

Compare KyberSwap and 1inch using quotes for the same token contracts, 500,000 USDC input, chain, recipient, and near-identical timing. Examine net ETH output, gas estimate, route composition, and encoded minimum. Live liquidity changes the result, so the useful comparison is the executable quote for this order, followed by its settled receipt.

Report Page