Type: DEX Aggregator | Docs: docs.kyberswap.com
Overview
KyberSwap is a DEX aggregator that routes trades through the optimal path across multiple liquidity sources. On Monad, it aggregates liquidity from native AMMs and orderbooks to provide best-execution pricing. The SDK uses the KyberSwap API for routing - no on-chain calls are required for quotes.Functions
getKyberSwapQuote()
Returns an optimized swap quote via the KyberSwap routing API. Parameters| Name | Type | Description |
|---|---|---|
tokenIn | Address | Input token address |
tokenOut | Address | Output token address |
amountIn | bigint | Exact input amount |
| Field | Type | Description |
|---|---|---|
amountOut | bigint | Expected output amount |
amountOutUsd | number | Output value in USD |
gas | number | Estimated gas cost |
route | RouteStep[] | Array of routing steps { exchange, tokenIn, tokenOut, swapAmount } |
priceImpact | number | Price impact percentage |
encodedSwapData | Hex | Calldata for executing the swap |
getKyberSwapPrice()
Returns the current spot price for a token pair using KyberSwap routing. Parameters| Name | Type | Description |
|---|---|---|
tokenIn | Address | Input token address |
tokenOut | Address | Output token address |
number. price of tokenIn in units of tokenOut.
Contract Addresses
| Contract | Address |
|---|---|
| MetaAggregationRouterV2 | 0x6131B5fae19EA4f9D964eAc0408E4408b66337b5 |