Our Journey to VeChain Part 3: Why We Switched

ken woodruff
@realitems
Published in
6 min readJun 18, 2019

This is part 3 of our first article series. Read the previous article here: Our Journey to VeChain Part 2.

As we developed our product on Ethereum, we ran into several concerns and pain points. There were some key problems we were having difficulty solving on Ethereum. Luckily, after coming across VeChain, we later realized that this particular blockchain had the necessary solutions.

The following sections will take you through the problems we had, and we will go in-depth on how VeChain has helped us solve them in an effective manner thus far.

Overall, the problems we faced were the following:
(1) Unpredictable transaction fees
(2) Complicated user onboarding
(3) Clunky multiple transactions

Unpredictable Transaction Fees

The market price of Ethereum (ETH) is still quite volatile and can increase or decrease within a short time-period, which can affect the transaction costs. Imagine the price of ETH doubling over a period of a few weeks. Essentially, resulting in the cost of using it doubling as well. The idea of transaction costs doubling (or perhaps even tripling) over a short period of time made us think twice about the short- and long-term consequences. In worst case scenario, it could have enormous influence on the overall usage and scalability — making both us and investors nervous.

VeChain solves this by implementing their dual-token system: VET (currency) and VTHO (energy). VET is used as a store of value and smart payment currency on the blockchain. Moreover, as your account stores VET, your account generates VTHO.

VTHO is used to pay for the transfer of tokens and the execution of smart contracts on the VeChainThor blockchain (same as gas on Ethereum). The rate at which VTHO is generated from VET is controlled by the VeChain Foundation, resulting in transaction costs are not necessarily tied up to the ups and downs of the market as a whole.

Complicated User Onboarding

One of our primary goals with Real Items is to make our products easy-to-use for everyone, including non-technical users. Requiring users to sign up for an exchange, transfer funds, undergo KYC and purchase cryptocurrencies are all time-consuming and tedious tasks. Forcing users to do all this will turn users away before they even use our App.

In our quest to solve this issue, we experimented with the Portis Wallet in conjunction with Tabookey’s Gas Station Relay Network. The combination of Portis’s ease-of-use features and Tabookey’s relaying architecture provided us the ability to easily pay for our users’ transactions. This was a huge step towards real usability, something we had strived for in order to accomplish widespread adoption. However, Tabookey’s smart contracts are not, at the time of writing this article, available on the Ethereum mainnet.

We needed a solution that would work immediately, without any unnecessary delays.

So, what’s VeChain’s solution for this particular problem? It’s called Multi-Party Payment (MPP) and it deals with the aforementioned problem. By integrating the Prototype contract into our very own smart contract, we were able to add users when they registered for our dApp. Each user has their own credit plan, which consists of credit (amount) of VTHO that a user is initially provided to spend, and the per-block recovery rate (the amount of spent VTHO returned to the user’s credit after each block).

This is where a sponsor pays for the cost of each users’ transactions. Ultimately, our contract can have multiple registered sponsors and the Master user has the unique ability to choose which registered sponsor will act as the current sponsor for all subsequent transactions. To illustrate this more in-depth, here is a flowchart (Note: the word recipient means smart contract in this instance).

Looks complicated and hard to manage? We thought so, too.

This is why we ended up building a simple UI that allows individuals to manage the respective parts of the MPP in a simple and user-friendly way. See a sneak peak below of how it looks.

This form enables the master users to view the address, credit, energy and VET for every user registered to the smart contract. It also enables the master user to delete (de-register) a user from the smart contract.
With this, one can enable the master user to select the current sponsor from the list of registered sponsors.
This enables the master user to set the initial credit and the recovery rate for all registered users of the smart contract.
Master user of the smart contract to specify the address of the new master user.

Despite some limitations (such as the inability to specify credit on a per-user basis), we are extremely happy with MPP thus far, and have found it to work very well. MPP has recently been expanded by VIP191 (Thank you, Totient Labs), which allows a gas payer to co-sign any specific transaction to pay for its gas fee on behalf of the sender. We love this functionality, even though our product does not yet have a particular use case for this.

Clunky Multiple Transactions

Last, comes the major issue we struggled with on Ethereum regarding executing multiple contract actions within a single transaction. Specifically, the inability of solidity’s external functions to handle multi-dimensional arrays as input parameters forced us to execute multiple single transactions — which are inefficient and unscalable.

What we truly needed was the ability to create a single transaction that executed multiple actions. Essentially, to execute multiple actions in a predetermined sequence.

VeChain solved this particular issue with MTT (Multi-Task Transactions) which allows developers to bundle multiple clauses into a single transaction. The following code snippet shows how we were able to create multiple NFTs, while adding a unique approver as a user for each one —all within a single transaction:

Bundling clauses into a single Transaction.

After the transaction has been executed, the clauses are visible in the clauses tab of the VeChain Explorer tools; VeForge

The clauses are visible after being executed.

In the end, VeChain’s MTT solved a tricky problem caused by limitations of the solidity programming language, and we are happy and excited by this solution.

That’s all for this article in the series. In part 4, we will discuss the key technologies in the VeChain ecosystem and how they compare and contrast to Ethereum.

Real Items is a dApp focusing on consumer protection and trust for the 21st Century with employees on a global basis from countries like the US, Germany, Nigeria and Norway. The objective is to solve real needs of trust through authentication and digital ownership, where we tackle eminent problems and facilitate consumers.

The project is deployed on the VeChain Thor blockchain, enabling true scalability and security. This provides a fully secure and effective path towards authenticity and brand protection.

You can find more information about Real Items and the current development and progress on our website. You can read more and communicate with us on Twitter, Medium or email.

--

--