iotubeproject / ioTube

:satellite: A multi-assets, fully decentralized bridge for exchanging ERC20/BEP20/XRC20 tokens between Ethereum, Binance Smart Chain and IoTeX
https://bridge.iotex.io
Apache License 2.0
115 stars 27 forks source link

tests

ioTube - the decentralized bridge for Ethereum, Binance Smart Chain, Polygon(Matic), Solana and IoTeX

Version history

V7.0 Payload support

Launch date: Nov 6, 2024

This new version enables crosschain calls by adding a new field 'payload'. The payload of a crosschain transfer will be decoded by the whitelisted recipient contracts. For example, an unwrapper for the crosschain tokens is whitelisted such that users don't need to unwrap the crosschain tokens by themselves.

V6.0 Solana Bridge

Announcement: https://depinscan.io/news/2024-09-16/iotex-launches-solana-bridge

V5.0 Web3 Support + Transactions + More Assets + Crosschain Tokens

Announcement: https://iotex.io/blog/cross-chain-polygon-web3/

V4.0 Multi-Chain support

Launch date: Apr 13, 2021 (Annoucement)

Because of Ethereum's high gas cost, many projects and users also adopted Binance Smart Chain (BSC) and Huobi Eco Chain (Heco). The need of supporting BSC and Heco is increasing. The demand of cross-chain support from Ethereum and BSC or other blockchains are increasing. We'd love to support them in ioTube.

Matic support is launched on Jun 10, 2021 (Annoucement)

V3.0 Rebuilt with largely fee reduction

Launch date: Feb 8, 2021 (Announcement)

Ethereum has been suffering high gas cost for a long period. The core-dev team rebuilt ioTube to largely reduced the gas cost on ETH side by introducing a relayer and putting signature offchain.

V2.0 Multi Token Tube (IoTeX <-> Ethereum)

Launch date: Aug 31, 2020 (Announcement)

V2 generalizes the ioTube V1 to support multiple assets on Ethereum & IoTeX blockchains.

V1.0 IOTX tube

Launch date: Apr 2019 (Announcement)

The first version of ioTube was built by core-dev in Apr. 2019 to facilitate the swap of IOTX-E (ERC20 version of IOTX on Ethereum) and IOTX mainnet token.

Deployement | Usage | Documentation

Any bug report or feedback? Please submit an issue or discuss in https://discord.gg/jRqqSyGfUD.

Submit a token to ioTube?

Please refer to token submission guide first: https://docs.iotube.org/introduction/token-submission

Feel free to reach out to https://github.com/guo for further discussion.

Deployment

Different from traditional bridges, ioTube comes with two components:

Deploy Contracts on IoTeX/Ethereum

Join as a Witness

  1. Prepare the working directory $IOTEX_WITNESS, default ~/iotex-witness. Create file $IOTEX_WINTESS/etc/.env and add:

    • WITNESS_PRIVATE_KEY
    • RELAYER_URL
  2. start containers

    cd witness-service
    ./start_witness.sh
  3. modify some configs in $IOTEX_WITNESS/etc/*.secret.yaml:

    • clientURL
  4. Clean up everything by running

    ./clean-all.sh

Transfer assets between IoTeX and Ethereum

Please use dApp ioTube https://tube.iotex.io. Please note that the service is still in beta mode.

From ERC20 to XRC20

  1. open https://tube.iotex.io/eth in a metamask installed browser. (eg. Firefox/Chrome/Brave + metamask)
  2. Choose supported ERC20 token from the list.
  3. Enter the amount.
  4. Click Approve button to approve ERC20 token transfer and sign on metamask.
  5. Click Convert button and sign on metamask.
  6. After 12 confirmations of Ethereum network and 2/3 + 1 confirmations from witnesses, the XRC20 tokens will be minted and sent to your IoTeX address.
  7. You can add the token to your ioPay to see and use them.

From XRC20 to ERC20

  1. open https://tube.iotex.io/iotx in ioPay desktop supported broswers (eg. Chrome/Firefox/Brave with ioPay desktop installed) or ioPay Android/iOS.
  2. Choose supported XRC20 token from the list.
  3. Enter the amount.
  4. Click Approve button to approve XRC20 token transfer and sign on ioPay.
  5. Click Convert button and sign on ioPay.
  6. After 1 confirmation of IoTeX network and 2/3 + 1 confirmations from witnesses, the XRC20 token will be burnt and ERC20 token will be sent to your ETH wallet.

Fees

Tube fees: 0

Network fees:

  1. from the other chains to IoTeX: 0
  2. from IoTeX to Ethereum: 500 IOTX
  3. from IoTeX to BSC: 20 IOTX
  4. from IoTeX to Polygon: 2 IOTX all the fees are used to cover the gas fee

Add an ERC20 token to ioTube

Security

Gas Costs

Gas fees on IoTeX are negligible, both for bridge maintenance and for asset transfer. The estimated gas fees on Ethereum side are:

Tube of IoTeX <-> Ethereum

Contracts on IoTeX

Contacts on Ethereum

Tube of IoTeX <-> BSC (Binance Smart Chain)

IoTeX Side

BSC Side

Tube of IoTeX <-> Polygon (formerly Matic)

Launched on Jun 10, 2021.

We started adding 0x address to this doc because of IoTeX start supporting 0x address and web3 from IoTeX V1.2 (Babel API). Some IoTeX address are same as other tubes and we include 0x addresses here.

IoTeX side:

Matic side:

Crosschain IOTX (WIP)