πŸ”ƒSwap

Swap

How to Swap on ALEX

The Swap function on ALEX provides a trustless and decentralized exchange (DEX) of tokens.

Using Swap

First select the β€œSwap” tab on the top menu bar to view the exchange panel:

https://miro.medium.com/max/878/0*bn9J7kUV2QmhvgAI.png

The token at the top is the β€œbase” token, or token that you currently hold and will submit in the exchange. The token below is the β€œquoted” token, or token that you will receive in the exchange. The central down pointing arrow, shows the direction of the transaction: in this example, xBTC will be exchanged for STX. The line below the quoted token box will show the current market exchange rate, as well as the USD equivalent.

Clicking on the central down pointing arrow will quickly invert the order of your transaction, so your base token becomes your quoted token and vice versa.

Clicking on the drop menu arrow on either the base or quote token will bring up the token search and selection panel:

Transaction Settings

Selecting the β€œgear” icon in the upper right-hand corner of the Swap panel will open the Transaction Settings panel. Here you can specify:

  • Slippage Tolerance: Slippage tolerance is the maximum % of price movement you’ll accept between where you agree to enter a transaction and it’s execution price. The standard or β€œdefault” slippage tolerance is 4% but you can select a custom percentage. If price movement exceeds the slippage tolerance, the transaction will be cancelled.

https://miro.medium.com/max/876/0*t4NYbWWCNuvRaK-A.png

Selecting the β€œthree dots” near the bottom left of the Swap panel, will show the transaction details such as:

  • Liquidity Provider Fee: for token pool. If you are interested in receiving a share of these fees as well as generous incentives.

  • Slippage Tolerance: described above.

https://miro.medium.com/max/894/0*msPfpSR10L9iYZFd.png

Confirm Transaction

Once you agree with the settings listed and are ready to move ahead, select β€œSwap” which will bring up the β€œConfirm Swap” panel. This provides a final overview of the details of your transaction, which as previously discussed include:

  • Route: Is the base token you are submitting and the exchange route taken to provide the quoted token you will receive.

  • Liquidity Provider Fee: Fee shared between the ALEX protocol and Liquidity Providers for the token pool. If you are interested in receiving a share of these fees as well as generous incentives.

  • Slippage Tolerance: The allowed range for price movement. If the price changes unfavorably by more than this percentage, your transaction will be cancelled.

Select β€œConfirm” which will bring up the smart contract confirmation window. This is the final confirmation that executes the transaction:

After selecting β€œConfirm” a final time you will see that your transaction has been broadcast, with a β€œView in explorer” link to verify your transaction status.

Please note, that it may take up to 20–40 minutes for your balance to be updated in your wallet. ALEX is built through Stacks smart contracts which settle on the security and finality of Bitcoin, and this transaction time reflects the Bitcoin block speed as well processing on the Stacks network.

Thank you for successfully swapping on ALEX!

Last updated