Wanchain - User Security Protocols With Wanchain - PART 2

in #wanchain6 years ago (edited)

Wanchain - User Security Protocols With Wanchain - SECURING CROSS-CHAIN TRANSACTIONS

wainchain bold header.png
Image source

In the last article we discussed how Wanchain secured and verified transactions within the same blockchain. In this article we will delve into Wanchain Cross-Chain Transactions.

First a quick reminder,
Wanchain is a cross-blockchain distributed marketplace offering future-level financial services. Wanchain aims to build a distributed bank that will utilize modern infrastructure of digital assets and financial framework to connect and exchange values over different blockchains ledgers.

Wanchain's goal is to reach every part of the world and provide banking services to even the unbanked and "low value" areas.

ulqu3-steemitdivider.jpg

HOW WANCHAIN SECURES CROSS-CHAIN TRANSACTIONS

When it comes to cross chain transactions, many things go into play. Wanchain is already connected to the major digital currency networks (Bitcoin and Ethereum). This makes integration of newer digital currencies easier as most of them don't use protocols too different from these major networks (E.g. Proof of Work, Proof of Stake, ledger and smart contracts). A very large number of digital currencies in circulation now are ERC20 Tokens all based off the Ethereum blockchain.

Wanchain can thus easily handle asset transfers from the original blockchains to Wanchain and from Wanchain back to the original blockchains. This allows exchange of Value on the platform. That is, Trader A can transfer in Bitcoin and trade it for Token XYZ, then transfer out Token XYZ to his external wallet on XYZ's blockchain.

wanchain model.png
Wanchain's Cross-chain Architecture

For blockchains and assets to be integrated with Wanchain, they first need to be registered so that they can be uniquely identified. Wanchain has Blockchain Registration protocols and Asset Registration protocols.

While Wanchain doesn't change the implementation or "inner-workings" of the different assets, it does have its own protocols that these assets must follow to be fully integrated and compatible with the Wanchainecosystem. Wanchain uses Multi-Party Computing and Threshold Secret-Sharing Joint Anchoring Schemes to minimize the cost of this cross-chain integration.

As we learnt earlier, When an unregistered asset is transferred from the original chain to Wanchain, Wanchain will create a new asset Identifier code using a built-in asset template to deploy a new smart contract based on the cross-chain transaction information. Mapping tokens are then assigned to those assets for trading purposes. If the asset is already registered, Wanchain will simply use the already existing smart contract to execute the transaction.

ulqu3-steemitdivider.jpg

TYPICAL TRANSFER IN PROCESS

Alice and Bob are friends. Bob travels overseas and needs some help from Alice. When bank transfers fail, Alice decides to send some ETH for Paul to sell locally and convert to cash. Paul however can only find someone who wants BTC. If Alice converts her ETH to BTC she loses a hefty 10% to conversion fees and transfer fees. They both decide to use Wanchain.
Alice Makes a cross-chain transfer request on the Wanchain platform from her Wanchain Wallet and she sends in the Ethereum. The recipient address(Her deposit address) is a generated Ethereum cross-chain Locked Account.

wanchain Cross-Chain Transaction From Ethereum to Wanchain.png
Wanchain Cross-chain Transaction From Ethereum to Wanchain

When Wanchain's Validator node receives the transaction request, it connects to the Ethereum blockchain explorer and verifies the transaction. It then creates a new smart contract token (Mapping Token for Alice Ethereum Value on Wanchain) which will correspond to the ETH Alice has sent.

Alice can then use the in house transfer mechanism to send the ETH to Bob's Wanchain Ethereum Account.
Bob then meets the BTC trader Cris. Bob has ETH but wants cash. Cris has cash but wants BTC.
Now remember those Mapping Tokens we talked about? they represent the value of your holdings on the Wanchain platform. Which means your asset can change from one form to another (E.g. you can trade token ABC for Token XYZ) but the "value" of your holdings will remain the same.

Using Wanchain, Bob can easily send his ETH to Cris' Wanchain wallet but Cris' can initiate a Transfer Out in BTC. Wanchain's smart contract will simply take the ETH in Chris' account and pay the equivalent value to Cris' external Bitcoin address. So therefore, Bob is able to sell BTC without actually holding any.

Alternatively, Bob and Cris may agree to have Bob transfer the ETH to Cris Trading account on an external wallet. Bob will then initiate a Transfer Out Process.

ulqu3-steemitdivider.jpg

TYPICAL TRANSFER OUT PROCESS

When Bob initiates the Transfer Out process, what he is actually doing is recalling the same smart contract attached to those tokens when Alice brought them in.

Step1: Bob uses BobAccount on Wanchain to send the transaction WANTx , which calls the asset transfer-back function of the smart contract corresponding to the asset of the original chain.

Step2: The Validator calls the smart contract after receiving the transaction. The Voucher tests the results of the contract execution and gathers consensus. If TLF=true, which means that the token value for Bob in the contract has been locked, the Storeman then broadcasts the transaction of Locked Account, which transfers Value to BobAccount on the original chain, via the
cross-chain transaction data transmission module:

