Content
With the popularity of blockchain technology, a large number of blockchain companies have emerged, as well as a large number of different chains. What followed was the birth of a new technology-cross-chain technology.
Cross-chain, as the name suggests, is through a technology that allows value to circulate directly across chains and barriers between chains. So how to understand cross-chain?
Blockchain is a type of distributed ledger. A blockchain is an independent ledger, and two different chains are two different independent ledger, and the two ledger are not related. In essence, there is no way to transfer value between ledgers, but for a specific user, the value stored by the user on one blockchain can become the value on another chain. This is the circulation of value.
It is more obscure to say this, and it is convenient for us to understand by currency exchange. The RMB is an independent currency, and the US dollar is another independent currency. The renminbi cannot be directly converted into the U.S. dollar, nor can the U.S. dollar be directly converted into the renminbi. Therefore, the U.S. dollar cannot directly enter the RMB account, and the RMB cannot directly enter the US dollar account. Someone needs to be willing to buy RMB/USD and sell USD/RMB to complete the currency exchange and realize the cross-book flow of value.
Alice has 100 US dollars. She came to China and needs to use RMB for transactions. So she must find someone who is willing to exchange foreign currency with her. For example, Bob, Alice sells $100 to Bob. Bob receives $100 from Alice and gives Alice 657 RMB at the exchange rate at the time.
From the account book, the entire foreign currency exchange process looks like this.
First, Alice has 100 dollars on the dollar ledger, and Bob has 0 dollars on the dollar ledger;
Alice has 0 yuan on the RMB account book, and Bob has 657 yuan on the RMB account book.
Then Alice transfers $100 to Bob on the dollar ledger,
Bob transfers RMB 657 to Alice on the RMB account.
As a result, the value of $100 in Alice's original account on the U.S. dollar ledger was transferred to Alice's account on the renminbi ledger, which was reflected in RMB 657.
In this process, the value of 6,57 yuan in the renminbi ledger by Bob is transferred to Bob’s account on the dollar ledger, which is reflected in 100 US dollars.
During the entire exchange process, a transfer transaction occurred simultaneously on the two ledgers.
During the entire conversion process, the total number of renminbi on the renminbi ledger remained unchanged at 657 yuan; the total number of US dollars on the dollar ledger remained unchanged at 100 US dollars. What has changed is the holder of the currency on the two ledgers.
Cross-chain is essentially the same as currency exchange. The cross-chain does not change the total value of each blockchain, but only a conversion between different holders.
In summary, one of the core elements of cross-chain technology is to help user Alice on one chain find user Bob on the other chain who is willing to exchange. From a business perspective, cross-chain technology is an exchange that allows users to conduct cross-chain transactions on the exchange.
Exchanges for digital currency have appeared very early. The earliest exchanges carried out the exchange between legal tender (national currency) and Bitcoin. Later, as the types of digital currencies increased, many exchanges also began to exchange different types of digital currencies. The exchange between different types of digital currencies carried out by the exchange is the realization of cross-chain value transfer. Strictly speaking, a currency exchange is an implementation of cross-chain technology.
Because different currencies are on different blockchains. And the blockchain itself is created to solve the trust problem, so how can users between different blockchains ensure that their rights are not harmed?
Alice asks Bob to exchange bitcoins for ether. What if Alice transfers the bitcoins to Bob and Bob does not transfer the ethers to Alice?
At this time, another role of the exchange has emerged: using its own credit to provide trust in exchange transactions. The specific operation method is usually that Alice transfers bitcoin to the exchange, Bob transfers the ether to the exchange, and then the exchange transfers the ether to Alice, and the bitcoin to Bob. A digital currency is held on behalf of the exchange to realize the transfer of trust, so that the transaction between Alice and Bob can proceed. The entire trust transfer is that Alice trusts the exchange, and Bob trusts the exchange, so trust is established between Alice and Bob.
However, a new problem was born here. The exchange is also run by a certain person or institution. Is his credit enough?
Will the exchange take Alice and Bob's Bitcoin and Ether directly away?
The answer is: it is really possible!
The credit of a single individual or institution is not enough to support large transactions. Therefore, there has been a non-central exchange technology-the use of blockchain technology to solve the credit problem of cross-chain.
When the exchange is operated by multiple entities, or simply a public chain, anyone can participate in the operation of the exchange, then the risk of running away is greatly reduced.
As a result, a problem with the centerless cross-chain technology is raised: how to allow multiple entities to jointly control an account?
There are different solutions for different blockchains. Most blockchains support multi-signature wallets, which can be used to achieve this task. In addition, it is also possible to use cryptographic methods and group calculations to split the private key, so that multiple subjects can control an account by voting. This problem is already a very technically complex problem. Interested students can go to the source code of the relevant cross-chain technology.