Skip to main content

Swapping Tokens

Token swaps can be executed in two ways: at the current market price (Spot swap) or at a desired price (Limit swap).

In a spot swap, the trade is executed immediately based on the prevailing market rates, providing quick and straightforward token exchange.

In contrast, a limit swap allows users to specify the exact price at which they want to buy or sell tokens. The trade will only be executed if the market reaches this target price, giving traders more control over execution price but potentially requiring more time for the order to fill.

Spot Swap

To perform a token swap, you first need to select the desired token pair: "from - to". The first token in the pair is the one you will sell, and the second is the one you will buy.

Next, specify the swap amount. This can be done in two ways: either by entering the amount of the token you want to sell or by specifying the amount of the token you want to buy. The other value will be automatically calculated during the transaction simulation.

If the input data is correct, you will see the expected exchange price and other transaction details below, including:

  • Pool fee (LP Fee)
  • Blockchain fee
  • Minimum amount of the purchased token expected as a result of the swap
  • Price impact within the pool based on the chosen trade parameters
  • Slippage tolerance

By clicking the gear icon, you can adjust swap settings such as slippage tolerance, partial execution, and safe mode. More detailed explanations of each setting can be found in the "Concepts" section.

If needed, you can change the recipient address for the tokens. The address can be provided in any format (Hex, Bouncable, Unbouncable). By default, tokens are sent to the wallet address authorized in the protocol.

After filling in all the fields, you can initiate the transaction. To complete the process, you must confirm the transaction in your wallet. If the transaction does not appear in your wallet, try reauthorizing in the protocol and restarting the wallet.

Limit Swap

To perform a limit swap, you first need to select the desired token pair: "from - to". The first token in the pair is the one you will sell, and the second is the one you will buy.

Next, specify the desired exchange price. By default, the current market price is pre-filled, which is fetched from Dyor. You can enter the price in either format (e.g., TON/USDT or USDT/TON) by clicking the flip icon. The interface also shows the percentage deviation of the specified price from the current market price. By clicking the candlestick chart icon, you can view the price chart for this token pair from Dyor.

Then, select the Reward for executing the limit order. More details about this can be found in the Concepts section under the article "Limit Order". It is recommended to set the reward to at least 0.5 TON to ensure timely execution of the order.

By clicking the gear icon, you can access additional settings such as:

  • Order expiration time
  • Partial execution (enabled by default)

After filling in these fields, the expected token exchange price and transaction details will be displayed below, including:

  • Amount of the token to be sold
  • Amount of the token to be purchased
  • Sale price
  • Reward amount
  • Order expiration time
  • Blockchain fee
  • Pool fee (LP fee)
  • Amount of reserved gas (set aside to guarantee token delivery)

Once all fields are completed, you can initiate the transaction. To finalize the process, you must confirm the transaction in your wallet. If the transaction does not appear in your wallet, try reauthorizing in the protocol or restarting the wallet.

After confirmation, the limit order will appear shortly in the "Active Orders" list below. In this table, you can:

  • View the main parameters of the order
  • Cancel the order (via a refund transaction)

Fully executed or expired orders are shown in the "Inactive Orders" table. The interface allows:

  • Quick re-creation of orders with pre-filled data
  • Refund of tokens from expired orders
  • Return of unused reward and reserved gas to the trader