Arbitrary Token Bridging
Today we are extremely excited to release a new Gateway interface which enables arbitrary token deposits and withdrawals to Optimistic Ethereum! In the previous major release of the Gateway we allowed tokens listed in the Optimism token list to be transferred to L2 (and back). With this new release we want to open the gates to innovation and allow any ERC20 token to transition the boundary between the layers.
How it works
In developing L2 chains, figuring out how to handle token bridging makes for a complex and tradeoff-rich landscape. Our bridge implementation seeks to provide a balance between the facts that:
- ERC20 is just an interface: there are hundreds of different token implementations on L1. Some of these vary drastically from an out-of-the-box OpenZeppelin Token. Thus, it is impossible to enshrine a single “bridged ERC20” implementation that covers all potential types of deposited funds.
- Innovation should be permissionless: we as a centralized entity should not hold control over what tokens get bridged to L2.
Thus, our most recent launch came with a redesigned token bridging system. In this system, ALL deposits and withdrawals specify both an “L1 Token” and an “L2 token”, corresponding to the token addresses, on each chain, which funds are being moved between. We think this is an agnostic, conservative approach to bridging.
Developers which want to deploy new tokens can run a simple CLI tool to deploy a default ERC20 implementation. The resulting addresses can be input into the gateway to deposit and withdrawal. Additionally, the frontend uses an extension of Uniswap’s tokenlist schema to enable curation of trusted deposit/withdrawal pairs. To learn more of the details, including how to submit a PR to the default tokenlist, you can read more here.
I’ll see you, in L2
This has been one of our most requested features since the Uniswap launch, so we hope you’re as excited as we are!