/4thtech
Published in

/4thtech

Bridging ERC-20 FOUR from Ethereum to Binance Smart Chain BEP-20 FOUR using OmniBridge and xDai Chain

When sending ERC-20 FOUR to Binance Smart Chain, the cross-blockchain bridge is needed. The Bridge enables the cross-chain token bridging in both directions. The smart contract locks the ERC-20 FOUR sent from the Ethereum, while the equivalent amount of FOUR BEP-20 is minted on BSC. When the BEP-20 FOUR needs to be bridged back to ERC-20 FOUR, the smart contract puts in a BEP-20 FOUR burn request to the Bridge, and the ERC-20 FOUR are released from the reserves. This process ensures that the total and circulating token supply don’t change.

What do you need?

  • FOUR that you want to bridge
  • ETH for gas
  • BNB for swap
  • xDai for gas
  • MetaMask wallet

Note: approximately 1 Dai converted into 1 xDai

Bridges

  1. xDai Bridge: https://bridge.xdaichain.com/

The xDai Bridge can only be used to send Dai to xDai STAKE converting it to xDai STAKE’s native token xDai. Sending Dai via the xDai Bridge has a lower gas cost than sending other tokens via the OmniBridge.

2. OmniBridge: https://omni.xdaichain.com/bridge

OmniBridge is used for ERC-20 tokens. Do not send Dai over the OmniBridge as it will not convert into xDai, but rather a wrapped version of xDai that has no liquidity.

*Read more about xDai chain: https://www.xdaichain.com/

⚠️ Do not bridge directly from Ethereum to BSC! Bridge ERC-20 FOUR from Ethereum to xDai and from xDai to BSC to land on a correct token smart contract! ⚠️

Adding Networks to MetaMask

The first thing a user will need to do is add the ability for MetaMask to interact with xDai (i.e. USD stable blockchain) and Binance Smart Chain (i.e. BSC). To do this, add a Custom RPC for each additional chain as shown below.

Here is the information that needs to be entered to interact with Binance Smart Chain (i.e. BSC):

Here is the information that needs to be entered to interact with xDai STAKE (i.e. xDai):

The Bridging Proces

(1) Trade ETH for DAI on Ethereum; (2) Send ERC-20 FOUR to xDai STAKE using OmniBridge; (3) Taking DAI across the Ethereum bridge to xDai STAKE; (4) Sending FOUR over the OmniBridge to BSC STAKE; (5) Getting BEP-20 BNB into your wallet, and; (6) Send ERC-20 FOUR across the Bridge to Binance Smart Chain (i.e. BSC)

Note: It is not recommended to do transactions with small amounts on Ethereum. It’s too expensive.

Trade ETH for DAI on Ethereum:

  1. Go to the Uniswap
  2. Click the “Select a token” button
  3. Type in DAI and select it when it appears at the top

Note: You will need 1 DAI to complete the bridge transformation.

Sending FOUR over the OmniBridge to xDai STAKE:

Open OmniBridge (https://omni.xdaichain.com/bridge) and take the following steps to send FOUR over the bridge:

  1. Check top right dropdown selection — it should be “ETH -> XDAI
  2. Select the STAKE dropdown
  3. Try to find a token FOUR otherwise click the + Add Custom Token link
  4. The “Add Custom Token” window will appear. Copy this contract (0x4730fB1463A6F1F44AEB45F6c5c422427f37F4D0) in “Token Contract Address” field and if “Token Symbol” is not automatically selected add (FOUR) in field also check field (Decimals Of Precision) it should be (18)
  5. Confirm your inputs by clicking on “Add token

Once FOUR is added and selected, enter the number of tokens to “Unlock” or just select Max and select the Unlock button. This will bring up the MetaMask window and require a transaction to be completed. Once this transaction is completed, verify the number of tokens to send, and select the “Transfer” button to bring up MetaMask and complete the transfer.

Note: Unlocking and Transfering tokens can take a long time to complete. You can check progress by right-clicking on a “spinning” button and open the page in a new tab.

When the transaction is completed, the sent FOUR tokens will be parked in an Ethereum contract and an xDAI STAKE version of your tokens will appear in your wallet. To see the transferred tokens, change the MetaMask network to the xDAI STAKE network added earlier.

Taking DAI across the Ethereum bridge to xDai STAKE

You need to send DAI over the xDai Bridge (https://bridge.xdaichain.com/), converting it into xDai. To do this I need to:

  1. Switch back to Ethereum Network in Metamask.
  2. Indicate a transfer amount

3. Complete transaction on MetaMask

Note: Once you have transferred FOUR and DAI to xDai you are ready for the next step.

Sending FOUR over the OmniBridge to BSC STAKE:

Note that you can start the process of sending FOUR to BSC using the BSC-xDAI OmniBridige, however, without BNB in your wallet, there will be no way to claim your bridged tokens. The BEP-20 (BSC) version of BNB is the native token of the Binance Smart Chain (BSC) and is what is used to pay transaction fees. Without BNB in your wallet, there is no way to claim any transferred tokens.

Getting BEP-20 BNB into your wallet:

  1. Receive BNB from another wallet on BSC
  2. Use Binance to purchase BNB and send BEP-20 BNB directly to the MetaMask wallet address
  3. Add Binance Chain Wallet to the browser (similar to MetaMask), and use Binance US to purchase BNB and send BEP-2 to the Binance Chain Wallet Address. Once BNB is in a Binance Chain Wallet, a cross-chain transfer can be done internally by sending BNB to the wallet address and selecting Binance Smart Chain. The Binance Chain Wallet can be a new wallet, or the current MetaMask wallet can be imported to it.

Note: There are likely other options, and hopefully, something will be created to allow users to get BEP-20 BNB into their wallet directly from xDai STAKE.

Take ERC-20 FOUR across the Bridge to Binance Smart Chain (i.e. BSC)

Note: The xDai Bridge to BSC is a different OmniBridge. You can switch bridge by clicking on the top right button and select BSC -> xDAI

The xDai to BSC bridge has the exact same interface as the above described Ethereum to xDai OmniBridge. Two differences to keep in mind with the xDai to BSC bridge versus the Ethereum to xDai bridge are:

  1. The same token will have a different xDai address
  2. All tokens, including xDai (DAI), use the xDai to BSC OmniBridge. This is in contrast to Ethereum to xDai, which has a bridge specific for xDai (DAI).

Note: Again, be sure to have some BNB in your wallet on Binance Smart Chain (BSC), otherwise, you will not be able to claim your transfer.

Take the following steps to send FOUR over the bridge:

  1. Check top right dropdown selection — it should be “BSC -> XDAI
  2. Select the STAKE dropdown
  3. Try to find a token FOUR otherwise click the + Add Custom Token link
  4. The Add Custom Token window will appear. Copy this contract (0xd882739Fca9CBAE00F3821c4c65189E2D7e26147) in the “Token Contract Address” field and if “Token Symbol” is not automatically selected add (FOUR) in the field also check the field (Decimals Of Precision) it should be (18)
  5. Confirm your inputs by clicking on Add token

Once FOUR is added and selected, enter the number of tokens to “Unlock” or just select Max and select the “Unlock” button. This will bring up the MetaMask window and require a transaction to be completed. Once this transaction is completed, verify the number of tokens to send, and select the “Request” button to bring up MetaMask and complete the transfer.

Note: Again, be sure to have some BNB in your wallet on Binance Smart Chain (BSC), otherwise you will not be able to claim your transfer.

Click on “Claim”. Bellow window show:

Switch wallet to BSC on Metamask and click on “Claim” and confirm the transaction on Metamask.

Note: Please refer to the 4thTech Telegram group for more information: https://t.me/the4thpillarofficial

Disclaimer

All content provided herein, including but not limited to text, graphics, logos, and images (the “Content”), is the property of The 4th pillar Ltd., a legal entity established under the laws of the EU. It is protected by copyright and other laws that protect intellectual property and proprietary rights. You are granted a non-exclusive, non-transferable, revocable license to access and use the Content for the sole purpose of obtaining information about the 4thTech technology and other educational purposes. We have done our best to ensure that the Content is accurate, updated, complete, and provides valuable information, but neither do we guarantee nor take any responsibility for its accuracy and/or completeness. The Content is not intended as, and shall not be understood or construed as legal, financial, tax, or any other professional advice, sale or offer for sale of any securities, and/or crypto-assets. The Company is not engaged in rending of and/or is not licensed to render any of the crypto-asset services and/or financial services, such as investment or brokerage services, capital raising, fund management, or investment advice.

--

--

--

Send, receive dMails or exchange on-chain E2EE messages with no ads, no data mining and no tracking. Secure your decentralized communication, connect with 4thTech!

Recommended from Medium

Welcome to Recap AMA IgniteCrypto & DeCredit #AMASeries

03/05/2018: Biggest Stories in the Cryptosphere

Programmable Money and Programmable Payments

GamyFi.org is a gaming platform that requires high-end servers andscalable Blockchain technology to…

What is an IDO and How to Participate in One

Flixxo — ICO Review

Why do we need a Digital ID?

A visualized blockchain explanation in under 4 minutes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
4thpillar Technologies (4thTech)

4thpillar Technologies (4thTech)

An ecosystem of multi-blockchain applications that enable users to exchange data from wallet to wallet and verify it in a decentralized manner.

More from Medium

An Overview of Lending: from TradFi, to DeFi, to JellyFi

Putting Expenses Into Perspective: How Obverse Can Increase Anchor Yield By 84%

What is DeFi, How does it work, and the Future

Rapid Yield Optimization System, HashCard, NFT whitepaper