OriTx=(LockedAccount,BobAccount,value,sigstoreman)

The Voucher checks whether this transfer is confirmed via the transaction status query module, and gathers consensus on confirmation flag TL F.

Step3: If the Token Unlocked Flag (TUF) = true, the Validator will clear the assets locked in the smart contract; if TUF=false, it means that transaction on the original chain is not confirmed and the Storeman will re-initiate the transaction.
Whitepaper Page 11

Wanchain is able to transfer not only assets but information (data) as well. When an asset on one chain is transferred to another chain, the total amount of the assets in the two ledgers stays unchanged.

The information of every cross-chain transaction on Wanchain is automatically relayed to the respective blockchains of the assets involved by the smart contracts. This prevents inflation and double-spending.

Wanchain Cross chain Data Process from Wanchain To Ethereum.png
Cross chain Data Process from Wanchain To Ethereum

ulqu3-steemitdivider.jpg

MULTI-PARTY COMPUTATION


Wanchain employs the use of multi-party computation to speed up and reduce the load(and cost) of operations. Secure multi-party computation is about a group of participants, referred as P1...Pn, who work together to compute the function f(x1,...,xn )=(y1,...,yn) securely.

When the computations are complete, all participants must get the same output else it will be evident who cheated and they won't receive the incentive reward from the network.

ulqu3-steemitdivider.jpg

THRESHOLD KEY SHARING TECHNOLOGY

Wanchain allows the creation of accounts with multiple owners. This is a common type of account used by corporations or businesses that may require entries and operations from different individuals. To secure this kind of account a "Threshold Key Sharing Scheme" is employed. This is because each individual with access to the account may have their own motive, so to protect the general interest of all the participants, the Shamir's Secret Sharing threshold key sharing scheme is used.

In this scheme, a key is divided into n pieces and distributed to n participants. Note that "n" refers to the number of people with access to the account.

Every participant holds one piece of the key share, a minimum of "k" key shares are needed to reconstruct the key. Thus, any operation on an account will require at least "k" participants' participation to ensure the account is secure and trustworthy.
Variables n and k depend on the number of individuals with access to the account.

How Shamir's Secret Sharing Threshold Key Sharing Scheme Works

Step1: Select a secure random number.
There are n Validators on Wanchain, named as P1……Pn. Each Validator selects a secure random number di and k-degree polynomial fi (x)=di+ai,1 x+⋯+ai,k-1x . The scheme sends fi (j)to other Validators through secure channel and broadcasts di G to every node of the network, G being the base point of the elliptic curve.

Step2: Check the correctness of the messages.
After receiving other Validators’ messages, Pj will check the correctness of the messages:


flag=Check(f1 (j),……,fn (j))

If flag=true, then Pj accepts and saves it locally.
If flag=false, then Pj rejects it and requires other Validators to resend the messages.

Step3: Receive key share.
When all messages are sent and checked out, then every Validator gets their key share:

key_sharek=Σ(j=1) fj (k) ,k=1,……,n

Step4: Compute the address of the Locked Account.

Locked_Account_Address=GenerateAddress(d1 G,……,dn G)

After all the operations above, the Locked Account is generated, and its key is divided into n key shares and then distributed to n Validators of Wanchain.
Any operation on the Locked Account will require at least k of n Validators’ participation to complete.

Shamir’s Secret Sharing threshold key sharing scheme.

Keep in mind that all the processes outlined here are "under the hood" or background processes that the smart contracts will automatically run. In actuality, Alice and Bob will be able to easily carry out transactions with a few clicks on the user interface.

In the next Article we will discuss The Wanchain Custom Token Wancoin, and go through some real life applications of Wanchain.

ulqu3-steemitdivider.jpg

To learn more about this wonderful project, you can visit the Wanchain website.

You can also read the Wanchain whitepaper | Wanchain Yellow Paper | and Wanchain Commercial Paper for the technical explanations.

The team is always willing to answer questions and you can reach them on any of their social media accounts.

Telegram | Discord | Twitter | Reddit | Facebook | Medium | Weibo | Github

ulqu3-steemitdivider.jpg

RELATED ARTICLES

ulqu3-steemitdivider.jpg

DISCLAIMER: The information contained within this post shall not be taken as financial advice. I am not a financial advisor and none of your investing should be carried out based on any information presented here. You can lose all of your money by not investing wisely. The above information is for educational and entertainment purposes only. Kindly Endeavor to DO YOUR OWN RESEARCH.

Image Credits: All images were derived from the Wanchain website and Wanchain whitepaper.

Sort:  

Great project

In the example of Bob and Alice, you explained it very well. Do you know if this will be a lengthy process or will it be the click of a few buttons.

It will be with the click of a few buttons. All these steps explained here are the understanding processes that the smart contract will automatically run.

Congratulations @ulqu3! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of comments received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - Resteem and Resteemed added

Support SteemitBoard's project! Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 64513.75
ETH 3146.11
USDT 1.00
SBD 3.95