Skip to content
Page Contents

Swaps

Theory

To Polkaswap means to exchange (swap) tokens on Polkaswap. Polkaswap is a non-custodial, cross-chain AMM DEX protocol for swapping tokens, Polkaswap removes trusted intermediaries and provides the opportunity for faster trading, and Polkaswap also combines multiple liquidity sources under a common liquidity aggregation algorithm, operating completely on-chain, in a trustless and decentralized way.

There are 3 main use cases for Polkaswap:

  • Swapping tokens
  • Providing liquidity
  • Removing liquidity

Along with the network fee in XOR, all three cases require an additional fee: liquidity provider fee, or LP fee. The LP fee is used to incentivise liquidity providers to supply liquidity in liquidity pools. Liquidity pools are described in this article.

Practice

TIP

We recommend using the SORA testnet for practice exercises. Here are the Testnet links:

  1. Polkaswap test application
  2. Polkadot js SORA testnet application
  3. Android testnet application
  4. iOS testnet application

In the practice section we'll Swap tokens. Providing and Removing the liquidity will be explained in subsequent articles.

Via Polkaswap

Swapping tokens means exchanging from token A to token B. Polkaswap provides a user friendly interface for swapping tokens.

  1. Open the Swap page:

  2. Select the source asset (the asset you'd like to sell) and the destination asset (the asset that you'd like to buy). Click on the asset drop-down menu to select them:

    The assets from you wallet will be listed by default.

    You can find and add any asset by entering its ID or name in the search field. Whitelisted assets will be listed.

    If you'd like to add a token that isn't whitelisted, then open the Custom tab and enter the asset ID:

  3. Confirm that you understand the risk and proceed.

  4. Now that you have selected the source and destination assets, you can easily change the direction of the swap by clicking the arrow between the assets:

  1. To start the swap, enter the asset or fiat amount (source or destination):

    There are a few parameters that should be clarified:

    • Slippage tolerance. The amounts that you see on the screen are calculated for the moment when you're making the swap. The exchange rate might change before you sign and send the transaction. Your transaction will be reverted if the price changes unfavourably by more than this percentage.
    • Liquidity provider fee is a fee that will be distributed among accounts who have a share in the liquidity pool.
    • Network fee is a fee for transaction in the network (gas).
  2. If you're ready to make a swap, click Swap then check the details carefully and if everything is ok, confirm and sign the transaction:

TIP

You can find the transaction in the Activity tab on the Account screen:

sora.org