Tether (USDT) is a stablecoin widely used in the crypto world. It has been integrated into the Polkadot network since 2022, specifically in the AssetHub. This integration enables users to transfer USDT from the Polkadot AssetHub to the Darwinia Asset module, allowing them to utilize USDT within the Darwinia ecosystem. The management of USDT within Darwinia is facilitated by the
pallet-asset module, which is part of the Substrate ecosystem. This module provides various features for managing tokens, including token transfers, balance tracking, and other related operations.
This guide will walk you through the general workflow of depositing the USDT token from the AssetHub and the reverse operation of withdrawing the USDT token from Darwinia back to the AssetHub. We will use an example from Pangolin and the AssetHub (Rococo), but this guide also applies to other Darwinia chains like Darwinia and Crab.
Pangolin <> Rococo(AssetHub) USDT
USDT to the Pangolin
- To acquire USDT in the AssetHub, The first step is to deposit USDT tokens from your preferred exchange, such as Bitfinex or Binance. This tutorial does not cover the process of depositing USDT from an exchange, but you can refer to How to Withdraw USDT from Exchanges on Asset Hub for assistance with that step.
- Before proceeding, please ensure that you have successfully deposited some Tether (USDT) on the Rococo AssetHub with the asset ID 7777. If you are working with the Polkadot AssetHub, please note that the asset ID is 1984.
- To initiate the transfer of USDT, open the Darwinia USDT App and enter the transfer amount, sender account, and recipient account. It's important to note that the sender account belongs to the Rococo network, which is a Substrate account, while the recipient account belongs to the Pangolin network, which is an Ethereum-compatible account. Once you have confirmed that all the details are correct, click the
Sendbutton and wait for the transaction to be completed. After the transaction is complete, you can check the Pangolin Asset in the Polkadot Apps, as shown in the screenshot below.
The USDT token in the Pangolin asset module is named
ahUSDT. This is the specific USDT token that you deposit into the system.
Transfer with MetaMask
After depositing USDT on the Pangolin chain, a precompiled contract USDT will allow you to manage USDT assets using an Ethereum-compatible wallet such as Metamask, treating it similarly to an ERC20 token. This means there's no need to familiarize yourself with Substrate transaction tools if you're already accustomed to Ethereum ecosystem tools.
ahUSDT to AssetHub
The process of withdrawing USDT is the opposite of the deposit process described above and involves using the Darwinia USDT App. We will not expand further on this topic.