MultiversX Tracker is Live!

How does an ERC-20 (or tokens in general) L2 bridge work?

Etherum Reddit

More / Etherum Reddit 80 Views

It seems possible (or already real out there?) to have an ERC-20 bridge between L1 and L2s; I wonder how this works.

I'd expect that I'd have to transfer my ERC-20 token to the L1 bridge contract address (let's call it 0xAAA).

Probably, there's some relayer watching for "Transfer" events that are targeted to 0xAAA, so it knows something relevant happened. It waits until this txn is final in L1 just to be sure.

Now, this relayer would send a tx to the L2 bridge contract to confirm that this ERC-20 is fine to be created in the L2; and here is where my questions appear:
Q1) Can the L2 bridge contract do some extra verification that the relayer isn't lying? Unless the L2 bridge has a way of knowing the TxnReceipt root and accepts a Merkle Proof of the relayer, then I don't think it's possible?
Q2) How is this ERC-20 in L2 created? The underlying smart-contract of the ERC-20 in L1 might not exist in L1. How are these ERC-20 in L2 represented? Maybe the relayer also deployed the underlying smart-contract bytecode?

The Q2 is what I find harder to understand. I'm not sure what it means to move an ERC-20 from L1 to a L2 where that ERC-20 contract doesn't even exist.

submitted by /u/hshlgpw
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments