Stargate V1
Delta Algorithm
Stargate V1 represents the foundational native asset transfer mechanism of the Stargate protocol, introduced in March 2022. It was engineered to solve the “bridging trilemma” by enabling instant guaranteed finality, unified liquidity, and native asset transactions without relying on intermediate or wrapped tokens.
Stargate V1 leverages the novel Delta (Δ) algorithm and an underlying omnichain communication protocol (LayerZero) to facilitate these efficient cross-chain transfers.
Core Principles
Stargate V1 was designed to address key problems in existing cross-chain bridges:
-
Native Asset Transfers:
- Unlike bridges that lock assets and mint synthetic/wrapped versions on the destination, Stargate V1 deals purely in native assets. Users deposit a native asset on the source chain and withdraw the same native asset on the destination chain.
- This eliminates the need for additional swaps on the destination chain to convert wrapped tokens back to native ones, simplifying the user experience.
-
Unified Liquidity:
- Instead of fragmented liquidity pools for each pair-wise connection between chains, Stargate V1 utilizes unified, single-sided asset pools. For example, a single pool of USDC serves transfers to and from all connected chains.
- All connections (routes to different destination chains) deposit into and withdraw from this single pool for a given asset.
- This approach significantly enhances capital efficiency for Liquidity Providers (LPs), who can stake into a single pool and earn fees from all transfers, regardless of the source chain.
-
Instant Guaranteed Finality:
- A critical feature is the guarantee that any transfer request committed on the source chain will be successfully committed on the destination chain.
- This is achieved by ensuring sufficient liquidity is available on the destination chain before the source transaction is finalized, eliminating the risk of failed transfers due to insufficient funds and the need for complex reversion mechanisms.
-
Cross-Chain Composability:
- Stargate V1 enables a cross-chain transfer to be composed with smart contracts on both the source and destination chains within a single conceptual transaction. This offers enhanced flexibility for developers building cross-chain applications.
-
Scalability:
- By using unified liquidity, Stargate V1 can more easily scale to support a vast network of chains, overcoming a key limitation of bridges that require quadratically scaling liquidity pools for new chain additions.
Mechanism
The Stargate V1 route operates based on the following general mechanism:
- Resource Balancing (Delta Algorithm): The core of V1 is the Delta (Δ) algorithm, a novel resource balancing algorithm. It manages the unified liquidity pools by using “soft partitions” – allocating slices of the local chain’s liquidity to each remote chain in the network. The algorithm works to keep these partitions balanced in the face of imbalanced transaction volume.
- When a transfer request is received (e.g., from Chain X to Chain Y), the algorithm checks local state and available “bandwidth” (balance) for that destination.
- If a channel (connection to a remote chain) has a deficit, newly deposited funds from user transfers are first used to close that deficit.
- Remaining funds are then distributed across channels based on configured weights, or to the destination of the current user transfer.
- User Interaction:
- A user deposits their native asset into the Stargate V1 liquidity pool on the source chain.
- The Δ algorithm processes the request, ensuring finality.
- A message is sent via the underlying messaging protocol to the destination chain.
- The user withdraws the corresponding native asset from the Stargate V1 liquidity pool on the destination chain.
- No Intermediate Tokens: No intermediate or synthetic tokens are minted at any point during the bridging process.
Messaging Protocol
- Stargate V1 utilizes LayerZero as its underlying omnichain communication protocol to enable reliable bidirectional inter-chain communication, facilitating the transfer of messages required for the Δ algorithm to operate and guarantee finality.
Usecase
- For Users:
- Seamless, single-transaction native asset transfers.
- No need for manual swaps of wrapped tokens.
- Reduced friction and fewer steps to reach the desired asset on the destination chain.
- Instant guaranteed finality provides certainty.
- For Liquidity Providers (LPs):
- High capital efficiency due to single-sided, unified asset pools.
- Collect fees from all incoming transfers to the pool, regardless of the source chain.
- For Developers:
- Enhanced cross-chain composability for building sophisticated applications.
Further Reading
Last updated on