On March 15, 2022, the LayerZero protocol announced the mainnet launch and released the first cross-chain bridge application Stargate. On the same day, 0xMaki joined the LayerZero team full-time.
LayerZero claims to be an omnichain interoperability protocol, so how is it implemented and what is the situation with Stargate, Golden Finance will take you to read it.
Crypto-native products continue to drive the rapid expansion of the blockchain ecosystem, and developers are tasked with overcoming the challenges posed by this expansion. As new blockchains continue to emerge, developers are free to run smart contract applications on-chain that meet a specific requirement—that is, a specific combination of throughput, security, cost, and user popularity. However, the result of this expansion is a dispersion of liquidity. Since liquidity is still “limited” in nature and the ecosystem continues to expand, the liquidity problem will only continue to grow.
So, what is the solution?
Assuming a “multi-chain” future certainly cannot limit the innovation of blockchain’s most prolific developers. Therefore, we can assume that the problem is not the “ecosystem aspect” of development expansion, but the current liquidity architecture in blockchain technology. What is the solution? This is: shared liquidity between layer 1 blockchains and their applications — in other words, unified liquidity.
The second issue is the ability of protocols to be combined with each other. It means being able to share state. State sharing is the ability of one chain to make “calls” to another chain and perform various tasks (such as staking, voting, etc.). State sharing is incredible for everything from unifying liquidity to cross-chain exchanges to improving security, as we’ve seen with cross-chain accounts and security.
In one sentence: LayerZero is the underlying protocol that will enable many different applications to use it as a base layer.
The future of blockchain:
A once-contrarian view is now commonplace among blockchain developers and users — “the future is a multi-chain world”. This phrase has been widely used, but what does it actually mean from a development perspective?
In short, all innovations in blockchain technology come from the desire to solve current sociological or financial problems. In a “single-chain world” (i.e., a single blockchain forms the base layer for all applications), all solutions to these problems are limited by the limitations of the underlying blockchain (i.e. security, throughput, etc.). Essentially, this limits how far an application can evolve. However, in a “multi-chain world”, the blockchain that is most effective at solving the problem the application is intended to solve will be used. In other words, in a “multi-chain world”, multiple blockchains must continue to innovate to remain the most effective for the applications they support. As a side note, applications may even prefer to partition specific parts of their protocol across separate chains.
An example from the gaming industry might look like this:
1. The game takes place on the [high-throughput chain]
2. NFT-based rewards (and their related markets) exist in [low fees, high popularity chains]
(This design structure is already popular in current and future game projects)
So the question is how these applications can communicate efficiently between the independent chains they are on.
LayerZero’s solution : full-chain interoperability through cross-chain bridging and messaging.
Most current bridging protocols are multi-chain, what does it mean when LayerZero touts it is capable of Omnichain bridging?
Full chain means that the LayerZero solution allows more than 2 chains to communicate across chains at the same time. In current bridging solutions, most cross-chain messaging happens between two different chains. However, through the use of repeaters and oracles, LayerZero full-chain messaging is possible.
What is LayerZero?
LayerZero is a full-chain interoperability protocol. Its mission is to connect every contract on one chain with every contract on every other chain — pure interoperability.
A common question often arises here – does LayerZero look like a bridge?
No, LayerZero is purely focused on allowing interoperable on-chain universal messaging between user applications on different chains. Bridges can then be built on top of LayerZero (each bridge may have a different asset transfer design) and will leverage its underlying messaging capabilities. We discuss potential use cases for generic messaging in a later section. Now, let’s focus on how LayerZero handles cross-chain messaging.
Before extending LayerZero’s new approach, let’s dissect the current approach to cross-chain messaging:
1. Middle chain method:
This approach requires an “intermediate chain” to receive, validate and forward messages between chains, such as Gravity or Axelar. Therefore, one needs to rely on this chain to perform verification and trust its consensus. Intermediate chains have full signing authority to write their own transactions to target chains that implicitly trust those transactions.
The obvious problem here is a potential vulnerability/attack. If intermediate chain consensus is leveraged, all liquidity on all paired networks can be stolen almost instantly. Considering the multi-billion dollar security requirements, this intermediate chain will inevitably become a critical failure point for future attacks.
It is important to note that the intermediate chain approach is usually much cheaper than other solutions.
2. Light nodes on the chain:
On-chain light nodes receive and verify all block headers for each paired chain. In short, you take the entire sequential history of block headers and store them on the opposite chain (and vice versa). The transaction proof containing the message is then forwarded and verified on-chain against the block header.
This is the safest way to transfer messages between chains. However, it is also the most expensive solution.
So how is LayerZero’s unique “ultra-light node” approach different?
1. Ultra Light Node:
LayerZero Labs’ Ultra-Light Node (ULN) approach claims to reduce costs (i.e. closer to the cost of intermediate chains) while maintaining the high security of light nodes.
How it does it : This is achieved by performing the same validation as on-chain light nodes; but instead of saving all block headers in order, a decentralized oracle (like Chainlink) receives block headers on demand.
Process: Two independent parties are required to independently pass information from the source chain to the target chain:
1. Oracles (ie Chainlink, Band, etc.) relay general block information, such as block headers.
2. Relayers, relaying transaction proofs, these transaction proofs originate from the information relayed by the oracle machine.
When a user application sends a message from chain A to chain B, the message is routed through endpoints on chain A. The endpoint then notifies the oracles and repeaters specified by that user application of the message and its destination chain. The oracle forwards the block header to an endpoint on chain B, and the relayer submits the transaction proof. The proof is verified on the target chain and the message is forwarded to the target address.
Results and their implications: Let’s look at the basic security-related consequences that can occur between two parties (i.e. oracles and repeaters) in the design of an ultralight node architecture.
1. Both parties are honest: If both the oracle and the repeater are honest, the transaction is validated on-chain and forwarded to the target application.
2. The oracle is honest, the repeater is dishonest: the transaction cannot be verified.
3. The repeater is honest, the oracle is dishonest: the transaction cannot be verified.
4. Both parties are dishonest: This is the only situation where a security breach can occur. This requires malicious collusion between the oracle and the repeater. However, this is unlikely to happen. The exploit has a limited scope for damage if it occurs in the unlikely event that it occurs. There are two reasons for this:
1. For example, if Chainlink is selected as the oracle. For malicious behavior to occur, both the relayer and the decentralized oracle network Chainlink would need to be attacked simultaneously. In other words, even if the relay is malicious, it will only reduce the security to the level of the oracle (i.e. Chainlink) security.
2. Even in the case of direct collusion between the oracle (ie, oracle ‘A’) and the relayer (ie, relayer ‘A’), all risk is only in the oracle A-relayer A pairing. In other words, anyone using oracle ‘BZ’ or relay ‘BZ’ (or relaying their own transactions) will not be affected. However, if AA pairings were more extensive, more problems could arise.
Therefore, this risk segmentation is an attractive feature compared to current intermediate chain solutions. It is important to note that this also means that any application can decide to rely on its own transaction proofs (i.e., as a relayer) and maintain full control over its own security.
“Risk Segmentation” associated with LayerZero’s messaging architecture. LayerZero’s architecture limits exploitation risk to the specific oracle-relay pair being exploited. However, the intermediate chain design means that a single vulnerability can put all liquidity on all paired networks at risk.
All in all, LayerZero’s ultra-light node approach will be more expensive than an intermediate chain solution (as LayerZero performs transaction validation directly on-chain), but will benefit from the risk of extreme decentralization and no central point of failure (i.e. high security).
What use cases does LayerZero offer?
People might confuse LayerZero with protocols that only allow cross-chain asset transfers (i.e. bridging assets across chains). However, it is much more than that. LayerZero’s generic data messaging approach actually offers a wider range of potential use cases. Essentially, any message or shared state you need between two independent chains can be unified across LayerZero.
Here are some example use cases discussed in a recent Delphi Podcast by Bryan Pellegrino (Co-Founder and CEO of LayerZero Labs):
1. Status sharing:
Currently, if an application is built on multiple chains, the state of these applications is difficult to synchronize with each other. For example, SushiSwap exists on twelve separate chains. To synchronize state with its main application on Ethereum, code is required for each associated bridge (i.e. Wormhole, Avalanche bridge, etc.). Also, if SushiSwap decides to expand into a new ecosystem, more specific code is required. LayerZero allows all cross-chain pairs to use a single interface and codebase, greatly simplifying the developer and user experience. Comparable to cross-chain accounts on Cosmos.
2. The liquidity of the unified bridge:
In the current system, bridges compete to attract liquidity providers to use their services. This would fragment the limited available liquidity between bridges and their respective paired pools. For example, if you want to connect a chain with multiple other chains, you will need a lot of liquidity to make using each paired pool of funds a good user experience. This is capital inefficient.
LayerZero changes this – it allows a single liquidity pool to be tied to all connected chains (but with liquidity on various chains) and guarantees finality of asset transfers on the source chain. This means that when users make any asset transfer between the two chains, they will be guaranteed assets on the target chain. Additionally, liquidity providers receive fees from all transactions on the destination chain, regardless of which source chain it was received from.
3. Cross-chain lending:
Let’s highlight the benefits of using LayerZero lending with an example:
Assuming you own ETH on Ethereum and want to participate in mining on Avalanche, here are the steps currently required:
1. Lending ETH on Ethereum
2. Borrow assets using collateralized ETH
3. Bridge to Avalanche (toll)
4. Exchange to AVAX (fee, you need to already have AVAX)
5. Enter mining
6. From mining coins to native assets (fees)
7. Bridge back to Ethereum (fees)
8. Repay the loan on Ethereum
9. Recover Collateral
Now compare with LayerZero:
1. Lending ETH on Ethereum
2. Borrow AVAX directly on Avalanche
3. Enter mining
4. Pay off your loan on Avalanche
5. Release collateral on Ethereum
In short, LayerZero provides a simpler and cheaper user experience.
Currently, exchanging from an asset on one chain to another asset on another chain can be inconvenient for users, especially between assets with limited funding pairs. In most cases, it is also required that the user already owns the target chain’s native asset (or acquired it externally) in order to perform the exchange.
With LayerZero, a cross-chain exchange only requires one transaction on the source chain. For example, users will be able to swap from ETH on Ethereum to SOL on Solana in a single transaction from a source chain (say Ethereum) without requiring any SOL on Solana to perform the swap.
5. Multi-chain revenue aggregator:
Current yield aggregators often operate within a single ecosystem. Therefore, a major weakness of these aggregators is the inability to take advantage of lucrative mining opportunities on different chains. Given the exponential expansion of the blockchain ecosystem, it is critical that revenue aggregators can take advantage of emerging opportunities without necessarily being built on a single chain. LayerZero’s architecture is well suited to exploit this shortcoming of current blockchains. Furthermore, multi-chain yield aggregators provide beneficial network effects to their connected ecosystems – such as reducing market inefficiencies (i.e. a form of arbitrage) and increasing liquidity (i.e. enhancing user experience).
This means that Layerzero is able to seamlessly bundle complex transactions into a single transaction: unstaking, swap, bridge, swap, staking from one protocol to another. It is even possible for dApps to run their own relays/oracles and control their own security.
Will LayerZero have a token in the future?
The answer is likely to be yes. While several people from the Layerzero team have been seen coming out to say this won’t happen for the time being, there’s a good chance it will happen eventually. Also, check out LayerZero’s contract:
ZRO token holders
LayerZero and IBC
One of the other popular ways to relay data and simplify complex transactions is IBC. IBC is about to have more interest in Interchain Accounts, so how do the two compare?
Let’s first describe the conditions required for IBC to function:
Direct IBC requires a few things: fast certainty and proof of state inclusion that can be verified by both parties. However, you can still use it without using IBC directly, via bridges like Gravity/Axelar that have their own validator set, fast determinism, and state verifiability.
So how is IBC different ? It differs from the normal bridge solution in that it uses the counterparty’s validator set instead of an additional validator set. This means it relies on two chains. Therefore, IBC is a general framework for blockchain interoperability, enabling complex composability. IBC works through a network specification that works on all chains that use ICS. ICS is basically a modular specification for interchain IBC transactions. It enables chains to scale horizontally by generating their own validator sets and replicated state machines suitable for their applications and communicating with other chains via IBC, thus enabling interoperability.
So what about LayerZero ?
LayerZero works seamlessly with both deterministic and probabilistic (PoW) final chain transactions. In the latter case, the oracle would act as a proxy for enforcing the necessary deterministic thresholds, however, there is some danger here as it is not truly deterministic finality. However, IBC is only used directly for deterministic (fast deterministic) chains unless an intermediate chain solution or similar is used. Although, because LayerZero uses both oracles and repeaters, it is only as secure as the oracles used. Although, we have further covered how this is differentiated.
LayerZero can be more expensive than bridges that handle proofs with IBC using technologies like ZK light clients. The ZK light client will be similar to LayerZero to make the verification of bulk block headers more efficient. There are also many who believe that IBC and therefore ICS will be the standard for future bridges.
Also, since many proponents of DeFi 1.0 and Ethereum communities are not necessarily happy to use something like LayerZero, but prefer to use other bridges like Connext etc.
There has been a lot of innovation happening across various protocols across the industry, so even though LayerZero’s capabilities currently seem incredible, that doesn’t mean it’s the end goal of bridges and their related capabilities, LayerZero is much more than asset cross-chain. Although for now, LayerZero is certainly more innovative than any other current bridge/interchain shared state service.
What changes will the omnichain blockchain have in the future?
Perhaps the most interesting side effect of the future of truly interoperable blockchains is the indirect impact this could have on other layer 1 blockchains. For example, if an application can divide its protocol into chains that specifically meet its needs, blockchains may tend to specialize based on their greatest (or most profitable) properties. For example, if developers continue to choose specific high-throughput blockchains over others, what does that mean for other blockchains? Maybe they might focus on another application requirement (eg security, cost, etc). For example, the overall blockchain design (i.e., the entire blockchain trying to provide solutions for scalability, consensus, and data availability) may become redundant. Modular blockchain designs or blockchains that focus on specific required features are likely to benefit the most from cross-chain communication.
One sentence summary: Stargate and STG tokens are not the same entity as LayerZero, but the first dApp to be released on top of the LayerZero protocol.
Stargate will be the first project based entirely on the LayerZero protocol. The best way to describe this concept is – multi-chain single-sided stablecoin curve pools. This means, assuming you exchange USDC from ETH → Avax, you will have StarGate process ETH USDC Eth pool → USDC Avax pool in one transaction. This allows you to bridge values very efficiently. Then, when the USDC pool deviates from the target, the pool arbitrageur will rebalance the USDC pool.
So from a more technical perspective, Stargate is basically a composable native asset bridge with unified liquidity and fast finality built using the LayerZero protocol.
Stargate aims to be the first bridge to solve what we call bridging the impossible triangle, let’s take a look at what exactly this triangle is:
When you try to create a bridge, there are three main challenges to solve, which are instant finality, unified liquidity, native assets on the target chain. This means that you want to receive the required funds on the target chain as soon as the transaction is successful. Additionally, it is possible to access a single liquidity pool between multiple chains (multi-chain curves in one pool), as well as the desired assets on the target chain.
By being able to do all three, you can do more than just exchange a certain asset. For example, Stargate allows you to exchange any asset between any chain in one go, which is an incredible user experience. It’s early days, and for now, most functions are simple full-chain stablecoin transfers, but there are many more possibilities.
On which chains will Stargate be available?
It will be live on Ethereum, Avalanche, Polygon, BNB Chain, Fantom, Arbitrum and Optimism, and in 6 to 8 weeks on other chains like Solana, Terra, Cosmos Hub and Osmosis.
LP on Stargate
Users can add liquidity to token chain pools (such as USDC-Ethereum) and receive stablecoin rewards for each transfer, as well as LP token mining in exchange for STG rewards.
Stargate uses a unique algorithm called Delta (Δ). It is basically an algorithm for tracking pools across chains. LPs will be able to collect fees from all connected chains, which means if you LP a stablecoin on Ethereum or Avalanche, you will collect fees from all incoming exchanges to those chains from other chains. Also, LPs are not penalized for negative inflows, while token swappers are.
That penalty is then kept in a reward pool that is used to incentivize arbitrageurs to close balance gaps, and as we’ve seen with other arbitrage systems, it works well.
STG Token Economics
As we’ve been very clear before, token economics often determines the lifespan of a protocol, so let’s take a look at the token economics of Stargate’s native governance token, STG -.
1 billion STG has been minted at launch, and this supply is limited. The assignment is like this:
Teams and investors have a 1-year full lock, followed by a 2-year linear unlock. 15% will be allocated to auction buyers and the STG-USDC pool on Curve. And 16% will be sold as a bonding curve on various chains.
In addition, 2.11% will be used for the initial release program to meet the needs of LPers. Additionally, 1.55% will be added as liquidity to various DEXs on various chains. The remaining about 30% is used for community incentives, etc.
Honestly, this is a relatively good allocation compared to many other protocols. However, I guess a lot of it has to do with the fact that investors are happy to receive less STG tokens and would rather wait for the ZRO token launch date. If we assume that the investor has signed up to receive STG tokens and ZRO tokens. Why do we think so? Because it doesn’t make sense to auction and pool tokens at a much lower valuation than the one received from investors at the valuation LayerZero received. Therefore, we can conclude that when ZRO is launched, investors will definitely receive ZRO tokens.
Now, having said that, the whole token release scheme is excellent. Here, we’re specifically referring to curve pools, and various on-chain bonding curves – which incentivize people to buy early because they’ll pay less.
There are likely to be three types of tokens at launch:
STG: Stargate Protocol Token
s*: Stargate LP token
veSTG: Stargate voting rights
Community members can participate in Stargate DAO governance using accounts with voting escrow STG (veSTG) balances. Releases to various pools will be determined by governance, as we know from various exchange protocols that previously used pools. The longer you lock STG tokens, the more voting power you get.
The launch of the STG token will take place in two phases.
1. Start the auction, which will help start the STG-USDC pool on Ethereum
2. Use the liquidity owned by the protocol to bind.
The first phase will be a $25 million USDC auction on a first-come, first-served basis. This means that auctions are likely to be sold out in a single block. Although, these tokens will be locked for 1 year and unlocked linearly over 6 months. By participating in the auction, investors will receive aSTG, which will represent your participation in the auction and therefore will receive veSTG that can be used for governance.
The second phase will include bonding curves, which will help build STG liquidity on various protocols. The distribution is as follows:
Ethereum – 40M STG
BNB – 22M STG
Avalanche – 27M STG
Polygon – 27M STG
Phantom – 22.5M STG
Optimism- 8M STG
If you are not sure what a binding curve is, allow me to explain. A bonding curve is a contract in which you continuously mint and burn tokens. So in this case, you buy the contract, and it mints STG for you, increasing the price as more people buy. STG’s bonding curve will increase in price as people buy various on-chain contracts and will remain open for 72 hours or until STG reaches 3x the opening bonding price (i.e. $1.50). Let’s take a look at what the bonding curve looks like so you can get a better idea of how the auction will work:
The Bonding curve model has no central authority responsible for issuing tokens. Instead, users can purchase the project’s tokens through smart contracts. The cost of purchasing these tokens is determined by the supply and demand of the tokens. Unlike traditional models, the cost of these tokens increases with supply.
LayerZero lays the foundation for composability and interoperability. However, what remains to be seen now is what dApps will be built on top of it, and existing dApps will use their own oracles and relayers to implement their protocols. Regardless, being a multi-chainer is definitely an exciting time.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/full-chain-interoperability-understanding-the-layerzero-protocol-and-its-first-project-stargate/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.