🌉Smart Deposit

How Goal3's Smart Deposit works

LayerZero Integration

This document outlines the technical process for integrating LayerZero to enable efficient and secure cross-chain fund onboarding on Goal3.

In summary, Goal3 has developed an intent-based cross-chain bridge powered by L0, as the underlying technology for the Smart Deposit function on the Goal3 App.

Cross-Chain Messaging with LayerZero (L0):

The cross-chain messaging capability of LayerZero serves as the foundational mechanism for creating a cross-chain present for Goal3, even though the sportsbook still runs natively on zkSync Era. L0 enables seamless depositing process across various blockchain networks, allowing users to onboard fund into Goal3 in mere minutes, from anywhere.

On the source network:

  1. Transaction Receipt: When the pool in the source network receives a transaction, typically a transfer request for native ETH, the process is initiated.

  2. Price check: The smart contract double-checks the ETH price to ensure that the value of the native token is consistent across different networks.

  3. Message Transmission: the source pool sends a message to the destination network's pool which is on zkSync Era. This message includes the amount of token (post-conversion) to be disbursed.

On the Destination Network (zkSync Era):

  1. Receiving the Message: Upon receiving the cross-chain message, the destination network's pool acknowledges the transfer request.

  2. Token Swap Execution: The pool then executes a swap, converting the available native token (ETH) into the token specified by the user (zkUSD). This swap is facilitated through the SyncSwap pool, making sure the output token is zkUSD.

  3. Disbursement: Following the successful swap, zkUSD is disbursed to the user, completing the cross-chain transaction process.

Currently the only route for LayerZero is ETH.ETH -> ERA.zkUSD. In the future more tokens will be supported.

Last updated