Skip to main content

Deposits

deposit

In the context of the OP Stack, a deposit is a transaction initiated on the layer 1 blockchain (e g. Ethereum Mainnet) and executed on the layer 2 (e.g. OP Mainnet).

To maintain a shared language, Rollbridge refers to bridge operations where tokens flow from the layer 1 to the layer 2 as deposits, and bridge operations where tokens flow from the layer 2 to the layer 1 as withdrawals.

How do deposits work?

Deposit transactions are initiated by calling depositTransaction function on the L1 OptimismPortal contract. They emit a TransactionDeposited event encoding the L2 transaction data which rollup nodes are constantly listening for. Once rollup nodes find these events they queue them up to be executed first thing in the new L2 block.

For a more comprehensive understanding of deposits, please refer to the Optimism specs document on deposits.

After selecting your token to bridge and pressing the deposit button, a transaction will be sent to the L1 blockchain in question, most likely Ethereum Mainnet. Once the L1 block is considered finalized by the L2, your deposit transaction will be included in the L2 history and committed.