L2BEAT Bridges is a work in progress. You might find incomplete research or inconsistent naming. Join our Discord to suggest improvements!

Stargate v2 (LayerZero v2) logoStargate v2 (LayerZero v2)

About

Stargate v2 is a Hybrid Bridge (mainly Liquidity Network) built on top of the LayerZero messaging protocol.


  • Total value locked
  • Destination
    Various
  • Validated by
    Third Party
  • Type
    Hybrid

  • About

    Stargate v2 is a Hybrid Bridge (mainly Liquidity Network) built on top of the LayerZero messaging protocol.


    Value Locked
    Detailed description

    Stargate v2 is a Hybrid Bridge (mainly Liquidity Network) built on top of the LayerZero messaging protocol.

    It uses liquidity pools on all supported chains, supports optional batching and a Token Bridge mode called Hydra that can mint tokens at the destination.

    Risk summary
    This project includes unverified contracts. (CRITICAL)
    Technology

    Principle of operation

    On chains where assets are available through other bridges, Stargate acts as a Liquidity Bridge. This requires Stargate liquidity pools for assets at the sources and destinations.

    While liquidity providers need to keep all pools buffered with assets, users can deposit into a pool on their chosen source chain and quickly receive the equivalent asset at the destination through an Executor. Users can choose between an economical batched bridge mode (‘bus’) or an individual fast ‘taxi’ mode that delivers the bridging message as soon as the user deposits.

    The Executor is a permissioned actor that withdraws the asset from the liquidity pool at the destination directly to the user. They are only a relayer and depend on verifiers to verify the message coming from the source chain. These verifiers can be freely configured by the OApp owner (Stargate).

    Just like the assets themselves, so-called credits are bridged among the supported pools in the Stargate v2 system. Credits can be seen as claims on assets, so a liquidity pool needs credits for a remote pool to be able to bridge there. These credits can be moved and rebalanced (but not minted) by a permissioned Planner.

    1. Stargate Docs: Modes of transport
    2. Stargate Docs: Credit allocation system

    LayerZero messaging

    The LayerZero message protocol is used: For validation of messages from Stargate over LayerZero, two verifiers are currently configured: Nethermind and Stargate. If both verifiers agree on a message, it is verified and can be executed by a permissioned Executor at the destination. This configuration can be changed at any time by the StargateMultisig.

    • Users can be censored if both whitelisted Verifiers or the LayerZero Executor fail to facilitate the transaction (CRITICAL).

    • Funds can be stolen if both whitelisted Verifiers collude to submit a fraudulent message (CRITICAL).

    1. LayerZero Docs: Security Stack

    Destination Tokens

    Since Stargate is mainly a Liquidity Network, its liquidity pools at the destination are filled with tokens from canonical or other bridges than Stargate. As no new tokens are minted, the users do not inherit the risk of the Stargate bridge as soon as the bridging is complete. For chains where a destination asset is not available, Stargate v2 offers a Token Bridge mode called Hydra that locks the asset at the source and mints a Stargate OFT at the destination.

    1. Stargate Docs: Token Bridge mode (Hydra)
    Permissions

    The system uses the following set of permissioned addresses:

    Stargate Multisig 0x65bb…9705

    This is a Gnosis Safe with 3 / 6 threshold. Owner of all pools and the associated OApps, can create new pools and endpoints, set fees and modify the OApp configuration to change verifiers and executors.

    Used in:

    Those are the participants of the Stargate Multisig.

    LayerZero Multisig 0xCDa8…4C92

    This is a Gnosis Safe with 2 / 5 threshold. The owner of the LayerZero contracts EndpointV2, Uln302 and Treasury. Can register and set default MessageLibraries (used e.g. for verification of Stargate messages) and change the Treasury address (LayerZero fee collector).

    Used in:

    Those are the participants of the LayerZero Multisig.

    Central actor who can move credits (see CreditMessaging contract) among chains and thus move liquidity claims of the Stargate pools.

    Smart contracts
    A diagram of the smart contract architecture
    A diagram of the smart contract architecture

    The system consists of the following smart contracts on the host chain (Ethereum):

    TokenMessaging 0x6d66…A980

    A LayerZero OApp owned by Stargate that manages bridging messages from all pools on Ethereum. It can batch messages with a ‘bus’ mode or dispatch them immediately for higher fees.

    CreditMessaging 0x6b8a…bb9d

    A LayerZero OApp owned by Stargate that is used for the virtual accounting of available tokens to the local pools. A local pool thus has a record of how many tokens are available when bridging to another remote pool. The permissioned Planner role can move these credits.

    Stargate Verifier 0x8Faf…0d18

    One of the registered verifiers for the OApp acts through this smart contract. They are allowed to verify LayerZero messages for the Stargate bridge and enable their execution at the destination. The source code of this contract is not verified on Etherscan.

    Nethermind Verifier 0xa59B…0BA5

    One of the registered verifiers for the OApp acts through this smart contract. They are allowed to verify LayerZero messages for the Stargate bridge and enable their execution at the destination.

    Value Locked is calculated based on these smart contracts and tokens:

    Escrow for USDC 0xc026…89C7

    Stargate liquidity pool for USDC on Ethereum.

    Escrow for ETH 0x77b2…7931

    Stargate liquidity pool for ETH on Ethereum.

    Escrow for USDT 0x9335…3973

    Stargate liquidity pool for USDT on Ethereum.

    Escrow for Metis 0xcDaf…EcD3

    Stargate liquidity pool for METIS on Ethereum.

    Escrow for mETH 0x268C…931D

    Stargate liquidity pool for mETH on Ethereum.

    Escrow for USDC 0xe8CD…d0d3

    Stargate liquidity pool for USDC on Arbitrum.

    Escrow for USDT 0xcE8C…B7D0

    Stargate liquidity pool for USDT on Arbitrum.

    Escrow for ETH 0xA45B…5f7F

    Stargate liquidity pool for ETH on Arbitrum.

    Escrow for USDC 0xcE8C…B7D0

    Stargate liquidity pool for USDC on Optimism.

    Escrow for ETH 0xe8CD…d0d3

    Stargate liquidity pool for ETH on Optimism.

    Escrow for USDT 0x19cF…07dD

    Stargate liquidity pool for USDT on Optimism.

    Escrow for USDC 0x27a1…5d26

    Stargate liquidity pool for USDC on Base.

    Escrow for ETH 0xdc18…F7C7

    Stargate liquidity pool for USDC on Base.

    Escrow for USDC 0x3Fc6…14E4

    Stargate liquidity pool for USDC on Scroll.

    Escrow for ETH 0xC2b6…0583

    Stargate liquidity pool for ETH on Scroll.

    Escrow for WETH 0x36ed…7D08

    Stargate liquidity pool for ETH on Metis.

    Escrow for Metis 0xD905…31F0

    Stargate liquidity pool for METIS on Metis.

    Escrow for USDT 0x4dCB…5125

    Stargate liquidity pool for USDT on Metis.

    Escrow for ETH 0x81F6…B075

    Stargate liquidity pool for ETH on Linea.

    Escrow for WETH 0x4c1d…7463

    Stargate liquidity pool for ETH on Mantle.

    Escrow for USDT 0xB715…57FC

    Stargate liquidity pool for USDT on Mantle.

    Escrow for USDC 0xAc29…acDC

    Stargate liquidity pool for USDC on Mantle.

    Escrow for mETH 0xF762…F3F1

    Stargate liquidity pool for mETH on Mantle.

    The current deployment carries some associated risks:

    • Funds can be stolen if the OApp owner changes the configuration of the OApp to malicious verifiers and executors (CRITICAL).

    • Users can be censored if the permissioned Planner moves all credits away from the users' chain, preventing them from bridging.

    • Funds can be stolen if the source code of unverified contracts contains malicious code (CRITICAL).

    Knowledge Nuggets