Introduction to Limit Orders on KyberSwap
A Limit Order is a way for KyberSwap traders to swap tokens at a specified price or better. This stipulation allows you to have better control over your prices and capital efficiency. Limit orders are not sent to any specific user, but can instead be filled by anyone, including the KyberSwap aggregator. You can also create limit orders via KyberSwap APIs. When the market price matches the price set in the limit order, a taker can fill it. When a taker fills the order, the taker pays the gas fees associated with the transaction
How to Create a Limit Order
Step 1: Connect your wallet
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: Navigate to the limit order page
From the Swap page, click the “Limit” tab on the token swap interface. This brings up the limit order interface.
Step 3: Specify your swap pair
You can either do this manually using the individual token selection buttons on the swap screen or by searching for your desired swap pair using the search field. (The keyboard shortcut Ctrl+K also opens this search feature.)
Note about Fee on Transfer Tokens
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 and swap any custom token, and hence does not limit the type of token traded as long as the token follows the ERC20 standard.
- Output token: In the case whereby a standard token is being traded for a FOT token, the FOT token is being transferred from the maker to the taker. Maker will receive the standard token less the swap fees while taker will receive the FOT token minus the swap fees AND FOT tax.
- Input token: In the case whereby a FOT token is being traded for a standard token, the FOT token is being transferred from the taker to the maker. Maker will receive the FOT token less the swap fees AND fee-on-transfer while taker will receive the standard token minus the swap fees.
For a swap between two FOT tokens, the FOT tax will be incurred by both parties. If the limit order is filled via the KyberSwap Aggregator, there will be an additional token hop via the aggregator smart contract hence the FOT tax will also be charged on the additional hop.
Step 4: Configure your order amount
Specify the amount you would like to offer by typing in an amount manually into the “You Pay” field. Please ensure that your wallet balance is sufficient to cover the swap offer.
Step 5: Configure your order price
Set the price by manually entering a price at the “Sell [token] at rate”. This will calculate an estimate of the amount you should receive in the “You Receive” field. KyberSwap will provide you with a percentage estimate of how much more favorable/unfavorable to you (the market maker) the specified price is relative to the current market price.
Note on Taker Fees and Filling of Orders
KyberSwap LO uses an off-chain relay, on-chain settlement mechanism which enables makers to create orders without requiring gas fees to be paid. However, takers of an order will have to incur a gas fee to settle the order on-chain. Depending on the chain where the LO is taking place, these gas fees could result in smaller trades being unprofitable.
For example, if it costs a taker 40USD in gas fees to settle an Ethereum LO on-chain, takers will unlikely execute smaller volume trades due to the transaction costs. As such, maker LOs with lower volumes will likely not be filled unless the price diverges significantly enough to justify a taker's gas fees. This effect is less pronounced on other chains where gas fees tend to be negligible.
To increase the likelihood that your LO will be filled, KyberSwap UI provides a handy helper whenever it detects that the current LO volume would likely result in unfilled orders.
Step 6: Specify the time limit of your order
If your order is not filled by the end of this time limit, it will be automatically cancelled. You can either select from a list of set times or specify a custom expiry time and date. Note that you can still manually cancel your order (or any unfilled portion of your order) before it expires.
Step 7: Approve contract to spend tokens
If this is the first time you are swapping this token on this network, click on “Approve [Token]”. Your wallet will prompt you to give your approval (an onchain transaction requiring gas) for the KyberSwap smart contract to transact using this token on this network. This is a one-time action and subsequent swaps involving this token will not require further approvals unless there is an update to the smart contract.
Step 8: Review and confirm your order
Click on “Review Order” to bring up the preview screen. Once you are satisfied with the details of the limit order, click “Place Order” to proceed.
You will need to confirm this onchain transaction in your web3 wallet.
Once the order has been confirmed you should see it appear in the Active Orders screen of the swap interface.
Note: When your order is completely filled it will be moved to the Order History tab of this interface.
Note on Limit Orders and Wallet Balances
Tokens which have been comitted to the limit order will only be deducted from the maker's wallet when a matching taker order is settled on-chain. This means that, up until the point when the limit order is executed the tokens remain available in your wallet and can be used in any of the usual ways. During execution, if there are insufficient tokens in your wallet, the limit order will not fill and therefore result in a failed transaction.
Limit orders can only be created if the user has sufficient token balances in their wallet at the point of placing the maker order.