Bridges: xDai Bridge & OmniBridge

The TokenBridge project is responsible for the xDai Bridge, OmniBridge and many other bridges in development for cross-chain interaction. For additional details, see the bridge documentation at docs.tokenbridge.net

Why are there Multiple Bridges?

Different bridges exist to support different operations. Two bridges currently exist on the xDai chain. Additional bridges and/or extensions may be deployed in the future.

  • xDai Bridge: Convert Dai to xDai and xDai to Dai

  • OmniBridge: Convert any other ERC20 tokens on Mainnet to equivalent ERC677 tokens on the xDai chain

The Optimistic Omnibridge is also in development to provide a bridge for trustless transfers from xDai to Ethereum.

xDai Bridge FAQs

Why is the xDai bridge important?

The bridge is a key element of xDai, allowing for fast interoperability between xDai and Ethereum. The bridge connects the networks and allows tokens to exist on both sides. To mint xDai, Dai is locked in the bridge contract and the equivalent amount of xDai is created on the xDai chain. In order to return this xDai to Dai, xDai is burned and Dai is unlocked.

My transaction is still pending, or was not completed. What should I do?

Please check the Troubleshooting Section for common issues and resolutions.

What are the transfer limits when using the xDai bridge?

The current limits are below. Note that these can be changed by a majority vote from the Governance Board.

Max Single Deposit

9,999,999 Dai

9,999,999 xDai

Minimum Transfer

0.005 Dai

10 xDai

Transaction (Gas) Fees

variable, paid in Eth

paid in xDai

Transfer Fees (in addition to gas fees)

0%

0%

What is the Bridge Governance Board?

In response to increased usage and value locked in the xDai bridge, a proposal was introduced to extend security and decision making powers to a wider group of participants (governors). The proposal was accepted, and governance by means of a multi-signature Gnosis Safe was put into place initially on the Ethereum side on 2 October, 2020. Once Gnosis Safe was deployed to xDai, updated governance was enacted on the xDai chain on 23 October, 2020.

At present there are 11 governors who are responsible for managing bridge operations on both sides of the bridge (contracts are deployed on the Ethereum and xDai side). 6/11 signatures are required to approve any management proposal. Operations may include:

  • Bridge contract updates.

  • Contract parameters updates such as bridge limits, finality threshold, gas price fallback etc.

  • Bridge validator parameter updates like changing the validators set or signatures threshold.

All actions are managed through Gnosis Safe accounts, one on the Ethereum mainnet for Ethereum contract side operations and one on xDai for xDai contract operations.

Who are the xDai bridge validators?

There are currently 4 bridge validators, and 3/4 signatures are required for bridge transactions. The validator set can be updated by the Governance Board.

I completed a Dai to xDai transfer and see the transaction to lock Dai, but do not see the transaction that mints xDai. How does it work?

The process requires several steps on the xDai chain.

  1. Oracles send confirmations of the transaction to the bridge contract.

  2. After receiving the required number of confirmations, the bridge contract sends a request to the Block Reward contract to schedule emission (minting) of new xDai (the same denomination as requested in the bridge transaction).

  3. The Block Reward contract is invoked by the xDai network validator during the last step of block verification, and account balances are updated in the Block Reward contract.

Example transaction executing a transfer: https://blockscout.com/poa/xdai/tx/0x799abac45b6c2ab18728b3baa04d112f8af8fba4d34d8078cf93856c71e73b91/internal-transactions 🔎 Transactions can be investigated in further detail using Tenderly. 💁♂ When troubleshooting, check the Coin Balance History in Blockscout for the account in question to find information about balance changes and blocks where these occurred.

When claiming a DAI transaction on Ethereum, does the user originating the transaction also need to pay for the claim?

Anyone can pay the fees to process the claim transaction and receive DAI, but the DAI will always be sent to the account set as the receiver in the initial originating request. This functionality opens the door for projects or other entities to pay for gas fees/subsidize the claims on Ethereum.

OmniBridge FAQs

What is the OmniBridge URL?

https://omni.xdaichain.com/

I want to learn more about OmniBridge internal functionality and/or developer features

Please see the OmniBridge documentation at https://docs.tokenbridge.net/eth-xdai-amb-bridge/multi-token-extension for additional details.

What tokens have been bridged using OmniBridge?

You can find a current list on BlockScout at https://blockscout.com/poa/xdai/bridged-tokens

How do I monitor transactions?

Use the AMB Live Monitoring application located at https://alm-xdai.herokuapp.com/. You can enter a transaction originating from either side of the bridge. More information on various ALM transition states is available here.

I don't see the token I bridged in MetaMask - how can I add it?

Here are some instructions.

Does the OmniBridge use the same validators / governors as the xDai bridge?

No, OmniBridge is an extension (similar to a DApp) unrelated to chain consensus and it uses a separate set of validators and governors. Currently, there is a 2/3 signature requirement for Omnibridge transfers with plans to increase the number of oracles to 7 with a 5/7 signature threshold.

What is the minimum number of a certain token that can be transferred using OmniBridge?

This can vary by token. The default setting when a token is first bridged is 1, but this can be changed by bridge governance. To check the minimum for a particular token, query the minPerTx method of the omnibridge mediator contract.

  1. Enter the bridged contract address into the minPerTx field. Convert from wei using http://eth-converter.com/

For more details about other OmniBridge parameters, see the OmniBridge docs.

Can I use Omnibridge without the UI?

Yes you can. Instructions.

Can I send an additional TX on Ethereum to unlock a token earlier by supplying the correct data?

Yes, it is possible, you will need to collect the message and the oracles' signatures. There are plans to integrate a button into the ALM for this functionality (see https://github.com/poanetwork/tokenbridge/pull/471 if you need to implement this feature immediately).

Do validators replace transactions that are taking a long time to mine?

Yes, attempts are made to replace transactions with a higher gas price after 20 minutes. This occurs if it receives a price provided by the gas price oracle, and is repeated every 20 minutes until the transaction is successful.

Honeyswap is a popular application running on xDai and utilizing bridge functionality. They have a forum at https://forum.1hive.org/ with tons of info, a Discord and an FAQ that covers basics about bridging, xDai and more. Please bring any related questions to them.