Features, Definitions and Modes
TokenBridge is an interoperability solution for EVM chains
A bridge is created between 2 networks, referred to as a Native (or Home) Network and a Foreign network.
- Native (Home): A network with fast and inexpensive operations. All bridge operations to collect validator confirmations are performed on this side of the bridge.
- Foreign: Can be any chain, but generally refers to the Ethereum mainnet.
A bridge can be configured for several different network configurations. This currently includes a Native-to-ERC20 Bridge, an ERC20-to-ERC20 bridge, an ERC20-to-Native Bridge, and the AMB bridge.
- ERC20 to ERC20: ERC20 compatible tokens are locked on the Foreign network and minted as ERC20 compatible tokens (ERC677 tokens) on the Native network. When transferred from Native to Foreign, the ERC677 tokens are burned and the ERC20 tokens are unlocked. Usage of ERC677 tokens on the Foreign network will increase the bridge security.
- ERC20 to Native: Coins are locked in the Foreign Network and ERC20 tokens are minted in the Native network (the Native network must support OpenEthereum BlockReward functionality). The xDai chain uses this bridge mode.
- AMB Bridge: Transfer arbitrary data between two networks - data is interpreted as an arbitrary contract method invocation. For example, this allows for transfer operations with NFT tokens and their metadata.
The bridge consists of several components, including smart contracts, an event handler, and an optional UI. All components except for the Bridge Smart Contracts are located in the https://github.com/poanetwork/tokenbridge repository.
- TokenBridge. Listens to events and sends transactions to authorize asset transfers.
- Bridge UI Application. A DApp GUI to transfer tokens and coins between chains.
- Bridge Monitor. A tool for checking balances and unprocessed events in bridged networks.
- Bridge Deployment Playbooks. Optional playbook which can manage token-bridge configuration instructions for remote deployments.