What is Stargate
Understanding Stargate Finance
Stargate Finance is a multi-chain cross-chain bridge based on Layerzero, created by LayerZero Labs in March 2022. It mainly supports cross-chain transfers of stablecoins and its native token STG. Currently, Stargate supports cross-chain asset transfers between eight blockchains: Ethereum, BNB, Avalanche, Polygon, Optimism, Arbitrum, Fantom, and Metis.
Layerzero is an Omnichain interoperability protocol built specifically for cross-chain information transmission. At the same time, it is also a cross-chain communication infrastructure. Developers can build cross-chain applications that meet full interoperability, such as cross-chain DEX or multi-chain yield aggregators on it.
Unified Liquidity Pool
Stargate uses the [Liquidity Swap] scheme for cross-chain asset transfer. However, unlike most cross-chain bridges that set up separate liquidity pools for specific networks, Stargate uses a unified liquidity pool to support cross-chain asset transfer.
Stargate's unified liquidity pool allows all chains to share the liquidity of the same asset. That is, each chain can access the liquidity of other chains. For example, if there is a USDT pool on chain A, USDT-related transaction requests initiated by other chains such as chain B and chain C can all borrow liquidity from the USDT pool on chain A. This design can help Stargate maximize fund efficiency during the cross-chain process.
However, the unified liquidity pool may face the problem of transaction failures due to insufficient liquidity depth. That is, when multiple chains share a liquidity pool, the number of users and parallel transactions will increase, thereby reducing the liquidity of the pool and causing some cross-chain transactions to fail.
Therefore, Stargate introduces a "resource balancing algorithm" to solve the above problem. Stargate divides the liquidity pools on each chain into multiple intervals according to different blockchains for management. For example, 100 USDT on chain A will be divided into 50 USDT on chain B and 50 USDT on chain C. When a cross-chain request is received, the resource balancing algorithm examines the liquidity of each interval and assigns the assets deposited by the user to supplement the interval with insufficient liquidity, thereby avoiding transaction failures caused by depleted liquidity.
Oracle + Relayer
In terms of cross-chain communication, Stargate uses Layerzero's [Oracle + Relayer] communication mechanism to transmit cross-chain information.
Stargate's relayer is an off-chain data storage service provided by LayerZero. Its main function is to read transaction proofs from the original chain and transfer them to the target chain.
Stargate's oracle is provided by the third-party service organization Chainlink, which can transmit block header information to the target chain and help verify the validity of transaction proofs.
Stargate's cross-chain message passing requires cross-validation of block header information and transaction proofs. Only when the message provided by the relayer and the oracle matches can the verification/cross-chain be successful. This mechanism can reduce the probability of malicious attacks to some extent. Because the attack can only occur when both the oracle and the relayer have problems and collude maliciously.
The specific process of Stargate's cross-chain message passing is as follows:
Cross-Chain
What else do you want to learn?
In This Article
