

Cross-chain is one of the problems that the public chain field is trying to solve. Practitioners generally believe that there will be many public chains/consortium chains in the future, and assets between different chains need to have a credible exchange place or mechanism (decentralized exchange). At the same time, cross-chains will also help expand the usage scenarios of digital currencies. For example, Bitcoin itself does not support smart contracts, but if another chain provider that supports smart contracts supports Bitcoin, it will expand the circulation scene of BTC.
Odaily has recently come into contact with a blockchain platform that focuses on cross-chain asset exchange and circulationWanchain. Founder Lv Xujun believes that all background information on the Internet can be transmitted to each other, but the problem is that there is no verification and no verification is required; due to the obvious asset attributes of the blockchain, its cross-chain is different from traditional Internet information transmission, and participants lie motivation enhancement. Therefore, compared with information cross-chain, Wanchain believes that asset cross-chain is a more urgent proposition to be solved.
This article first introduces the cross-chain process of Wanchain as a whole, and then introduces the technical details. Assuming that Xiao Ming wants to transfer 1 BTC to Wanchain for use, Xiao Ming needs to send 1 BTC to the locked account on the BTC chain first; after verification, Xiao Ming's account on Wanchain will generate equivalent anchor coins WBTC, Xiao Ming can use these anchor coins to use any application on Wanchain, such as buying Xiaohong’s 10 WETH (ETH’s anchor currency) on a decentralized exchange, WETH can also be transferred to Xiao Ming’s own Ethereum In the account, it becomes ETH. In addition to the original chain account, the user also needs to have a Wanchain wallet and pay wan token for gas and handling fees.
In this process, the original chain assets are moved into or out of Wanchain, which is a bit like recharging and withdrawing cash on this chain. The anchor coins of different public chains are a bit like ERC20 assets on Wanchain, which can be exchanged with Wanchain's native currency wan. Once there are enough public chains supported, it means that DApps deployed on Wanchain can support various currencies, and one currency can also be used for multiple applications. Different from state channels such as Lightning Network, which only need to be signed by both parties to the transaction, Wanchain itself is a public chain, and transactions need to be confirmed by the POW (to be changed to POS in the future) consensus.
There are two main difficulties that need to be solved in the above cross-chain process. According to Wanchain, this is also a problem that most cross-chain projects need to solve:
One is to ensure that the cross-chain information is correct, that is, how to verify the transaction status on the original chain. If it is considered that there is no final state on the blockchain using the POW mechanism (there is always a fork, but the probability gradually decreases with the increase of the confirmation block), the complexity of this problem will be even higher.
The second is to ensure that the total amount of Token in the original chain remains constant. Wanchain adopts the method of locking and unlocking to ensure a constant total amount. How to manage "locking" and "unlocking" is a key. Another key is to ensure the atomicity of transactions, that is, if a certain link of transaction processing stops, the entire transaction can be reversed; otherwise, partial success may lead to double spending.
Wanchain plans to verify the transactions on the original chain through the distributed consensus group Voucher (transaction proof node). Assuming that Alice sends ETH to the locked account on Ethereum, Voucher is both the original chain node and Wanchain node. After verifying the original chain transaction confirmation, it sends a "true" signal to the Validator (verification node) on Wanchain, then The public account maintained by the Validator will issue the equivalent WETH to Alice's Wanchain account. Once or any subsequent step fails, the locked account of the original chain will unlock the ETH and return it to Alice. The account private key is also held by multiple nodes, named Storeman (account management node).
In Wanchain, Storeman’s private key management mechanism uses secure multi-party computing + threshold secret key technology. Storeman must participate in calculations to generate public and private keys for locking accounts. Private keys only exist in theory and have never appeared in the network. It is scattered in the hands of each Storeman in the form of fragments. During the transaction, the participants must work together again to jointly construct the signature, and the fragments are not disclosed to each other. In order to ensure availability, only a certain percentage of Storemans are required to participate in the calculation to construct the signature.
Since the above-mentioned verification, the authority to initiate the original chain transaction and the initiation of the Wanchain transaction are on different nodes (different in logic), they all need to be completed through a group of nodes, and the incentive reward and punishment mechanism is added to prevent the nodes from doing evil. However, Lu Xujun said that the Voucher consensus model is still in the verification stage: if the submission and verification of Voucher information on the project is on the chain, it will consume higher resources on the chain and limit the throughput; economically, a more reasonable incentive mechanism is needed to allow Voucher members Be active and be passive.
Xiaohong also learned the password from the contract on wan, and took 10 ETH from the ETH contract with the password.
Suppose Xiaoming wants to transfer 10 ETH to Xiaohong, and Xiaohong wants to transfer 10 wan to Xiaoming;
Xiaoming locks 10 ETH plus a password hash value in a smart contract of Ethereum, and puts in a condition: if Xiaohong provides the password within 10 hours, Xiaohong can get 10 ETH after contract verification, otherwise rollback;
Xiaohong locked 100 wan in a smart contract of Wanchain and put the hash value of the password in it, and put the condition that if Xiaoming provided the password within 5 hours, he could get 100 wan;
Xiaoming saw that Xiaohong also locked the money in wan, so he went to wan with the password and took away 1 million;
Xiaohong also learned the password from the contract on wan, and took 10 ETH from the ETH contract with the password.
We can replace Xiaohong with Wanchain's Storeman, and the user (Xiaoming) only needs to operate in the link of initiating a transaction, releasing the password, and canceling the transaction. For Storeman participating in the cross-chain, Wanchain will provide a dedicated client, and the client will perform unattended automatic operation according to the agreement.
Lv Xujun said that Wanchain can be designed to connect with both the public chain and the alliance chain. Wanchain has reached cooperation with Korean and Canadian cross-chain projects ICON and AION, and hopes to develop a unified standard cross-chain with the industry in the future. Currently, the Wanchain mainnet has launched version 2.0, which can interact with ETH and BTC respectively. The exchange of the latter two is still pending the completion of the matching engine. Wanchain has already reached a cooperation with the decentralized exchange KyberNetwork, and will support the migration of Ethereum applications to Wanchain in the future.
Dialogue with Bitcoin side chain RSK: Can BTC after expansion and adding smart contracts become a financial infrastructure?
I am Lu Xiaoming, editor of Odaily. I am exploring the real blockchain. Please add WeChat lohiuming for breaking news and communication. Please note your name, unit, position and reason.
Reference article: