# Swap

**Swap?**It means exchanging your tokens for other tokens.

In the Swap function of Swapscanner, you can purchase all types of tokens at the lowest price through our own engine Navigator by aggregating all DEXs in Klaytn, including Klayswap, Definix, UFOswap, Claimswap, Pala, Neuronswap, Roundrobin, eklipse, and i4i.

The swap page is a simplified interface with only swap-related functions.

You can check the token exchange price difference between the Swapscanner and other DEXs.

You can see how Swapscanner's own engine Navigator finds the best price.

Traders can choose swap routing algorithm. The default is 'Gas Efficient'.

- Gas efficient algorithm : The gas cost is taken into account in the final receipt.
- Maximize return algorithm : This is the route with the maximum amount received without considering the gas cost.

With the Stable Swap 2.0 algorithm, Swapscanner is the cheapest even for trading between stablecoins.

Unlike other DEXs, which pay 0.x% fee for SWAP scale, Swapscanner imposes a fee for some (30%) of the amount saved through us. This is a fee structure only available on Swapscanner that guarantees buying tokens at the lowest price.

If there is no price comparator, 0.3% of the transaction amount will be charged as a commission.

If there is any change to the swap rate after updating the quote, we will provide you with the estimated shown.

Swapscanner is based on Autonomous Market Maker (AMM).

The existing asset exchange market had a system in which buyers and sellers enter the amount and price of the asset they wish to trade in an order book and wait for matching. In this system, the market maker proposes a transaction order at the midpoint between the prices suggested by a buyer and a seller and allows the transaction to be carried out quickly without significantly changing the value of the asset.

The order book method based on centralized intervention by market maker and rich liquidity was very inappropriate for initial virtual asset markets when considering the essence of decentralization and insufficient liquidity. AMM is the market maker that appears to solve these problems.

AMM is a mathematical algorithm that automatically determines the price of an asset according to a mathematical formula when a trader transacts an asset. AMM is based on a liquidity pool, and a liquidity pool is a smart contract where virtual assets are deposited for immediate asset exchange.

Namely, traders progress transactions with AMM based on the liquidity pool rather than with the market maker, and AMM has the advantage that transactions can be performed by always providing liquidity, regardless of the volume of trade order and the scale of liquidity pool.

AMM is based on the mathematical formula below.

- x, y: the volume of token x and y in the liquidity pool
- a, b: the ratio of the total value of token x, y to the liquidity pool (a+b = 1)
- k : constant

The graph of the AMM formula is shown below. The constant k always has the same value on the graph, and x and y move inversely in the curve with each other. As y increases by b in the liquidity pool, x decreases by a, so (x-a) +(y+b) is constant k equal to x+y.

According to this calculation, the amount and price of assets that can be purchased with a specific asset in the AMM graph are as follows.

- a, the number of token x, which can be purchased with b, the number of token y: x-(k/(y+b))
- When purchasing token x with b, the number token y, the price of token x (Xp): Xp = (b/a) +Yp

Last modified 10mo ago