# ELI5: Blockchain Bridge

By [aakansha](https://paragraph.com/@aakansha) · 2023-05-15

---

Bridges
=======

Bridges provide a way to send data across chains. For example, you may want to send data from Ethereum mainnet to Optimism to vote on an onchain proposal.

They form a critical component of blockchain infrastructure and take 3 out of the top 5 spots on [rekt leaderboard](https://rekt.news/leaderboard/)!

Protocols enabling this are generally called _cross-chain messaging protocols_. And since _any_ data can be sent across chains using these protocols, the most popular use case they enable is bridging ERC20 tokens.

We'll focus on token transfer bridges in this post.

Basics
------

Consider a bridge that transfers `ETH` from Ethereum mainnet to Optimism.

![a possible design for a bridge](https://storage.googleapis.com/papyrus_images/3f3b0da14d93583e5db6e2fbbbea971a34d781f06243087d78b2b823aa488f7d.png)

a possible design for a bridge

A bridge has a smart contract deployed on each chain (`B1` and `B2`). Addresses on mainnet that want to bridge ETH to Optimism call `B1` with the `ETH` they want to bridge. `B1` stores this `ETH`.

A trusted actor observes this transfer and tells `B2` to mint the same amount of `OP ETH` to the related receiver address. `OP ETH` is the native token on Optimism.

To bridge this `ETH` back to mainnet, the same process is followed but in reverse. User address on Optimism sends `OP ETH` to `B2`. `B2` burns it, and a trusted off-chain actor tells `B1` to send the same amount of `ETH` to the receiver address on mainnet.

For Optimism's native bridge, this trusted actor is replaced by their [infrastructure](https://community.optimism.io/docs/developers/bridge/messaging/#for-ethereum-l1-to-optimism-l2-transactions) (for bridging to Optimism) and the 7 day challenge period (for bridging to mainnet). This native bridge can mint and burn Optimism's native token (`OP ETH`).

You can read more about Optimism's bridge in their [official docs](https://community.optimism.io/docs/developers/bridge/basics/).

Non-native bridges
------------------

Continuing with the Optimism example, bridging `ETH` back to mainnet is a slow process since it needs to go through the 7 day challenge period. To circumvent that, non-native bridges like [Hop protocol](https://docs.hop.exchange/basics/what-is-special-about-hop) enable fast transfer. These bridges enable rely on off-chain actors observing the native bridge transfer and instantly sending `ETH` to the receiver. The off-chain actor then receives `ETH` bridged through the native bridge.

These off-chain actors can be incentivized through a fee.

![a possible design for a fast transfer bridge](https://storage.googleapis.com/papyrus_images/47ac1fc42c00f46b95fea12d2edbfaedcc2eae09f5ab1eccf51c08feac0f0e47.png)

a possible design for a fast transfer bridge

Bridge aggregator
-----------------

Now there can be various bridges between 2 chains with different features and trade off. For example, one may take a lower fee, the other may be faster.

For users, it can be a headache to keep track of multiple bridges and pick one. Bridge aggregators aim to solve them.

Example of an aggregator is [li.fi](https://li.fi) connect to various bridges and try to offer the best route to bridge tokens. Now, users just have to interact with one protocol.

Although now the problem becomes which aggregator to choose from!

Other bridges
-------------

There can be bridges between non-compatible blockchains, like Bitcoin and Ethereum, or Solana and Ethereum. WBTC, for example, represents the bridged BTC from Bitcoin to Ethereum.

_That’s it for this post! Thanks for reading, and I hope you found this post useful._

---

*Originally published on [aakansha](https://paragraph.com/@aakansha/eli5-blockchain-bridge)*
