How to Swap

A tutorial on how to make a swap through Swift AI's swap app.

From the Swap page in Swift AI, you’ll be greeted with our apps swap UI.

Step 1: Pick Your Swap Pair

From the dropdown menus beside both top and bottom token selector, choose the two tokens that you’d like to swap.

What if the token I want to swap isn’t on Swift AI? 🤔

By default, the Swift AI application pre-loads most of the popular tokens for you. However, just because you can’t find a token, doesn’t mean that it isn’t swappable.

To import a token that’s not pre-loaded to the Swift AI application, copy and paste the token’s canister ID into the search bar.

If the token follows one of the token standards Swift AI supports (currently, only DIP20) then the symbol & logo will show up in search with a button to import it.

Once imported, if the swap pair has sufficient liquidity, you’ll be able to complete your swap!

The arrow between the top and bottom tokens points from the token that is being swapped to the token that is being gained.

Pro-tip: clicking the arrow will keep the same swap pair, but change the direction of the swap.

Step 2: Type An Amount & Set Slippage Tolerance

Enter the amount of tokens that you are looking to swap. Alternatively, enter the amount of tokens you are wanting to swap for. Completing either of these actions will auto-fill the other tokens corresponding amount.

Hovering over the Plug or Swift AI logos will give you a balance breakdown.

You can swap using tokens from your Swift AI balance, your Plug balance, or both. Swift AI automatically uses your Swift AI balance first. If you don’t have enough of a balance in Swift AI, additional tokens from your Plug balance will be used to cover the difference.

Under Transaction Settings, we can specify our ‘Slippage Tolerance’ for the swap.

Slippage refers to the percent change between the amount of the tokens we expect to receive from our swap, and the amount that we actually receive.

Slippage often occurs on decentralized exchanges because the size of the swap is too large relative to the amount of liquidity available in the swap pairings liquidity pool.

A higher slippage tolerance indicates that the trader is willing to accept less of the tokens they are swapping for as a penalty for swapping with a less liquid pool.

If the percent difference in tokens that the swap would execute is greater than your slippage tolerance, the swap will fail.

Step 3: Review & Complete

Clicking the large “Review Swap” button below the token selectors will highlight the tokens that you will receive if you go through with the swap.

If you’re satisfied with everything, you can click the “Confirm Swap” button. Swift AI will now communicate with Plug and ask you to sign a batch transaction that will complete your swap.

Be careful, this is your last chance to review your swap and make sure that you’ve entered the correct amount and are swapping the correct tokens. Once you confirm the Plug batch transaction, there is no going back!

After approving the transaction from Plug, your swap will be underway. This should take a few moments as it's making updates to the state of a few canisters.

Assuming all goes well, you’ll be brought back to the swap screen and be met with a notification of your swap. The tokens you swapped for have been deposited directly into your wallet in Plug under the “Tokens” tab.

Last updated

Was this helpful?