Deposit and Withdrawal

Deposit Flow

The deposit flow in SOON Mainnet involves several steps to ensure secure and efficient handling of user assets. Here is an illustration of the process:

  1. L1 User Contract: Initiates the deposit transaction.

  2. L1CrossDomainMessenger: Sends the deposit message to the SoonPortal.

  3. SoonPortal: Processes the deposit transaction and generates a TransactionDeposited event.

  4. L2CrossDomainMessenger: Relays the deposit message to the L2 network.

  5. L2 User Contract: Receives the deposit transaction.

This flow ensures that the asset transfer from L1 to L2 is seamless and secure, leveraging cross-domain messaging protocols to facilitate efficient communication between the layers.

Withdrawal Flow

The withdrawal sequence is crucial for securely moving assets from L2 back to L1. The process involves multiple stages, as depicted below:

  1. Stage 1: The user initiates a withdrawal transaction on L2. The transaction is batched and sent to the data availability provider (Celestia). The new output root is polled, and the L2 output root hash is generated.

  2. Stage 2: The L2 output root hash is proposed to the L1 (Ethereum). Withdrawal data and proof are generated, and the L2OutputOracle verifies the proof.

  3. Stage 3: The withdrawal is finalized on L1, and the assets are transferred to the user’s L1 address.

Last updated