description |
---|
Sourcing Capitally Efficient Liquidity For Your Trade |
KyberSwap allows you to swap tokens easily at superior rates by aggregating liquidity from different DEXs and aggregators on the network. Through splitting and optimizing trade routes across various liquidity sources, KyberSwap is able to source favourable rates for your swap.
Please refer to Supported Exchanges and Networks for the full list of decentralized exchanges which have been integrated with KyberSwap.
Trader Flow
- Connect Your Wallet
- Switching Networks
- Get Tokens
- Swap Tokens
- Instantly Swap At Superior Rates <-
- Swap At Your Preferred Rates
- Swap Between Different Tokens Across Chains
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.
Connected chain and wallet
You can either do this manually using the individual token selection buttons on the swap screen.
Specify tokens individually
or by searching for your desired swap pair using the search field. (The keyboard shortcut Ctrl+K also opens this search feature.)
Swap via smart search
{% hint style="warning" %}
Note that certain ERC20 token smart contracts implement a fee-on-transfer (FOT) mechanism whereby for every token transfer, a percentage of the tokens are burned or distributed to various wallets. As a permissionless dapp, KyberSwap enables users to Add Their Favourite Tokens and hence do not limit the type of tokens traded as long as the token follows the ERC20 standard.
Specific to swaps against AMM DEXs, tokens undergo multiple hops between various smart contracts during the course of a single swap. Multiple contracts are required to ensure the security of the swap as well as the accountability that accompanies clear functional separation between different smart contract teams. Given that FOT tokens are designed to charge a tax on every transfer, each token hop will incur a tax which is usually a percentage of the transfer amount.
For standard AMM swaps, the FOT tax will be charged twice as tokens are transferred from the pool contract to the executor contract to the recipient. If the swap involves a commission fee (configured by integrators or referees), an additional hop to the router contract is required to collect the fees.
For swaps, the token transfer happens after the swap logic has been processed based on the market price (i.e. calculating input/output amount). As such, the party that incurs the FOT tax will be dependent on the direction of the swap:
- For standard token to FOT token trades, the trader will receive FOT token minus the FOT tax.
- For FOT token to standard token trades, the pool will receive FOT token minus the FOT tax. Traders will not incur the FOT tax in this case.
Note that the FOT tax is specified in the FOT token's smart contract (i.e. the FOT token team) hence KyberSwap does not have any control over the FOT mechanism. Users are advised to trade such tokens at their own risk as KyberSwap was optimized to handle the standard ERC20 implementation. {% endhint %}
Specify the amount you would like to swap by either typing in an amount manually or by using the “Max” and “Half” buttons to swap pre-set proportions of your wallet balance. An estimate of the amount returned should appear in the quote field.
{% hint style="info" %}
Do note that the KyberSwap Interface will continuously update the swap rates in order to source superior rates for your swap given the changing market conditions. As such, you will always be able to see the latest proposed route and rates prior to clicking the "Swap" button.
Upon clicking the "Swap" button, KyberSwap Aggregator will attempt to secure the final route that will be displayed on the "Confirm Swap" pop-up (see Step 5). {% endhint %}
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.
{% hint style="danger" %}
KyberSwap enables you to avoid any negative trade outcomes by setting a Max Slippage. Please refer to Customizing trade parameters below for further details or Slippage if you would like to understand the concept better. {% endhint %}
Specify swap amount
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!
{% hint style="info" %}
Please refer to Permitable Tokens for the full list of tokens which have implemented the ERC-2612 standard. {% endhint %}
{% tabs %} {% tab title="Permit" %} 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
{% hint style="info" %}
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. {% endhint %} {% endtab %}
{% tab title="Approve" %} Click on the "Approve [Token]" button to allow KyberSwap to swap the tokens on your behalf.
Approve token
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. {% endtab %} {% endtabs %}
Click the “Swap” button to bring up the confirmation screen.
{% hint style="warning" %}
Do note that once the final route has been secured, the details related to your swap will be available for your review in the "Confirm Swap Details" pop-up.
In times of volatility, the market conditions might have changed in-between clicking the "Swap" button and the "Confirm Swap Details" pop-up being displayed. KyberSwap will display the latest rates in the "Confirm Swap Details" pop-up for you to review.
If there is a change in the price, to protect you, you will need to accept the new price before proceeding with the swap. Refer tabs below for the various scenarios.
Please review the swap information in full prior to confirmation as the final secured route might differ from the swap screen (see Step 3). As an additional safeguard, KyberSwap highly recommends that users take advantage of our "Max Slippage" feature (refer to Customizing trade parameters). {% endhint %}
{% tabs %} {% tab title="No change in price" %} If there are no changes to the swap price between viewing the route and confirming the route, the UI will display the following "Confirm Swap Details" pop-up.
Confirm swap with no change in price
{% endtab %}{% tab title="Better price" %} In the case whereby the market has moved in the trader's favor, the "Confirm Swap Details" pop-up will display the greater amount and users can proceed with the swap. The user can continue to swap at even better rates thanks to KyberSwap sourcing the most optimal and updated route.
Confirm swap with better rates
{% endtab %}{% tab title="Worse price" %} In cases whereby market conditions have moved against the trader, KyberSwap will display various warnings depending on the severity of the price deviation. To protect our users, additional safeguards are put in place to ensure that users are always in full control of their trades.
A warning is displayed but no additional steps are required to confirm the swap.
Confirm swap for price drop < 1%
A warning is displayed and user will have to accept the new amount by clicking on the "Accept New Amount" button.
Accept new amount for 1% < price drop < 5%
A strong warning is displayed and user will have to accept the new amount by clicking on the "Accept New Amount" button.
Accept new amount for 5% < price drop < 10%
A warning is displayed and user will have to accept the new amount by clicking on the "Accept New Amount" button. Additionally, users will have to manually type in their confirmation to validate that they consent to the significant price deviation.
Accept new amount for price drop < 10%
Manual confirmation of price drop greater than 10%
{% endtab %} {% endtabs %}In all the above cases, the confirmation screen will always display a few key pieces of information for review:
- Output amount: Estimated return after the Swap.
{% hint style="info" %}
For every swap executed by the KyberSwap Aggregator, users will be able to see an estimated output amount based on the current price as well as a minimum received that takes into account the max slippage setting. KyberSwap Aggregator will always strive to execute swaps at the estimated output amount and revert the transaction if the minimum received amount is not achieved.
In the event that the market moves in favor of the trade which results in a surplus of tokens above the estimated output amount (i.e positive slippage), this surplus will initially accrue to KyberSwap. Surplus sharing programs will be explored as the KyberSwap ecosystem grows to be more self-sufficient. Critically, traders will always get the estimated output amount as long as the swap is executed at or above the current rate.
Note that this surplus is different from fees as it only applies in cases where the executed swap rate is better than the estimated rate at point of transaction confirmation. Please refer to slippage for more information. {% endhint %}
- Current Price: the rate at which the swap will happen (this can be inverted using the 🔁 button).
- Minimum Received: This is the minimum amount of output tokens that you will receive from the swap. The swap will only be completed if this minimum amount threshold is achieved else the transaction will revert.
- Gas Fee: The estimated network fee associated with this transaction.
- Price Impact: The estimated change in the market price due to the size of your transaction.
{% hint style="danger" %}
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. Consider placing a limit order instead. {% endhint %}
- Slippage: The estimated difference between the expected price and final price of the trade. Slippage is an inherent characteristic of all active markets whose risks can only be mitigated. For more detailed insights, please refer to Slippage.
Click the “Confirm Swap” button to proceed. You should see the Transaction Submitted screen appear. You can click on "View Transaction" to see your transaction on the blockchain explorer. Additionally, you can add the token to MetaMask if you haven't already done so.
Transaction broadcasted confirmation
You should also see the transaction appear in your account’s transaction history.
Transaction history in the KyberSwap wallet UI
Advanced swap settings
The KyberSwap Interface also provides additional features for more advanced traders that allow customisation of the following trade parameters:
- Max Slippage: The maximum amount of slippage before the trade is reverted. Slippage refers to the difference between the expected and final price at which the trade was executed. As market conditions can change between the submission and execution of the trade, this guarantees that the trade will only be executed if the final price is within the expected price interval. For more details on slippage, refer to our Foundational Topics.
{% hint style="warning" %}
While KyberSwap recommends keeping the Max Slippage as low as possible to ensure that trades are executed at favourable rates, such transactions might face a higher failure rate in times of extreme market volatility.
Setting a higher Max slippage increases the likelihood of transaction success but comes with greater risks of worse rates due to market volatility as well as the presence of frontrunning opportunities. KyberSwap highly recommends setting a Max Slippage for all swaps to protect your trades. {% endhint %}
- Transaction Time Limit: The amount of time from submission that the transaction is valid for. If the transaction is not executed within the specified time frame, the transaction will be cancelled.
- Degen Mode: Refer to Degen Mode section below.
- Liquidity Sources: Select the liquidity sources (i.e. DEXes) through which your trade will be routed. By default, all KyberSwap supported DEXes on the connected chain will be selected. You can view the list of supported DEXs on each chain on the Supported Exchanges And Networks Page.
These settings can be accessed via selecting the slider icons on the main swap page:
Access trade settings
KyberSwap implemented Degen Mode for our most "advanced" apes. While KyberSwap has consistently iterated upon industry-leading safeguards to enable our users to trade safely, we are aware that some advanced traders might find these protective features inconvenient. As such, switching to Degen Mode allows users to conduct high impact trades without any confirmation prompts nor price impact limits.
{% hint style="info" %}
Note that even with Degen Mode turned on, any significant price deviations that occurs while the swap is being secured will still require user confirmation. Please refer to Route confirmation and market volatility for more details. {% endhint %}
By turning on Degen Mode, multiple safeguards will be overridden allowing users to:
- Configure max slippage ≥ 20% and ≤ 50%
- Confirm trades with price impact ≥10%
- Proceed with swaps when price impact is unable to be calculated
{% hint style="danger" %}
Tread carefully when turning on Degen Mode as slippage and price impact risks are not conservatively capped which could result in significant losses. KyberSwap recommends that users only activate Degen Mode if you are fully aware of the risks of unprotected trades. {% endhint %}
Degen Mode can be toggled on via the "Advanced Settings" pop-up covered in the previous section.
Degen Mode toggle
Upon toggling the Degen Mode switch, you will be prompted to manually confirm the switch.
Confirm Degen Mode
As a safety precaution, Degen Mode will be auto-disabled after 30 minutes of being switched on.