Detailed explanation of three mainstream cross-chain technical solutions

With the vigorous development of blockchain technology, a large number of blockchain projects have emerged, and blockchain networks with different characteristics and different application scenarios have been formed. The increasingly rich combination of technology stacks supports the vigorous ecology of the blockchain, but it also causes heterogeneity between different projects, making it difficult for the transaction data and economic value it carries to flow freely within the ecosystem . The chain has gradually become the rigid demand of the industry .

The so-called cross-chain refers to the realization of secure information exchange and value transfer between different (homogeneous or heterogeneous) blockchains through specific technical solutions, giving them interoperability.

A successful cross-chain split is divided into the following three steps:

  • The user’s source chain address sends a transfer to a receiving address on the chain
  • The validity of the transfer is verified and triggers the transaction on the target chain
  • An address on the target chain sends a transfer to the recipient address specified by the user

In order to complete the above-mentioned cross-chain process, this article will introduce three technical solutions, analyze their characteristics, and discuss potential risks. They are Notary Mode, Hash Timelock, and Relay Mode, respectively .

notary public

In the early days of the industry, the difficulty of blockchain technology was mainly to improve the performance of a single chain, but with the application of PoS and Byzantine fault-tolerant algorithms, the peak TPS of many blockchains has been able to well support the needs of users, and the infrastructure is increasingly whole. As a result, more users began to notice the paradigm shift of the financial market brought about by the blockchain and participated in the construction of the blockchain ecosystem.

As a result, a trusted third party is born to coordinate cross-chain operations. Such trusted third-party notaries are responsible for the verification and forwarding of cross-chain messages in the cross-chain process. According to the different signature methods, it can be divided into single signature and multi-signature. A single-signature notary, also known as a centralized notary, collects the transaction data of the source chain during the transfer process, verifies the validity of the transaction, and initiates the transaction of the target chain through a digital signature by specifying a single node/organization as the notary. implement. The single-signature mode is simple and has high processing speed. However, its shortcomings are also obvious, that is, the failure or mischief of a single node will lead to the collapse of the cross-chain transaction system, making the cross-chain service no longer available.

Detailed explanation of three mainstream cross-chain technical solutions

hash time lock

The emergence of blockchain 2.0 provides a reliable decentralized execution environment for smart contracts for the first time, and realizes the automatic management of assets under the condition of no trust. Simply put, a smart contract is an automated protocol that is controlled by code, provides a read and write interface to realize information exchange, and triggers specific operations based on the interaction information. The most remarkable innovation of blockchain 2.0 is that it realizes an execution environment that does not require any trust conditions, so that the deployment, interaction and execution of any smart contracts no longer rely on authoritative third parties.

Therefore, another cross-chain technology is realized through the hash time lock deployed by the smart contract. The specific process is as follows:

The initiator of the cross-chain transaction selects a secret random S, then calculates the hash value h=Hash(S) of the random number, and gives h to the responder of the cross-chain transaction

The initiator and the responder lock the assets to be traded in the smart contract on their respective blockchains. The lock information is h, the unlock key is a random number S, and the lock periods are T1 and T2 respectively, where T1 must be later than T2,, the unlocker is set to the other party’s account respectively

Within the range of time T2, the initiator obtains the assets locked in the contract by the responder by publishing S , and the contract will automatically return the assets to the responder if the asset is not taken within the timeout period.

After the initiator announces S, the responder still has a time window of not less than T1-T2 to unlock the assets belonging to him. If the assets are not taken over time, the assets will be automatically returned to the initiator.

Detailed explanation of three mainstream cross-chain technical solutions

The emergence of hash time locks has solved the trust problem in cross-chain transactions. As long as the initiator protects the private random number and the time window T1-T2 is sufficient for the responder to unlock the assets, the two parties can achieve a successful cross-chain transaction without any trust, which can be said to realize a true decentralized cross-chain. transaction .

The premise of applying hash time locks is that the two blockchains involved in achieving interoperability must support the same hash function and that the hash function is sufficiently secure. The former is an engineering choice problem, and emerging projects tend to choose mainstream hash functions; the latter is a cryptographic problem, and hash functions currently used in the blockchain industry, such as SHA256 and Keccak-256, have not yet been discovered. Security risks.

Given the continuous research in number theory and quantum computing, it may be possible in the not too distant future for hackers to use newly invented mathematical tools or computing techniques to complete attacks on current hash functions. At that point, it’s time for cryptographers to devise more secure hash functions. It is in the midst of such contradictory attacks and defenses that the cryptography building is gradually built to be more secure and reliable.

repeater mode

Relay is an abstraction of cross-chain operations. The information verification problem in the cross-chain process is abstracted into the consensus problem of the relay layer. On this abstraction layer, an independent blockchain can be developed, which has better performance. Extensibility. As a ledger of cross-chain transactions, a third blockchain, the relay chain, appears in cross-chain operations.

In this mode, there are a series of relay nodes deployed in each blockchain network, responsible for monitoring and synchronizing the transaction data of the blockchain to the relay chain. The consensus node of the relay chain verifies the validity of the cross-chain transaction and triggers the execution of the corresponding transaction. By deploying smart contracts on each chain as an interface for cross-chain operations, the relay mode can also use cross-chain as an infrastructure to serve more projects with cross-chain needs.

Detailed explanation of three mainstream cross-chain technical solutions

A typical relay cross-chain operation, as shown in the figure above:

  1. The user initiates a cross-chain transaction request on the source chain
  2. The relay node monitors and transfers the transaction information to the relay chain
  3. The relay chain consensus node verifies the validity of the transaction
  4. After the verification is passed, the consensus node constructs the corresponding transaction
  5. The majority of consensus nodes sign the transaction to form a signature set
  6. Relay nodes monitor transactions and signatures generated by consensus nodes
  7. The relay node transfers the transaction to the target chain and waits for execution

The consensus algorithm of the relay chain determines the performance and security of cross-chain services . Classic Byzantine fault-tolerant algorithms, such as PBFT, can achieve high processing speed under the condition that most nodes work normally. Improved versions of Byzantine fault-tolerant algorithms, such as HotStuff, further reduce communication complexity and support larger-scale node participation in consensus.

As a technical solution with high engineering complexity, the relay chain is difficult to implement, but its advantages are also obvious. The relay chain is paired with smart contracts to form a cross-chain service network. One relay chain can communicate information between multiple blockchains and realize a wider range of value transfer.

As a rigid demand, cross-chain solutions must be continuously improved along with the development of the blockchain industry, and the liquidity endowed by cross-chain technology to assets will inevitably inject growth momentum into more excellent projects and mutually benefit each other. Continued focus on the evolution of cross-chain technology can help us better understand changes across the industry

Posted by:CoinYuppie,Reprinted with attribution to:
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.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-06-21 23:55
Next 2022-06-22 09:43

Related articles