Stargate — The next generation in a multichain universe

ChadFi Cat
Coinmonks
6 min readMar 29, 2022

--

The future is multi-chain

Don’t want to read? TLDR here
Twitter:
https://twitter.com/tradfichad

The problem

In DeFi, liquidity is King. Protocols most successful at capturing liquidity also tend to be the most long lived overall. This means that builders have to spend more time on ways to incentivise liquidity out necessity. However, as new chains and protocols emerge, liquidity becomes increasingly fragmented due to a lack of interoperability, trapping users within a specific ecosystem and creating a barrier to adoption of newer protocols.

The current landscape

To say that there aren’t any solutions addressing cross-chain liquidity would be to downplay how far we have come in DeFi. Without the bridges and multichain networks available, there would be no Bridgor and a chad such as myself would find it difficult to ape in to alpha across chains. So if we have all of this, why ZeroLayer and why Stargate? Well, let’s start by breaking down some of the issues with cross chain bridges today.

  1. Guaranteed finality is subject to the availability of liquidity on the destination chain. This results in scalability challenges as liquidity pools will need to grow exponentially in order to keep up with token coverage.
  2. Use of intermediary or wrapped tokens, creating further liquidity fragmentation (different wrapped versions of a single asset), operational inefficiencies and higher gas fees due to additional steps performed by the protocol.
  3. Largely limited to bridging of the same asset across chains and to certain groups of chains thereby requiring the user to make perform an additional transaction for cross asset swaps. This again results in more time wasted and more money spent on gas fees.

I’ve listed some examples of the more popular protocols within this space below as examples:

Multichain (Bridge)

Bridges like Multichain use a lock + mint and burn + redeem model to facilitate cross chain transfers. This relies on the use of an intermediary synthetic asset ($any) and comes with the limitations such as the lack of 1) Unified liquidity: asset liquidity is fragmented across chains and 2) Lack of composability: no capacity for cross-asset bridging.

For example, a $USDC bridge on Multichain from Avalanche to Fantom would involve minting a synthetic $anyUSDC token which is then burned and redeemed for $USDC on Fantom. On the off chance there is insufficient liquidity, the end user is stuck with $anyUSDC tokens which then have to be manually exchanged for $USDC on Fantom as liquidity flows through. To obtain $FTM, the user then has to swap $USDC for $FTM on a DEX.

Portal (Bridge)

Portal, a Wormhole based bridge uses a similar mechanism to Multichain. The difference is that the intermediate Wormhole wrapped asset doesn’t rely on the volume of liquidity locked into the bridge. Instead, the redemption is linked to various Liquid Markets such as Curve, Uniswap, Trader Joe, etc. which makes it a more scalable model compared to Multichain. Like Multichain, the use of an intermediate Wormhole wrapped asset introduces operational inefficiencies.

One of the lesser discussed features however is xAssets (similar to $MIM on Multichain) which are fully cross chain fungible. This is currently enabled for $UST and $ORION with a $FRAX in the pipeline. While it eliminates the need for double wrapping, there are limitations as it would be difficult to implement on tokens such as $ETH due to the number of conflicting wrapped versions across chains and the need for the user to make to take an additional step to swap for their desired token on the destination chain.

THORchain (DEX)

THORchain protocol is a network of nodes built with Tendermint and Cosmos SDK. By using $RUNE paired liquidity pools and a series of native asset nodes (Bitcoin, Ethereum, etc.). This mechanism allows THORchain to be much more scalable vs a liquidity pools without a common interchange medium as the number of pools would scare as the square number of currencies. Through this, the user can perform a one-click swap of $USDC on Ethereum to $LUNA on Terra ($USDC is swapped for $RUNE via Ethereum node. $RUNE is swapped for $LUNA via Terra node).

The downside however, is that the use of an intermediate token is still inherently cumbersome as it is a two step process and requires sufficient liquidity to facilitate a transaction. This is both time and cost inefficient.

Stargate — The next generation

Having looked under the hood of some of the more popular protocols in the current DeFi ecosystem, it is clear that cross chain swaps are still relatively cumbersome and inefficient. This is where Stargate comes in — a fully composable native asset bridge with unified liquidity and instant guaranteed finality.

Stargate is built on LayerZero, a communication primitive which enables omnichain applications. Instead of using an intermediary, chains can use LayerZero to initiate communication and transactions directly with each other without using an intermediary. For swaps, the exchange protocol is handled by smart contracts on both chains with LayerZero acting as the message delivery system.

Stargate solves the bridging trilemma:

  1. Instant finality: Funds guaranteed on destination chain when transaction is committed to source chain.
  2. Unified liquidity: Shared liquidity between multiple chains.
  3. Native assets: User desired assets (native or most liquid synthetic) on destination chain

Instant finality

While achieving instant finality is something all bridges need to achieve, LayerZero’s ΔBridge enables this through the use of Oralces and Relayers, allowing for trustless omnichain communication without the use of intermediary tokens or an intermediate chain. The core difference is that this is chain agnostic and helps to address the problems with unified liquidity which I will go over below.

Unified liquidity/ Native assets

In existing bridge models, liquidity pools are fractured across destination chains requiring intermediary tokens to be swapped for the desired native asset. The LayerZero Δ algorithim solves this problem while preserving instant guaranteed finality through the use of soft partitions. An example provided in the LazyerZero whitepaper is as follows.

In a network consisting of chains X,Y and Z, $100 of liquidity available locally on chain X would be soft-partitioned into $50 belonging to chain Y and $50 belonging to chain Z.

The key feature is the ability to borrow and return liquidity between soft partitions and avoid overdrafts or race conditions by leveraging the LayerZero communication layer. In the instance a deficit occurs on any chain, funds from other chains are distributed to cover this. Furthermore, each source chain tracks an estimate of the channel bandwidth with every other chain in the network, thereby ensuring this balance never exceeds the channel bandwidth to guarantee sufficient liquidity for each transaction.

The implications…

Another unique feature of LayerZero is cross chain composability, allowing interaction with smart contracts on both source and destination chain within the same transaction, i.e. bridging and swapping in the same transaction.

The possibilities are endless:

  1. 1 click transactions
  2. Reduced impermanent loss from single sided asset pools
  3. Reduced protocol risk by avoiding intermediary chains / tokens
  4. Multichain communication

This is a game changer and will create a whole new generation complex DeFi protocols. In fact, there is a proposal for Sushi to integrate Stargate across 7 chains. Given that Stargate is currently the only LayerZero powered protocol and a TVL of $3.5bn the future is looking stellar.

--

--

ChadFi Cat
Coinmonks

Meow. Shitposting cat who also shares alfalfa.