Swap Between Different Tokens Across Chains
Access Any Token On Any Chain All Via A Single Swap
For ease of communication, KyberSwap is referred to as "we" in this disclaimer. Any natural persons or other entities who engages in any activities on KyberSwap shall be considered as the user of KyberSwap, and is referred to as "you" in the disclaimer. We hereby remind you of the risks involved in using third-party services (referred to herein as “third-party services”).
- 1.Your use of any third-party services on KyberSwap is your personal decision and we have no control over it.
- 2.We are not responsible for the audit of any third-party services, nor do we make any commitments or guarantees on the validity, accuracy, correctness, reliability, quality, stability, completeness and/or timeliness of the technology and information involved in such third-party services and their associated services.
- 3.You are solely responsible for all outcomes arising from your choice to use the third-party services and their associated services.
- 4.You shall make your own judgement and evaluation as to whether any third-party services and its associated services comply with the applicable laws, regulations and relevant policy requirements of your jurisdiction. We do not provide any recommendation and opinions on this subject apart from recommending you to strictly abide by the laws and regulations of your jurisdiction.
- 5.Outcomes and occurrences which arise out of your use of any third-party services, including but not limited to legal issues, contract liability issues, and economic loss issues, shall be resolved between you and the relevant third-party services. We are not responsible for the resolution of any outcomes or disputes arising from your choice to use the third-party services.
- 6.We will not share any information with any third-party services unless under your consent. Once we receive your consent, you shall be solely responsible for all legal liabilities and disputes resulting from any third-party services access to your personal information and such labilities and disputes shall be resolved between you and the relevant third-party services.
Our provision of access to third-party services on KyberSwap does not amount to any kind of recommendation, endorsement, or advice to use any third-party services or its associated services.
Axelar delivers secure cross-chain communication for Web3, enabling you to build Interchain dApps that grow beyond a single chain. Secure means Axelar is built on proof-of-stake, the battle-tested approach used by Ethereum, Polygon, Cosmos, and more. Cross-chain communication means you can build a complete experience for your users that lets them interact with any asset, any application, on any chain with one click.
axlUSDC is a wrapped, multi-chain representation of USDC, a dollar stablecoin. For each unit of axlUSDC, there is a unit of USDC locked in an Axelar Gateway on Ethereum. axlUSDC is secured by a dynamic validator set running delegated Proof-of-Stake, which holds key shares in the Axelar Gateways via multi-party cryptography.
Squid utilises existing DEXs to swap and send any native token between chains. This can be done via their SDK, Front End or Contracts directly.
Swaps are composable with Axelar's generalised message passing, so Squid can enable one-click transactions between any application and any user, using any asset.
Buy NFTs from any marketplace, use multi-chain DeFi, play a game on another chain, all without signing multiple transactions or downloading multiple wallets.
By routing transactions through axlUSDC/USDC stable swap pools as well as USDC/native token pools, Squid supports swapping of any token combination across supported chains. Built on top of Axelar, Squid leverages Axelar's general cross-chain messaging abilities as well as its axlUSDC ecosystem to enable secure cross-chain token swaps.
KyberSwap x Squid
Squid is integrated on KyberSwap through API front end functionality to provide users with an option to conveniently swap tokens across the following supported chains:
- Ethereum (ChainID: 1)
- BSC (ChainID: 56)
- Arbitrum (ChainID: 42161)
- Polygon PoS (ChainID: 137)
- Optimism (ChainID: 10)
- Fantom (ChainID: 250)
- Avalanche (ChainID: 43114)
- Linea (ChainID: 59144)
Connected chain and wallet
As this is a cross-chain swap (i.e. swapping tokens on an origin chain to a different token on a destination chain), you will have to specify the following swap parameters:
- Origin chain: The input chain where the input token you are swapping out from is hosted. The origin chain will have to match the connected chain in step 1.
- Input token: The token to swap out from the origin chain.
- Destination chain: The output chain to receive the output tokens from the swap.
- Output token: The token to receive on the destination chain. Note that tokens will be sent to the same address on the destination chain (i.e. the address used to send input tokens will be equivalent to the output token address but on a different chain).
Select chain and token
Specify the amount you would like to swap by either typing in an amount manually or by clicking the account balance in the input form to swap all tokens in your wallet. An estimate of the amount returned should appear in the quote field.
KyberSwap Interface allows users to customize trade parameters which enables greater trade security or even more advanced trade strategies. Refer to Customizing trade parameters section for more details.
Specify cross-chain swap amount
As market conditions can change during processing of the cross-chain swap, Axelar implements a safeguard against excessive slippage by transferring axlUSDC to the trader's wallet if the slippage for the last token swap exceeds the configured slippage. Please refer to Squid Docs for more information about this fallback behaviour. In such cases, you can view your axlUSDC directly in the KyberSwap UI.
Approve or Permit KyberSwap to swap the tokens on your behalf. Proceed to Step 5 if token approval/permit is not required.
If this is the first time you are swapping this token on this network using this wallet, the "Swap" button will be greyed out. You will first need to approve/permit the KyberSwap smart contract to spend your tokens before proceeding with the swap.
In the pursuit of greater gas savings for our users, KyberSwap has implemented a permit option for tokens which follow the ERC-2612 standard. In contrast to the basic ERC20 token implementation, ERC-2612 enables gasless approvals of smart contract allowances with just a signed message. In other words, approving a token via "Permit" does not require any gas and achieves the same effect as the ERC20 "Approve". If you see a "Permit" button, it means your token is eligible for gasless approvals!
Click on the "Permit [Token]" button to allow KyberSwap to swap the tokens on your behalf.
Permit EIP-2612 compatible tokens
To ensure the safety of your tokens, users will be prompted to sign the transaction for the exact amount in their wallet UI. By signing the permit request, this ensures that KyberSwap is only able to swap the exact number of tokens from your wallet. As long as the accumulated tokens for current or future swaps exceeds this limit, another permit process will be required.
Upon signing the permit, you will then be able to proceed with the swap.
Note the value in the signature request matches the swap amount
By permitting the swap, you are authorizing KyberSwap to swap the exact amount of tokens specified in the trade for the next 24 hours. This 24 hour deadline is implemented as a safety mechanism to ensure that the permit expires in case a corresponding swap order was not submitted or in the highly improbable event that an order was not filled. A new permit will be required upon the expiration of the current permit.
Note that the granting of a permit and the confirmation of a swap (step 5) are separate transactions whereby the latter is unable to proceed without the completion of the former. More importantly, as opposed to permits, swaps will always require gas to be paid as token transfers have to be confirmed by the network. As such, in the case whereby a swap remains in a pending state, it is possible to cancel the swap transaction in your wallet while the permit remains valid until expiry. If a future swap requires more tokens than an existing permit, the user will be requested to sign a new permit.
Click on the "Approve [Token]" button to allow KyberSwap to swap the tokens on your behalf.
To ensure the safety of your tokens, KyberSwap will also prompt you to select an allowance limit for the token being approved. By setting an allowance limit, this ensures that KyberSwap is only able to swap the specified number of tokens from your wallet. As long as the accumulated tokens for current or future swaps exceeds this limit, another approve process will be required. You can either set a custom allowance limit or opt for an infinite limit.
Hovering your mouse above the options will also bring up the helpers for your convenience.
Infinite allowance helper
Custom allowance helper
Note that setting a custom allowance limit via the KyberSwap UI will be available for all wallets except for MetaMask and Trust Wallet. For these, users will be prompted to set the allowance limit directly in their wallet UI. This avoids any tx failures caused by amount mismatch.
Set allowance limit in MetaMask
Upon confirming an allowance limit, your wallet will then prompt you to sign the transaction request with the relevant gas fees.
Click the “Swap” button to bring up the confirmation screen.
To protect our users from front-running, the confirmation pop-up will display a warning whenever a more aggressive max slippage has been configured for the swap.
Depending on the available liquidity for the tokens being swapped, the expected price impact could be significant. In such cases, the KyberSwap UI will display various warnings depending on the severity of the expected price impact. In the exceptional case that the price impact can not be determined, the swap will be disabled to ensure no negative impact to the trader.
Price impact is greater than 2% but below 10%
Moderate price impact
Price impact is greater than or equal to 10%
Extremely high price impact
In all the above cases, the confirmation screen will always display a few key pieces of information for review:
- Output Amount: Estimated return of output tokens on the destination chain after the swap.
- Minimum Received: This is the minimum amount of output tokens that you will receive on the destination chain from the cross-chain swap. The swap will only be completed if this minimum amount threshold is achieved else the transaction will revert. Refer Squid API.
- Estimated Processing Time: The expected amount of time for the output tokens to be received on the destination chain once the origin chain has executed the cross-chain swap. Refer Squid Transaction times for more information.
- Price Impact: The estimated change in the market price due to the size of your transaction.
Do take note of the resulting price impact of your trade as this will determine the final average price of your trade. Higher trade volumes relative to available liquidity will result in each additional token unit being acquired at a higher price. As such, a higher price impact would result in subpar swap rates.
- Gas Fee: The estimated network fee associated with this transaction. As a cross-chain swap involves transactions occurring across two chains, Squid simplifies the fees by charging a fixed network gas fee for all cross-chain transfers.
- Service Fee: Cross-chain swap fees charged by Squid for servicing the swap across-chains. Note that this differs from the gas fees which is required for the blockchain to process your transactions as well as the message relay fees which ensures the security of the cross-chain messages by incentivizing the relayers.
As an integrator, KyberSwap does not charge any additional fees for cross-chain swaps and have provided the functionality as a convenience feature for our users to quickly swap between tokens on different chains.
Upon confirming the swap in the UI, you will be prompted to sign the transaction in your wallet. In this example, we are using the MetaMask wallet to confirm the swap transaction.
Confirm transaction in wallet
Once the transaction has been confirmed in the wallet, your swap transaction will then be submitted to the network to be executed. You should see the Transaction Submitted screen appear. You can click on "View Transaction" to see your transaction on the blockchain explorer.
Upon the transaction being executed, KyberSwap will also send a notification to alert you that the cross-chain swap has been accepted by the network and is currently being processed.
Swap successfully executed on input chain
As the swap requires value to be moved across different chains, each with their own security mechanisms, the end-to-end transaction will require additional time to be finalized. You can view the status of your cross-chain transaction by bringing up the KyberSwap wallet explorer.
Cross-chain transaction in the KyberSwap wallet explorer