Welcome back to the Blockchain Ardor — Medium Series! In this installment, we’ll be reviewing two demonstrations of the new “Transaction Voucher” feature available on the Ardor testnet. Transaction Vouchers make it simple for users to send dual signature, fixed invoices and share distributions between two addresses on the blockchain — this sounds insignificant, but it is a major step forward for mainstream adoption of blockchain technology. The information here represents a modified version of the information in the “Blockchain Ardor” youtube video here.
Why Does this Matter? Context for Transaction Vouchers
Rule number one on the blockchain: the blockchain is immutable. This means transactions are irreversible. If you make a mistake entering a recipient address, or if you enter too many zeros at the end of the amount you are sending, you can send your funds into oblivion or bankrupt yourself with no recourse. Of course, this issue exists with legacy banking systems as well and it leads to incalculable losses each year, as well as dozens of failed claims in small courts. This is clearly not a sustainable design for businesses to operate with hundreds of thousands of users. The Ardor platform offers a foolproof solution for this age-old problem.
With the invention of “Transaction Vouchers” on the Ardor platform, you can now create secure, fixed invoices between two accounts — essentially eliminating the risks mentioned a moment ago. This feature is available for many types of transactions across Ardor and its child chains — including those involving assets, monetary supplies, and the marketplace.
Let’s take a look at how Transaction Vouchers work by walking through a basic example, then we can take some time to discuss and demonstrate additional use cases. To participate in this demonstration, you must download the Ardor experimental release from the Jelurida website. An article explaining the download process for the testnet is available here.
How to Create a Transaction Voucher
In this first demonstration, we will be creating a Transaction Voucher on the Ardor parent chain, but the process is essentially the same when using child chains. Note that you must be running a Full Client version of the experimental release for this process to work properly.
Let’s consider a basic situation for this first Voucher: pretend you need to invoice Big Corp. for $200 of services that you provided in July 2018. You already know how much they owe you, and you know their wallet address because it is listed in your employment agreement. All you need to do is the following:
Open the testnet wallet.
For this practice exercise to work, we will be using the two addresses below:
Pretend ARDOR-XC6S-U47K-W2LN-2XSK2 is your personal address
Pretend ARDOR-63EF-NL2A-WWNC-6JL6N is the address for Big Corp.
You should copy the address for Big Corp. and log in as them.
You are now unofficially logged in as Big Corp. If you are running the Full Client instead of a Light Client, you will need to wait for the blockchain to synchronize. While you wait, you should confirm the wallet address in the upper left corner matches the wallet address for Big Corp. in your contract.
Now that you have verified this is the correct address and the blockchain is up-to-date, let’s continue with the example. (Note: If you are having trouble getting the blockchain to synchronize, consider re-installing the testnet and selecting the options for both “light client” and “testnet” during the installation process. You will be able to create a transaction voucher using the light client, but you must be using the full client when you attempt to redeem the voucher.)
Big Corp. owes you $200 worth of Ardor. As of your invoice date of 18 August 2018, that means approximately 1702 Ardor. Click “Send ARDR” in the menu at the top of the screen.
A pop up box appears.
Enter your personal address as the recipient, enter 1702 ARDR as the amount, click the box next to Voucher, and then enter the passphrase for your personal address.
Check the details are correct, and then click “Submit.” If you are submitting this for a child chain, you will have to click “Calculate” the minimum fee, then “Submit.” This generates the Transaction Voucher as a json file and a QR code.
There should be a download button we can click near the top, or you can also just copy the json data or QR code, and send it to Big Corp. through email or some other means.
Basic Implications of Transaction Vouchers
Once you have completed this process, you are done. When Big Corp. receives the Transaction Voucher, they will be able to see that you entered your own recipient address, the amount to be paid, and it was signed by you — so they know you have reviewed this transaction and approved it.
One of the major selling points here: your secret passphrase can only sign transactions for your wallet address, so if you entered the wrong receiving address by mistake when you created the Voucher invoice, then you would not have been able to sign this transaction or generate the Voucher. Similarly, if you made a mistake and requested funds from the wrong account, Big Corp. would not be able to sign the transaction when they attempt to redeem the Voucher. In both situations, you would discard the Voucher, and simply request a new one.
The details of this Transaction Voucher are tamperproof, but it’s important to understand nothing in this process occurs on the blockchain until the actual transaction fee is paid by Big Corp. when they upload the Voucher and redeem/submit it. This design essentially eliminates the potential for lost funds and provides a new level of security for financial transactions. Let’s see what Big Corp. needs to do to redeem/pay this “Transaction Voucher,” or invoice.
Redeeming a Transaction Voucher
Big Corp. opens the Ardor testnet wallet and logs in using their own wallet address.
They navigate to the gear symbol in the upper right corner to open the settings menu and click on the “Load Voucher” option.
A pop up appears.
Big Corp. will click “Choose File” and select the json file that was sent to them, or they can copy the json data, as noted below. Alternative option: the QR code provided during the Voucher generation process can be redeemed through certain 3rd party wallets and can be integrated into applications for a smoother redemption process.
Big Corp. pastes this json data into the Voucher Reader.
Big Corp. hits “tab” on their keyboard. The details of the Transaction Voucher will load in the pop up box.
Big Corp. checks the details (noted in the red box above), they ensure the “Creator Account” matches the account they have on file for you, enter their passphrase, click “Calculate” for the lowest fee, and then hit “Submit.” You land on the Dashboard and can view the pending transaction.
In approximately 1 minute, you will see your balance update as the transaction gets included in the next block of the blockchain.
Use Cases for Transaction Vouchers
That’s the basics of how to create and redeem your first “Transaction Voucher.” Now, users can ensure they are sending funds between their correct wallet addresses. Friends can securely invoice each other, just like they do on Venmo and ApplePay. And Businesses can be certain they are sending funds to the correct individuals when invoiced. Let’s take this one step further and consider two, slightly more complex use cases for Transaction Vouchers.
Exchange “Deposit” and “Withdrawal” Vouchers
If you have ever withdrawn funds from a cryptocurrency exchange, you know the process is risky. Many times, you need to include randomly generated “messages” from the exchange alongside your receiving address. This has resulted in the loss of thousands of dollars worth of cryptocurrency because people are people. Human error exists, and sometimes we copy and paste the wrong receiving addresses or messages.
Now, if cryptocurrency exchanges wanted to eliminate “help desk” tickets associated with people who send their money to the wrong exchange address, or people who fail to include messages in their withdrawals — exchanges like Bittrex and Binance could directly integrate Transaction Vouchers to create secure “deposit” and “withdrawal” vouchers.
Consider the situation for one moment — you tell Bittrex you want to move 4000 Ardor to a certain address. The Bittrex system would create a secure Voucher, signed by Bittrex, for this transaction. Then, you would upload this Voucher in your wallet, sign the transaction, and receive your funds.
Remember one of the major selling points here: your secret passphrase can only sign transactions for your wallet address, so if you entered the wrong receiving address by mistake when you requested the Voucher, then you would not be able to sign this transaction. You would discard this Voucher, and simply request a new one from the exchange. This dual-entry system essentially eliminates the potential for sending funds to the wrong address.
Share Distributions on the Blockchain Using Vouchers
Let’s consider another use case and do a demonstration: what if you run an ICO or you want to distribute shares on the blockchain and you want to issue your tokens in a secure way? Perhaps you don’t want to just disburse 100 million tokens, and instead, you want each investor to sign off on receiving the correct amount of funds at the correct address. Well — we can do this too with Transaction Vouchers. Let’s take a moment to look at how we could create a Transaction Voucher for an Asset on the Ignis child chain. If you do not know how to create an Asset in the first place, an introductory guide is available here.
Demonstrating Share Distributions Using Transaction Vouchers
Log in to the Ignis child chain (in red) in the testnet wallet and navigate to “Assets” (yellow) and then click “My Assets” (green).
You’ll notice I have two assets here that I have created in the past. I will click the “transfer” button next to the “CDTest1” asset. Note: the options for deleting and adding shares can be limited using the Account and Asset control functions. Those topics will be covered in future articles.
A pop up box appears.
For the recipient address, enter the address of an individual who participated in this imaginary ICO. Then, enter the quantity of the assets they should receive. Third, check the voucher box, and fourth, enter your passphrase.
Once we’re happy with the information, click calculate minimum fee and then, “Submit.” Download the Transaction Voucher, just like in the previous example. Now, we can send this file to the ICO participant and they can follow the same Voucher Redemption process demonstrated earlier to claim their assets.
Versatility of Transaction Vouchers
If your company shares or ICO tokens used a Monetary Supply instead of Assets, Transaction Vouchers will still work. And if you decide to use the marketplace, you can create Transaction Vouchers in those contexts as well.
As you can see, the Transaction Voucher process can be completed in just a few minutes. Individuals and businesses can now sign off on blockchain based transactions with confidence, knowing that the json file and QR code vouchers are secure and customized to each individual transaction. This represents a major leap forward in creating a secure ecosystem where individuals and businesses can send funds without worrying about small, irreversible mistakes. Feel free to check out additional resources on Transaction Vouchers here.
Continue your journey through the Ardor ecosystem by learning how Turing-complete Lightweight Contracts create a more simple and secure environment for blockchain based smart contracts. Written guidance is available here and here, or simply watch the 25-minute seminar by lead developer, Lior Yaffe, here.
Blockchain Ardor Part 9: Tutorial on Transaction Vouchers using the Testnet was originally published in Ardor on Medium, where people are continuing the conversation by highlighting and responding to this story.