Skip to content

Overview of XC-20 Transfers

Introduction

Assets can move between parachains using XCM. Two main approaches exist:

  • Asset teleporting – destroys tokens on the reserve chain and mints the same amount on the destination chain. Each chain holds the native asset as a reserve, similar to a burn-mint bridging mechanism. Because each chain can create tokens, a degree of trust is required
  • Remote transfers – moves tokens from the reserve chain to a Sovereign account (an account on the reserve chain trustlessly controlled by the destination chain). The destination chain then mints a wrapped (also called “virtual” or “cross-chain”) representation. This wrapped version is always interchangeable 1:1 with the original asset, functioning like a lock-mint and burn-unlock bridge. The chain where the asset originates is known as the reserve chain

Asset Teleporting and Remote Transfers

Moonbeam currently uses remote transfers for XC-20 transfers.

This page covers the fundamentals of XCM-based remote transfers. To learn how to perform XC-20 transfers, refer to the the XC-20 transfers via the Substrate API guide.

XCM Instructions for Asset Transfers

The XCM Pallet and Precompile abstract much of the complexity involved in cross-chain asset transfers, automatically constructing the necessary XCM messages. Nevertheless, having a basic understanding of the underlying instructions can be useful.

For reference, you can find the Polkadot XCM Pallet extrinsics for sending XC-20s in the Using the Polkadot XCM Pallet To Send XC-20s guide.

The instructions in each XCM transfer vary depending on the asset and the transfer route. For example, returning a native token like xcDOT to its reserve chain (from Moonbeam to Polkadot) differs from sending DOT from Polkadot to Moonbeam. Below are examples of the instructions commonly involved in these token transfers.

Instructions to Transfer a Reserve Asset from the Reserve Chain

When DOT is transferred from Polkadot to Moonbeam, the following XCM instructions are executed in sequence:

  1. TransferReserveAsset - executes on Polkadot, moving the DOT from the sender and depositing it into Moonbeam’s Sovereign account on Polkadot

  2. ReserveAssetDeposited - executes on Moonbeam, minting the corresponding ERC-20 representation of DOT (xcDOT) on Moonbeam

  3. ClearOrigin - executes on Moonbeam, clearing any origin data—previously set to Polkadot’s Sovereign account

  4. BuyExecution - executes on Moonbeam, determining the execution fees. Here, a portion of the newly minted xcDOT is used to pay the cost of XCM

  5. DepositAsset - executes on Moonbeam, delivering the xcDOT to the intended recipient’s account on Moonbeam

This process invokes TransferReserveAsset with assets, dest, and xcmparameters. Within the xcm parameter, you typically specify the BuyExecution and DepositAsset instructions. As shown in the TransferReserveAsset instruction, the flow also includes ReserveAssetDeposited and ClearOrigin to complete the transfer.

For more information on constructing an XCM message for asset transfers, such as DOT to Moonbeam, refer to the Polkadot XCM Pallet guide.

Instructions to Transfer a Reserve Asset back to the Reserve Chain

In scenarios where you want to move an asset back to its reserve chain, such as sending xcDOT from Moonbeam to Polkadot, Moonbeam uses the following set of XCM instructions:

  1. WithdrawAsset – executes on Moonbeam, taking the specified token (xcDOT) from the sender

  2. InitiateReserveWithdraw – executes on Moonbeam, which, burns the token on Moonbeam (removing the wrapped representation), and sends an XCM message to Polkadot, indicating the tokens should be released there

  3. WithdrawAsset – executes on Polkadot, removing the tokens from Moonbeam’s Sovereign account on Polkadot

  4. ClearOrigin – gets executed on Polkadot. Clears any origin data (e.g., the Sovereign account on Moonbeam)

  5. BuyExecution – Polkadot determines the execution fees and uses part of the DOT being transferred to pay for them

  6. DepositAsset – finally, the native DOT tokens are deposited into the specified Polkadot account

Steps 3 through 6 are automatically triggered by the InitiateReserveWithdraw instruction (step 2) and execute on Polkadot. Once InitiateReserveWithdraw is invoked on Moonbeam, the assembled XCM message instructs Polkadot to run those final instructions, completing the cross-chain transfer. In other words, while Moonbeam constructs the XCM instructions behind the scenes, they ultimately execute on Polkadot to complete the asset’s return to its reserve chain.

For more information on constructing an XCM message to transfer reserve assets to a target chain, such as xcDOT to Polkadot, you refer to the guide to the Polkadot XCM Pallet.

Note

The specific instructions may vary over time, but this overall flow remains consistent: the tokens are withdrawn from the user on Moonbeam, burned from the local representation, and unlocked on the reserve chain. At the end of the process, they become fully accessible again on their reserve chain.

Last update: February 11, 2025
| Created: December 13, 2023