[ioTube Tutorial] Moving Tokens between Binance Smart Chain and IoTeX


ioTube is a cross-chain bridge to connect IoTeX to other blockchain networks! ioTube will enable new assets and liquidity from other blockchains to flow into IoTeX and position IoTeX to deliver unique IoT assets to other blockchains in the future.

ioTube currently bridges IoTeX with Ethereum and Binance Smart Chain, in this tutorial I’ll show how to transfer BNB tokens from Binance Smart Chain (“BSC”) to IoTeX. If you are interested in moving assets from/to Ethereum, check out the Ethereum/IoTeX ioTube tutorial!

Convert your BEP20 assets from Binance Smart Chain and bring new liquidity to the IoTeX Network now at https://bsc-tube.iotex.io/

  1. Configure Binance Smart Chain in Metamask
  2. Move BEP20 tokens from BSC to IoTeX
  3. Move XRC20 tokens from IoTeX to BSC

1. Configure Binance Smart Chain in Metamask

To start using the ioTube app with Binance smart chain, you first need to configure Metamask to interact with the Binance Smart Chain network. Let’s quickly see how to do that, while you can read the full official article from Binance here: Connecting MetaMask to Binance Smart Chain

  • Make sure you have the Metamask plugin Installed in your browser
  • If it’s your first installation, you may need to create a new account in Metamask before you can continue
  • Open the Metamask “Settings” menu and select “Networks”, then “Add Network” and fill in the data as in the picture below:

2. Send BEP20 tokens from Binance Smart Chain to IoTeX

The purpose of this operation is to lock a certain amount of a BEP20 token on Binance Smart Chain, and mint the equivalent amount of an XRC20 version of the same token on the IoTeX blockchain.

2.1. Open the ioTube dApp and connect Metamask

  • Open https://bsc-tube.iotex.io

  • Make sure “BSC” is selected in the left tab or use the dropdown to select it

  • Click the “Connect Wallet” link to allow IoTube to connect to your Metamask wallet

  • Confirm the connection in Metamask

2.2. Select the BEP20 token you want to send to IoTeX

First of all, make sure you got some BNB in your account to pay for the gas.

You can send BNB and any BEP20 tokens to your Metamask wallet directly from Binance: just start a withdraw from the exchange website, select your Metamask address as the destination address, and select “BEP20 (BSC)” , as the “Transfer Network”:

In ioTube, from the first dropdown, select which BEP20 token you want to move from Binance Smart Chain to IoTeX.:

If your favorite token is not listed, feel free to submit your request to the team..

2.3. Send the transfer

  • Select the amount of BEP20 tokens you want to move

  • Input the destination address on the IoTeX blockchain (starts with io1... - Do not set an Exchange address as a destination)

  • If requested, click “APPROVE” and confirm the Approve transaction in Metamask

  • Finally, click “CONVERT” and confirm the transfer in Metamask:

After the transaction is confirmed in Binance Smart Chain, your BEP20 tokens will be “locked” in a BSC smart contract, while the same amount of the equivalent XRC20 token (ends with -bsc) will be “minted” on the IoTeX blockchain. This means the circulating supply of the BEP20 token you converted will stay the same, taking into account versions from both Binance Smart Chain and IoTeX blockchains!

Congratulations! You just moved some liquidity from BSC to IoTeX!

2.4. Check the destination account on IoTeX

You can now check the destination address on IoTeX to verify that you received the tokens: in ioPay simply unlock the destination address and check the new token balance. if using ioPay Desktop, the expected XRC20 token may not be listed in the balances panel - you can add it by clicking the “Custom tokens” button and adding the address of the respective token contract (find all the token contracts at https://iotexscan.io/tokens):

or you can just check the balance on the IoTeX Block Explorer at https://iotexscan.io - just input the destination address in the explorer and select the destination token from the little dropdown at the top to check the balance for that specific token:



3. Convert XRC20 tokens from IoTeX to Binance Smart Chain

You can also perform the opposite operation, sending XRC20 tokens that have been minted from the BSC chain, from the IoTeX blockchain back to BSC:

  • If you are on Desktop, then make sure you have ioPay Desktop open and unlocked when accessing https://bsc-tube.iotex.io

  • If you are on Mobile, then open https://bsc-tube.iotex.io directly inside the ioPay Mobile Wallet (you find it in the Discover tab)

  • Follow the same steps as listed above when converting BEP20 assets to IoTeX, but in this case make sure to select IoTeX as the source network (i.e., the IoTeX will appear on the left side, as shown below). You will be asked to sign the APPROVE and CONVERT transactions exactly as before, but this time the confirmation will show up in ioPay, instead of Metamask!


Questions?

Please reach out to us on Telegram with any questions: https://t.me/IoTeXGroup

1 Like