Swap Aggregator
Last updated
Last updated
Like any good DEX, the most common functionality is token conversion. It easily allows you to exchange one token for another token, taking into account:
the best exchange rate
the best route, using one or more other DEXs
the maximum slippage allowed
the applicable fees
In the swap screen, it will be possible to select the departure token and the arrival token via drop-down lists. If the tokens are branded, the logos will appear.
In the first field, it will be possible to define the number of tokens to exchange. If you are logged in to the app, your wallet's token balance will appear below the drop-down list.
By clicking on the "MAX" button, the application will automatically enter the maximum value of tokens present in the wallet.
EXAMPLE 1
In the example below, the user wants to exchange 2 $EGLD for $JEX.
The system determined, at the time of use, that the best exchange rate was 15,742 $JEX per EGLD and that the best route for the user was to go through the JEX/EGLD pool available on xExchange.
The system also determined the conversion fee would be $0.037.
EXAMPLE 2
In this new example, the user wants to exchange 2 $EGLD for $JWLUSD.
The system determined, at the time of use, that the best exchange rate was 56.9796 $JWLUSD per EGLD and that the best route for the user was to go through the EGLD/USDC pool available on xExchange then the USDC/JWLUSD pool on AshSwap. This is a so-called “complex” route since it uses at least 2 different DEXs.
The system also determined that the conversion fee would be $0.057, higher than for simple routing. In any case, despite higher fees, the exchange rate remains more advantageous for the user.
To enable you to best exchange your tokens, 2 tools are available:
integrated graph allowing you to visualize the evolution of the exchange rate over time (available only on certain pairs)
routes analyzed by our aggregator to define the most advantageous exchange rate for the user
These tools are available via 2 buttons located at the top right of the swap screen.
REAL TIME CHART
TESTED ROUTES
As part of a token exchange, it is possible to adjust the “slippage” rate.
Slippage occurs when there is a difference between the expected price of a token trade and the actual price at the time the trade is executed. This happens when there is high demand for the token in question. Slippage is generally greater when a large amount of tokens are traded, as this can affect the price of the token. Users should be aware of slippage when trading on DEXs and take this factor into account when calculating their trades to avoid unpleasant surprises.
By convention, it is considered that a slippage rate of 1% or less is "normal", beyond that the user can take risks.
It is sometimes necessary to increase this rate to allow a transaction to take place, particularly in the case of a listing where a large number of exchanges can be made in a very short time leading to significant movements in the price and therefore the exchange rate.
When executing the transaction, if the system detects that the number of tokens received will be less than the number of tokens expected taking the slippage percentage, it will fail and the user will receive their initial tokens.