Any organization or individual should have the ability to be prepared for danger in times of peace. We have to learn to think constantly: who will beat us? Or, who will replace us in the next stage? Undoubtedly,these thoughts are very significant. It helps enterprises to formulate correct and appropriate development strategies, so as to avoid being eliminated in the fierce competition; at the same time, It also empowers individuals to identify new opportunities and prepare for them in advance.
The following are some thoughts of the ChainX Technical Committee on the cross-chain prospects of the crypto world.
We know that the essence of cross-chain is to accurately and safely notify the state changes on one chain to another chain. In other words, cross-chain is messaging between chains. Then, according to the different message delivery methods, cross-chain can be divided into the following types:
(1) Single signature: that is, the message is signed by one party, such as WBTC.
(2) Multi-signature, that is, the message is co-signed by multiple parties, each party independently collects the message on the chain, and then co-signs the same message. Generally, the participants who sign are incentivized, and the behavior of malicious signing is also punished. There are many projects of this kind of scheme, such as Multichain, Celer Inter-chain Message, BridgeNetwork, etc.
(3) Based on the Merkel Tree algorithm, the function of the MT algorithm is to prove that a certain transaction is included in a certain block. The verification of the algorithm needs to know the RootHash of the block, the transaction Tx to be verified, and the hash path Path. (About the Merkle tree, we talked about it in the previous article:https://chainx-org.medium.com/chainx-after-taproot-upgrade-of-bitcoin-1-c19cb8162d34)
The NPoS mechanism adopted by Polkadot is a type of Staking economy. Users run a node in the network by Staking a certain token, acting as a verifier, and obtain certain rewards after successfully verifying blocks. But if the node validates the wrong block on purpose or because of technical problems, some or all of the benefits may be lost. It can be seen that the PoS consensus mechanism actually has no substantial difference from multi-signature, and can be considered as a larger-scale multi-signature. Polkadot is actually a variant of the multi-signature cross-chain model.
In addition, the coupling relationship between the relay chain and parachains of Polkadot is too tight, the consensus and transactions between the parachains are completely dependent on the relay chain, and the security of the parachains is also guaranteed by the relay chain. This “controlled” model is obviously not a cross-chain solution that will be widely adopted in the future.
The IBC cross-chain protocol of Cosmos essentially belongs to the category of multi-signature cross-chain. The current transport layer of IBC requires pairs of light nodes between each chain to verify cross-chain information. But such a light node needs to read all events on chain A. Especially for most EVM-based blockchains, such a light node is still “too heavy”, and the cost of running such a complete light node client is sometimes prohibitive. This limits the extension of IBC to blockchains with high throughput and cheap transactions.
At present, the cross-chain of ChainX is facing the same problem, and a complete light node will bring higher costs and maintenance costs. This is why we are trying to integrate The LayerZero protocol on the ChainX chain.
LayerZero is a cross-chain solution based on the MT algorithm. Specifically, one party (Oracle) provides the block header, and another independent party (Relayer) provides the transaction proof. When the block header and the transaction proof can be verified, the cross-chain operation can be performed. That is, in the process of LayerZero, information verification only needs to obtain specific transaction events and block headers on demand, and does not need to read all events on chain A, so LayerZero’s terminal can be extremely lightweight.
In addition, IBC can only provide direct communication for chains that adopt fast-finality (that is, all transactions are quickly packaged and changes cannot be undone), For chains such as ETH/BTC that adopt probabilistic final consensus(Probabilistic-finality, that is, with the increase of blocks, the probability that the block verification result cannot be tampered with also increases, and the public chain of proof of work belongs to this category),It requires an additional peg zone interface chain to complete, which will be more complicated. In contrast, LayerZero can provide direct communication for all types of public chains.
Components of the LayerZero protocol include:
• UserApplication (UA), a contract that uses LayerZero for cross-chain communication.
• LayerZero EndPoint, LayerZero’s on-chain contract. Receive the UA’s request in the ChainA and output the log; receive the MT message provided by Oracle and Relayer in the ChainB, and pass the cross-chain message to the UA after verification.
• Oracle, which sends the block header containing the cross-chain transaction to the ChainB.
• Relayer, which sends the proof of the cross-chain transaction to the ChainB.
Among them, both UserApplication and LayerZero EndPoint will be deployed on different chains. Take a cross-chain token contract XYZ as an example:
When Alice wants to cross 100 tokens from ChainA to ChainB, on the ChainA side, Alice calls the send interface of the XYZ contract. The XYZ contract first destroys Alice’s 100 tokens, and then calls the EndPoint contract of LayerZero to generate a log.
On the ChainB side, the EndPoint of LayerZero calls the receive interface of XYZ after verifying the MT messages of Oracle and Relayer. After XYZ parses the payload, Alice mints 100 tokens.
“The real cross-chain interaction should be Msg-Call, a way for on chain contracts to call each other.But this is basically impossible in the Polkadot architecture. LayerZero has thought deeply about this, and that’s probably why they have a billion dollar valuation” ChainX CEO GG said.