DOT.News » Moonbeam

All the latest news about Polkadot, Kusama and its strong ecosystem

How to Interact with xcDOT

Published date: May 3 2022
Share:
Share this article:
 

Cross chain assets are native Substrate assets that can be transferred between a parachain and the relay chain, or other parachains that are connected to the same relay chain. The first cross chain asset supported on Moonbeam is DOT (Polkadot).

To differentiate cross chain assets, Moonbeam has introduced the concept of XC-20s. XC-20s are cross chain assets that have an ERC-20 token interface. Consequently, users can interact with XC-20s as they would with other fungible tokens, for example, add them to MetaMask and create liquidity pools in DEXs. All XC-20s will have xc prepended to their name. For example, Polkadot’s DOT representation on Moonbeam is known as xcDOT.

For more information you can check out the Moonbeam documentation pages on XCM and XC-20s.

This guide will show you how to use the Moonbeam dApp to transfer xcDOTs between Moonbeam and the Polkadot relay chain. This guide can be adapted for other XC-20s as they are onboarded to the network.

Get Started with the Dashboard

To get started with the dashboard, navigate to apps.moonbeam.network/moonbeam. You can choose to connect your wallet via MetaMask or WalletConnect. This guide will cover using MetaMask. Once you’ve selected MetaMask, the extension will pop up and ask you to sign in. Once signed in, you will be prompted to select the account to connect to the dApp and accept permissions.

xcm-1 (1)

You will also need to connect MetaMask to Moonbeam. The dApp will help you switch to the right network, but if you need help, please check out our documentation on connecting MetaMask to Moonbeam.

xcKSM 2

Upon accepting permissions and changing the network to Moonbeam, you will be redirected to the main dashboard where you’ll find details about your accounts balance, last transactions, crowdloan rewards data, cross chain assets (XC-20s), and staking data.

Add XC-20s to MetaMask

Throughout this guide you’ll be interacting with the xcDOT token, but you can follow the same steps for any other XC-20 that is supported. Make sure you are connected to the MetaMask account where you want to receive xcDOT tokens. If so, the first step will be to add the token to your MetaMask:

  1. In the row for xcDOT, click on add to metamask.
  2. MetaMask will pop-up and prompt you to add the token. Click on Add Token.

xcKSM 3

To verify that the token was added successfully, you can open up MetaMask and switch to the Assets tab. From there you should see xcDOT in the list of assets.

xcKSM 4

Deposit XC-20s

To transfer assets from their origin network to Moonbeam, you can use the deposit feature on the Moonbeam dApp.

In order to deposit some xcDOT tokens, make sure that your Polkadot account is connected to the Polkadot.js extension and has some DOT tokens available to transfer to Moonbeam. Transaction fees will be paid on the destination chain and deducted from the total amount transferred. In this case the fees are paid on Moonbeam in xcDOT.

In the row for xcDOT, click on deposit. You will be prompted to connect the dApp to the Polkadot.js extension:

  1. Click Connect.
  2. The Polkadot.js extension will pop-up and request access to the site. Make sure that the URL requesting access is https://apps.moonbeam.network/moonbeam. If so, click on Yes, allow this application access.

xcm-5

Once you’ve connected the Polkadot.js extension to the dApp, open up the MetaMask extension and make sure you’re connected to the Moonbeam account where you would like to receive the xcDOT tokens.

Next, you can start to fill out the deposit information to transfer KSM to Moonbeam:

  1. Make sure Polkadot is selected as the origin chain.
  2. Select the Polkadot Address to transfer DOTs from.
  3. In the Amount field, enter the amount of DOTs you would like to transfer. Please note that there is a minimum amount listed.
  4. Verify that the account listed is your Moonbeam account where you would like to receive the xcDOT tokens.
  5. Review the transaction details and if everything looks correct, click Send.

xcm-6

The Polkadot.js extension will pop-up and ask you to confirm the transaction. Enter your password and click Sign the transaction. The transaction will be sent and your xcDOT balance will be displayed in the dApp. Keep in mind that the transaction fees will be deducted from your xcDOT balance.

xcm-7

You can check that your DOT balance has decreased by using Polkadot.js apps or a block explorer such as Subscan.

Congratulations! You have successfully sent DOT to Moonbeam and can now interact with the xcDOT tokens like you typically would with ERC-20 tokens on Moonbeam.

Send XC-20s within Moonbeam

Since you have already added the xcDOT token to MetaMask, you can start interacting with it as you would with any ERC-20 token. For example, to send xcDOT to another Moonbeam account, you can follow these steps:

  1. Open MetaMask and from the Assets tab click on the xcDOT asset.
  2. Click on Send.
  3. Choose an account to send the xcDOT to.
  4. Enter the amount of xcDOT to send.
  5. Review the transaction details and click Confirm to send the transaction.

xcKSM 8

You should see that your xcDOT displayed balance on the dApp has decreased and the transaction is listed under the Activity tab in MetaMask. The recipient will need to add the xcDOT token to their MetaMask and then they can feel free to send xcDOT around the Moonbeam network, or withdraw it and convert it back to DOT on Polkadot.

Withdraw XC-20s

To transfer assets out of Moonriver and back to their origin network, you can use the withdraw feature on the Moonbeam dApp.

To withdraw xcDOT tokens from Moonbeam back to Polkadot, make sure that your MetaMask account that holds the xcDOT is connected. Transaction fees will be paid on the destination chain and deducted from the total amount transferred. In this case the fees are paid on Polkadot in DOT.

In the row for xcDOT, click on withdraw. Next, you can start to fill out the withdrawal information to transfer and convert the xcDOT to Polkadot:

  1. Select Polkadot as the Destination Chain.
  2. In the Amount field, enter the amount of xcDOTs you would like to transfer. Please note that there is a minimum amount listed. Tip: if you would like to send the max amount of xcDOTs back, you can enter an arbitrary amount that you know is larger than your balance and it will automatically default to the max.
  3. Verify that the account listed is your Moonbeam account where you are transferring the xcDOT tokens from.
  4. Enter the destination address where you would like to send the DOT to on Polkadot.
  5. Review the transaction details and if everything looks correct, click Send.

xcKSM 9

MetaMask will pop-up and you can review the transaction details and click Confirm.

Your balance displayed on the dApp for xcDOT will decrease. You can also check that the DOT balance for the destination address has increased by using Polkadot.js apps or a block explorer such as Subscan.

xcKSM 10

And that’s it! Congratulations! You have successfully sent DOT to Moonbeam in exchange for xcDOT, and xcDOT back to Polkadot in exchange for DOT.

 

Share this article: