Swap Between Different Tokens Across Chains
Access Any Token On Any Chain All Via A Single Swap
Introduction
KyberSwap has integrated the Squid cross-chain swap and liquidity routing protocol to enable our users to perform cross-chain swaps directly on https://kyberswap.com/cross-chain.
More information can be found on our third-party integration page.
Axelar x Squid
What is Axelar?
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.
Click here for more information on Axelar.
What is axlUSDC?
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.
Click here for more information on axlUSDC.
What is Squid?
Squid is the cross-chain swap and liquidity routing protocol on Axelar Network.
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.
Click here for more information on Squid.
Why Axelar x Squid?
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 Integration
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)
Swap tokens across chains
Step 1: Connect your wallet
You can navigate to the cross-chain swap page via the Swap dropdown in the navbar or by directly pasting the following URL in your browser address bar: https://kyberswap.com/cross-chain.
Connect your Web3 wallet to KyberSwap and select the network that you would like to use for the swap using the selector at the top right of the Swap page.
Step 2: Specify your chain and tokens to be swapped
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).
Step 3: Configure cross-chain swap amount
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.
Protecting against slippage
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.
Squid Slippage Handling
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.
You can refer to Axelars Docs for the full list of axlUSDC contract addresses across the supported chains.
Step 4: Approve or permit contract to swap tokens
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!
Permitable tokens
Please refer to Permitable Tokens for the full list of tokens which have implemented the ERC-2612 standard.
Click on the "Permit [Token]" button to allow KyberSwap to swap the tokens on your behalf.
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.
A note on permits
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.
Step 5: Confirm the swap
Click the “Swap” button to bring up the confirmation screen.
In the case of the standard flow where the cross-chain swap:
is not expected to result in significant price impact or;
has not been configured with an aggressive max slippage;
the confirmation pop-up will be as follows:
Third-party integration: Squid
Note that in order to proceed with the cross-chain swap, users must acknowledge that the swap will be handled by Squid x Axelar. As such, users are encouraged to visit Squid's Docs to understand how their swaps are being routed and secured across the supported chains.
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.
Current Price: The rate at which the swap will happen (this can be inverted using the 🔁 button). Note that the rate is computed based on the response received from the Squid API.
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.
Price impact
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.
Please refer to the Price Impact page for further details.
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.
Squid x Axelar fees
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.
For more information on the fees that are incurred during a cross-chain swap, please refer to the Squid documentation on Fees and Gas Fees.
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.
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.
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.
Last updated