How to send and redeem a private transaction with Wanchain’s Desktop Light Wallet

itsleonyo
UptimeValidator.xyz
4 min readNov 29, 2019

Do you know that you can make a private transaction with Wanchain? Most people do not aware of that. What prompt me to write this short guide, is that when I was replying a Facebook post that we can use Zcoin or Wanchain to send and redeem a private transaction, peoples were actually surprised to find out Wanchain does has private transaction feature!

Wanchain has been always seen as an Ethereum-forked blockchain that focuses on the cross-chain capability of different blockchain only. In fact, Wanchain does has its own distributed POS (Proof of Stake) consensus mechanism that modified from Ouroboros and also private transaction feature. In this short guide, we are going to explore how to send and redeem a private transaction with Wanchain Light Wallet.

Wanchain Light Wallet version 1.1 which was released on 25 October 2019, has now included the private transaction function, which previously only available in its full node wallet. You can download this wallet from https://www.wanchain.org/getstarted/

Each account in Wanchain light wallet would have 2 addresses, one for the normal transaction, and another for the private transaction. As shown in the screen below, click on the double arrow on the right-hand side of each account’s normal address, you should see it expand another row in below showing private transaction address (which is much longer), and has the button of “Redeem” instead of “Send” button.

To send a private transaction, the first step is we need to get the private address of the recipient. From the screen capture above, when we want to send a private transaction to Account 2, we have to send to address which is start with 0x03e. If we want to input the private address while selecting the “Normal Transaction” as Transaction Mode, the Wanchain light wallet will prompt an error showing “Address is incorrect”.

Once we change the transaction mode to “Private Transaction”, then the error will be going away.

The amount we can send through the private transaction is pre-fix to only 10, 20, 50,100, 500,1000, 5000 or 50000. These values are available in the Amount dropdown box. The reason that arbitrary value is not allowed, because that will be easily detected by others when the recipient redeems it.

Because if a user were to lock 228 WAN into the privacy smart contract, and then soon after another user were to redeem 228 WAN from the contract, it would be fairly obvious that the two transactions were linked. Transaction values accordingly can reveal connections between senders and recipients. For this reason, the privacy contract was made to only allow certain values to be locked for a given privacy transaction.

Do note that, sending a private transaction is more costly than a normal transaction.

After the transaction has been made, the recipient can redeem the private transaction by clicking the “Redeem” button as below. Do take note that you need to have some WAN coin in your public address to be able to redeem the coins you received in your private address, as shown in the picture below, we have 0.2WAN.

After you click the “Redeem” button, you can redeem multiple private transactions sent to you by checking the checkbox. After you click send, you should see your balance in public address updated with the new amount.

Unlike a regular transaction, which involves a single transaction on the blockchain that transfers the account balance, a privacy transaction consists of two underlying transactions: a lock transaction made by the sender, which locks the WAN with the privacy smart contract, and a redeem transaction made by the recipient, which transfers the WAN from the smart contract to the recipient’s public address.

The privacy smart contract address is 0x0000000000000000000000000000000000000064

So we can view all the private transactions in Wanchain by checking this address in wanscan. https://www.wanscan.org/address/0x0000000000000000000000000000000000000064

Hopefully, by now you should feel comfortable sending a private transaction and redeem it by using the Wanchain desktop light wallet.

--

--

itsleonyo
UptimeValidator.xyz

Blockchain/Cryptocurrency and Poker enthusiast. Enjoy going to gym to stay fit and healthy.