Exchange Integration
Boba Network docs for Exchanges looking to integrate deposits and withdrawals with Boba Network
Last updated
Boba Network docs for Exchanges looking to integrate deposits and withdrawals with Boba Network
Last updated
Although Boba Network is an L2 (and therefore fundamentally connected to Ethereum), it's also a separate blockchain. App developers commonly need to move data and assets between Boba Network and Ethereum. We call the process of moving data and assets between the two networks "bridging".
For the most common usecase, moving tokens around, we provide the Standard Token Bridge. The Standard Token Bridge is a simple smart contract with all the functionality you need to move tokens between Boba Network and Ethereum . Technical details may be found in the Optimism documentation.
The standard bridge functionality provides a method for an ERC20 token to be deposited and locked on L1 in exchange of the same amount of an equivalent token on L2. This process is known as "bridging a token", e.g. depositing 100 BOBA on L1 in exchange for 100 BOBA on L2 and also the reverse - withdrawing 100 BOBA on L2 in exchange for the same amount on L1. In addition to bridging tokens the standard bridge is also used for ETH.
The Standard Bridge is composed of two main contracts the L1StandardBridge
(opens new window)(for Layer 1) and the L2StandardBridge
(opens new window)(for Layer 2).
Here we'll go over the basics of using this bridge to move ERC20 and ETH assets between Layer 1 and Layer 2.
Note: We currently block smart contract wallets from calling the
depositETH
anddepositERC20
functions for security reasons. If you want to deposit not using an EOA accounts and you know what are doing, you can usedepositETHTo
anddepositERC20To
functions instead.
ERC20 deposits into L2 can be triggered via the depositERC20
and depositERC20To
functions on the L1StandardBridge
(opens new window). You must approve the Standard Token Bridge to use the amount of tokens that you want to deposit or the deposit will fail.
ETH deposits into L2 can be triggered via the depositETH
and depositETHTo
functions on the L1StandardBridge
(opens new window)). ETH deposits can alternatively be triggered by sending ETH directly to the L1StandardBridge
. Once your deposit is detected and finalized on Boba Network, your account will be funded with the corresponding amount of ETH on L2.
ERC20 withdrawals can be triggered via the withdraw
or withdrawTo
functions on the L2StandardBridge
Withdrawals must be claimed on the L1 network in a two-step process, firstly by proving the L2 withdrawal transaction and later by finalizing the transaction. There is a mandatory interval (7 days on mainnet) which must pass before a withdrawal may be finalized. This time interval provides an opportunity to challenge the validity of the transaction, a defining characteristic of Optimistic Rollups. Details may be found on the Optimism page describing Withdrawal Flow.
The Standard bridge allows a one-to-many mapping between L1 and L2 tokens, meaning that there can be many Boba implementations of an L1 token. However there is always a one-to-one mapping between L1 and L2 tokens in the Boba token list.
Mainnet
[Mainnet Boba Token List](token-addresses.md#Ethereum <> BOBA L2)
Sepolia
[Sepolia Boba Token List](token-addresses.md#Sepolia <> BOBA L2)
Proxy__L1StandardBridge
0xdc1664458d2f0B6090bEa60A8793A4E66c2F1c00
Proxy__L2StandardBridge
0x4200000000000000000000000000000000000010
Proxy__L1StandardBridge
0x244d7b81EE3949788Da5F1178D911e83bA24E157
Proxy__L2StandardBridge
0x4200000000000000000000000000000000000010