There are three main implementation modes for cross-chain technology:
1. Notary public mechanism
The notary public mechanism is the easiest way to use chain and chain interactions. A certain group or group of trusted groups declares that something has happened on the A chain to the B chain. There has been a lot of attention in the field of licensing and sub-accounting. The flexible consensus does not require proof of work or proof of interest mechanism.
2. Side chain / relay
The side chain can be compared to the WeChat wallet, the transaction originally carried out on the bank (main chain), and the transaction is carried out by recharging (anchoring) to the WeChat wallet (side chain). The difference is that this kind of trust problem, WeChat wallet is solved by Tencent Company, and the side chain is solved by the multi-centered method of blockchain. A relay chain can be understood as a special side chain at the level of the protocol layer, which is required by the blockchain itself.
3. Hash lock
The key technology of Lightning Network is HTLC hash lock technology, which provides a scalable micro-payment channel network. Hash lock is to ensure that the transfer between any two people can be achieved through a "payment" channel by forming a smart contract to complete the role of "intermediary". Both parties to the transaction use a smart contract to freeze some of the money first and provide a Hash value. Who can match the hash value within the contract setup time, then who owns this partially frozen asset.