The DeFi of Thrones beta test is in full swing! This event gives our community the opportunity to test features and get comfortable with our DApp in a free and safe way.

As you may know, we initially deployed DoTx on the Ethereum network, but in the meantime moved the beta to Polygon in order to take advantage of its higher speeds and lower transaction fees. We aim to take advantage of both networks going forward, so it was essential that we deployed a simple UI bridge between them 🌉

You might have noticed a section on the platform called ‘Bridges’. Here you’ll find two bridges that allow you to transfer both DoTx and NFTs between the Ethereum and Polygon networks. To do this we use a complex algorithmic Smart contract set that enables interoperability, but we are going to break down the basic principles behind it with you.

High level flow

The first thing to understand is that each network has no way of interacting with the other directly. A contract deployed on one network can’t engage with a contract on the other network.

For our case, the DoTx token deployed on Ethereum is known as the RootToken. To represent this on the Polygon network, we deploy a DoTx copy through a corresponding Smart contract. This copy we call the ChildToken.

The RootToken has a max supply of 6 million and its minting feature has been permanently disabled. The ChildToken is controlled directly by the bridge and can be minted and burned as required: only the bridge has control over it. A process known as mapping then allows the bridge to couple a token on one side with another token on the other side.

Here is the process that takes place when sending one DoTx from the Ethereum network to the Polygon network:

  • Your wallet sends one DoTx into the RootChainManager contract
  • The RootChainManager locks your DoTx
  • The bridge mints one Child DoTx token on the Polygon network
  • The bridge sends the token to your wallet on Polygon

Here is the reverse process when sending one DoTx from Polygon to Ethereum:

  • You burn your DoTx in the DoTx ChildToken contract on Polygon
  • The bridge is informed and waits until the information is available
  • The bridge sends the information to the RootChainManager on the Ethereum network
  • The RootChainManager checks the information and authorizes the unlock of your DoTx
  • You unlock your DoTx via the RootChainManager contract and receive it in your wallet

Step-by-step guide to bridging using DoTX

Transfer one DoTx from Polygon to Ethereum

Connect your wallet to the Mumbai test network and then go to this page. Enter the amount you want to transfer and send the transaction.

Send 1 DoTx to Ethereum

This will have the effect of burning the DoTx as explained in the previous section. There will be a wait to propagate the information to Ethereum, which can vary from 30 minutes to 1 hour. You can check the status of the operation in the pending transfers page. Once this information is successfully propagated, the RootChainManager allows you to unlock your DoTx.

Ethereum’s Goerli is the test network that corresponds to Polygon’s Mumbai. Select Goerli from the networks list.

You can use this faucet to get Goerli test Ether to pay the fees of the unlock operation.

Click on unlock once the transaction has validated: you’ll then receive your DoTx in your wallet on Ethereum.

Transfer one DoTx from Ethereum to Polygon

The process to transfer 1 DoTx from Ethereum to Polygon is the same when using our interface, except that there is no final unlock step in this direction.

You will just have to wait an average of 5 minutes for the DoTx to be minted and sent to your wallet on Polygon.

These two operations are exactly the same for NFTs, except that the tokens are not ERC20 but ERC721.

We hope that this article has given you some clarity regarding the nature of the cross-network bridge and how to use it, and if you have any further questions we are regularly available on Telegram. Stay tuned to our socials for upcoming news on the project. ✌️

To stay tuned of the latest news, follow us on:

Twitter: https://twitter.com/DefiOfThrones
Telegram Announcements: https://t.me/dotannouncements
Telegram General Discussion: https://t.me/DeFiOfThronesOfficial
Website: https://defiofthrones.io/
Dapp: https://app.defiofthrones.io

Kind regards,
DoTx Team

--

--