Cover photo

Comparing Cross-Chain Solutions: Rangers Connector vs. LayerZero

Author: Connie W, Sherren S

Quick Takes:

  • Rangers Connector has higher security levels. Rangers Connector completes cross-chain consensus through its own TSS-lib algorithm. LayerZero generates cross-chain consensus through independent third-party oracles and relayers.

  • Rangers Connector cross-chain cost is lower. The threshold signature of Rangers Connector occurs off-chain, saving a fair part of on-chain costs. LayerZero performs transaction verification on-chain, which consumes huge gas fees.

  • Both Rangers Connector and LayerZero can retain cross-chain historical data. The difference is that Rangers Connector retains cross-chain data from the side of underlying logic considerations, and LayerZero reflects the integrity of cross-chain data from an application.

  • Rangers Connector is an underlying cross-chain solution, LayerZero is more of an application. Rangers Connector has its own block explorer, native token, and consensus mechanism. LayerZero does not have elements of the underlying infrastructure.

post image

LayerZero’s strategy is simple yet clever. First, the team presents a project that focuses on the Omnichain NFT Application concept and lets it attract the public's attention with refreshing visuals: Gh0stlyGh0st distinguishes the origin and the target chains of each NFT with the unique background and border colors. And only after that, they reveal the cross-chain concept of Direct Communication to turn the public attention to the real target – LayerZero itself.

Picture 1. Gh0stlyGh0st Frontend [Source 1]
Picture 1. Gh0stlyGh0st Frontend [Source 1]

In this article, we will not go into further details about the cross-chain principles of Gh0stlyGh0st, although it is fair to mention that it conducts the NFT cross-chain through the path of mint-burn. The real focus of this article is to explore the mechanics behind LayerZero, and what advantages it has that make it an industry upstart in the short term. Of course, its technical shortcomings will not be avoided, either. At the same time, we will also compare it with another cross-chain solution, Rangers Connector.

Let’s first put the complex concepts behind the two cross-chain solutions into simpler words:

Rangers Connector is a Web3 cross-chain solution consisting of N nodes that efficiently reach consensus through TSS-lib.

LayerZero is a cross-chain transfer protocol, which uses the components of oracles and relayers to realize the cross-chain transfer of assets between on-chain applications.

Now that we have a basic understanding of these two solutions, we can dive deeper into the details. Let's look straight at the technical side of things.

1. Cross-chain Process

Although Rangers Protocol and LayerZero both solve the problem of data and assets cross-chain, there are essential differences between the two in the implementation of specific solutions. Taking the cross-chain of NFT asset 0x1 on ETH to Polygon as an example, we can see the differences between the cross-chain processes of the two.

post image
Picture 2. LayerZero Cross-Chain Process [Source 2]
Picture 2. LayerZero Cross-Chain Process [Source 2]

2. Security Level

From the above process, it is not difficult to find the core elements of the two projects in the cross-chain process:

The core of the Rangers Connector is the consensus algorithm of TSS-lib.

LayerZero relies on independent third-party oracles and relayers.

Rangers Connector – High Security

Rangers Connector has its consensus algorithm explained in its dedecated white paper. TSS, which stands for threshold signature, is a technology that changes the traditional 1:1 correspondence between public and private keys to 1:N between public and private keys. According to it, the algorithm can pass as long as t of the N private keys can independently sign the message. TSS-lib is a completely decentralized TSS consensus based on a set of aggregated signature algorithms. Its keys are generated by machines, which avoids the process of human intervention and has higher randomness. The currently popular multi-signature causes human intervention, and its security is far lower than that of TSS.

LayerZero - “Risk Isolation”

LayerZero's cross-chain consensus essentially occurs in oracles and relayers. The division of labor between the oracle machine and the relayer is different. The oracle machine mainly verifies the block header, and the relayer mainly obtains the transaction event certificate. The feature of this consensus process is to isolate the risk in the pairing of "oracle-relayer", and they must be independent individuals to prevent any malicious behavior and jointly ensure cross-chain security. According to the information disclosed by LayerZero in its white paper, the default configuration of the oracle is to use Chainlink, and developers themselves can customize the oracle. The only option available to relayers is to use LayerZero's own scheme uniformly.

As described in LayerZero's white paper, LayerZero will benefit from the risk of extreme decentralization and no central point of failure (i.e. high security). It's easy to overlook a loophole in its consensus process – validating block headers. Validation block headers are at risk of being easily forged. It uses md5 to verify whether the number has changed, and then verify whether the entire piece of data has been tampered with. Advanced hackers will avoid this method of verification, that is, directly falsify the data on the premise that the verified number has not been modified.

3. Cross-Chain Cost

Rangers Connector’s threshold signature occurs off-chain, which can save the cost of multiple on-chain operations.

LayerZero performs transaction verification directly on-chain, making it extremely expensive, requiring gas fees for almost every operation. For instance, if we take the cross-chain from Ethereum to Polygon as an example, we would have to bear high cross-chain costs.

4. Cross-Chain Data Integrity

Both Rangers Connector and LayerZero have achieved complete historical data retention. However, the former realizes data retention from the underlying solution, while the latter realizes cross-chain data display from the application level.

From the information reflected in step 11 of the Rangers Connector's cross-chain process, the asset status, transaction hash, consensus data, etc. on the origin chain will be synchronized to the target chain. Even if the asset is cross-chained multiple times, these states and information will be synchronized. This not only preserves the historical data of the asset in its entirety, but also makes it traceable and certifiable.

In the relevant technical description of LayerZero, it is not directly stated that it can retain the complete data of assets in the cross-chain. But we can see from the front-end display of its NFT application, gh0stlygh0st, after the cross-chain, that the cross-chain data is completely preserved. The background color of a Gh0stlygh0st released based on BNB Chain will be yellow, and its current chain will be represented by the border color. In the picture at the beginning of the article, we can see that the native chain of #4322 is BNB Chain, and it has been transferred to ETH.

However, this front-end display does not actually mean that LayerZero saves the original data of the asset from the bottom layer. As we all know, Gh0stlygh0st's NFT cross-chain is implemented according to the path of mint-burn. However, its mint is not executed in the contract on the original chain. It is difficult for us to judge whether the information of the original chain displayed after the cross-chain really comes from the original chain. LayerZero also did not make clear instructions on data traceability.

5. Technical Properties

Rangers Connector is an underlying cross-chain solution, and LayerZero is more of an application.

Rangers Connector has its own block browser Rangers Scan, native token $RPG and consensus mechanism tss-lib. In the white paper of the Rangers Protocol, it is revealed that the Rangers Connector will be chained in the future. After chaining, the VRF consensus will be added. The consensus mechanism will be upgraded to VRF+TSS, and there will also be a block generation process and a corresponding node governance mechanism. Rangers Connector is a very low-level cross-chain technical solution.

LayerZero does not possess the elements of the underlying infrastructure described above. Although it claims to be an underlying protocol, in terms of actual operation, it is only a data transmission protocol between chains, and it does not simply realize cross-chain direct transmission between chains, but through oracles and chains. The two middleware, the relayer, are used to realize the cross-chain transfer of assets between on-chain applications and applications. In fact, they are more inclined to the cross-chain solution at the application layer.

References

[1]. Josh L. (2022). LayerZero NFT Gh0stly Gh0sts. [online]. [Accessed 22 Apr. 2022]

[2]. Ryan, Z., Bryan, P., Caleb, B. (2021). LayerZero: Trustless Omnichain Interoperability. [online] Available at: https://layerzero.network/pdf/LayerZero_Whitepaper_Release.pdf [Accessed 22 Apr. 2022]