# EVM bridge · Chromia Docs (concept)

> Chromia provides a bridging mechanism called Ethereum Interoperability Framework (EIF) that allows transferring ERC-20 tokens between Ethereum-compatible…

Source: https://docs.chromia.com/ecosystem/bridge/overview/

# EVM bridge

On this page

* [Bridge types](#bridge-types)
* [Transfer mechanisms](#transfer-mechanisms)
* [Lock and mint](#lock-and-mint)
* [Burn and release](#burn-and-release)

Chromia provides a bridging mechanism called Ethereum Interoperability Framework (EIF) that allows transferring ERC-20
tokens between Ethereum-compatible networks and the Chromia ecosystem. The EIF itself represents a GTX (Generic
Transaction Protocol) module that can be added to the dapp, extending its original functionality.

The EIF GTX module performs the following activities:

* Reads events from the EVM, supports multiple EVM networks, multiple contracts, and multiple contract events.
* Validates EVM events.
* Adds EVM events to the postchain block using the special operation `__evm_block`.

The EIF framework can be divided into the following components:

| Component | Description |
| --- | --- |
| **Token Bridge** | Acts as a vault that stores received tokens. Once ERC-20 tokens are deposited, they are locked. It supports depositing to and withdrawing from the smart contract. |
| **Event Receiver Chain** | A Chromia blockchain that listens to events from the Token Bridge and inserts them into Rell using the `__evm_block` operation. It provides state information to the Bridge Chain based on specific [events](https://gitlab.com/chromaway/core/postchain-eif/blob/497b00c92844e033c4129b4eb6caca4a244a6079/postchain-eif-contracts/contracts/TokenBridge.sol#L58). |
| **Bridge Chain** | Reads EVM events from the Event Receiver Chain via ICMF or directly if embedded. It tracks ERC-20 tokens, accounts, deposits, and withdrawals. It also provides proofs to unlock tokens and supports snapshots for foreign tokens. |
| **Dapps** | Dapp accounts receive newly minted tokens on the Bridge Chain through cross-chain transfers. |

For a visual representation of the EIF framework and the token bridge, see the diagram below:

![EIF Overview](https://docs.chromia.com/img/eif_overview_light.svg)

## Bridge types

A developer can choose between two bridge types, depending on where the token was initially minted:

1. [Token Bridge](https://gitlab.com/chromaway/core/postchain-eif/-/blob/dev/postchain-eif-contracts/contracts/TokenBridge.sol) -
   is used when the token was initially issued on the EVM chain.
2. [Chromia Token Bridge](https://gitlab.com/chromaway/core/postchain-eif/-/blob/dev/postchain-eif-contracts/contracts/ChromiaTokenBridge.sol) -
   is used when the token was initially issued on the Chromia blockchain.

The Token Bridge is a basic bridge contract used for transferring ERC-20 tokens. When users deposit tokens into the
token bridge, the contract locks them and the corresponding tokens are minted on the Chromia side. Upon withdrawal, the
bridge burns the tokens on Chromia and unlocks or transfers them back to the user on the EVM side.

Bridges remain secure through withdrawal proofs signed by Chromia nodes via block headers, resembling a multi-signature
setup. If malicious actors compromise a majority of nodes for EVM-originating tokens, honest nodes can initiate a mass
exit, allowing users to recover their balances based on a previously known state. This design makes it difficult for
attackers to manipulate the bridge’s balance.

## Transfer mechanisms

Bridges operate in two modes, based on the source chain of the token transfer:

1. **Lock and mint**: Lock tokens on the source chain and mint them on the destination chain.
2. **Burn and release**: Burn tokens on the source chain and release them on the destination chain.

### Lock and mint

![EIF Deposit Process](https://docs.chromia.com/img/eif_deposit_light.svg)

1. **Deposit** - On the EVM chain, users deposit tokens (ERC-20 or ERC-721) into the `EMV Token Bridge` contract.
2. **Event monitoring** - The Event Receiver Chain detects the deposit event and inserts it into Chromia using the
   `__evm_block` operation.
3. **Processing** - The bridge chain processes the event by decoding and validating the deposit.
4. **Mint** - The bridge mints equivalent tokens on Chromia.

The burn and release process occurs when users want to transfer tokens back to an EVM-compatible chain.

### Burn and release

![EIF Withdrawal Process](https://docs.chromia.com/img/eif_withdrawal_light.svg)

1. **Burn** - On Chromia, the user initiates a withdrawal by burning their tokens.
2. **Generate proof** - The user queries and generates proof of the withdrawal.
3. **Withdrawal request** - The user submits the proof to the Token Bridge contract to initiate withdrawal.
4. **Lockup period** - The contract verifies the proof and starts a configured security lockup period.
5. **Fund release** - After the lockup period expires, the bridge automatically releases the funds to the user’s
   address.

[View this page on docs.chromia.com](https://docs.chromia.com/ecosystem/bridge/overview/)Content mirrored from the live docs
