On course to achieve 1 million users this year, how did Humaniq reach the position of providing App at scale for the global unbanked, while preventing transaction fees?

As Humaniq’s community grows across 16 nations, it is worth reflecting how we go this far. How did our technical team successfully integrate a unique scaling solution, dubbed the ‘Hybrid Blockchain’ into the infrastructure of Humaniq App?

Why was a Hybrid Blockchain developed?

Humaniq’s goal is to bring financial services to the global unbanked population of 2bn people: a large number of potential new transactions. However by the summer of 2017, the Humaniq team had come to the realisation that the pure ERC-20 standard for transactions over the Ethereum Blockchain is extremely limiting for any kind of mainstream currency application. Ethereum achieves a transactions-per-second rate of 7–15, which is fairly high for today’s mainstream blockchains, but not nearly enough. Moreover, in the case of ERC-20 tokens, this throughput is shared with all the other tokens based on the platform.

This realisation prompted our team to look for scaling solutions that would be fairly quick and easy to implement, given that developing our own, bespoke blockchain system was far beyond our resources and budget. We therefore decided to adopt the Pareto, or 80/20 principle, which states that 80% of the effects can be achieved with 20% of the effort. This led us to a solution that would allow large numbers of transaction with close-to-zero fees that is not resource-intensive.

How does it work?

There are three layers of blockchains in the Hybrid system Humaniq App is built upon: the Ethereum mainnet, the Master internal blockchain, and country-specific blockchains.Each internal blockchain is a modified version of the Ethereum protocol, with zero transaction fees and emissions. Inside them, HMQ, the Humaniq App token, acts as the main currency, just like ETH in the mainnet.

Note that there is no emission happening on the internal blockchain, as these all begin with the maximum available supply of HMQ tokens already existing in a ‘Master Wallet’. When tokens leave the HMQ network, they are sent to a second ‘Clearance Wallet’ which in effect ‘burns’ or removes them.

Three critical scenarios exist that must be handled by the system: when a user creates an account; when HMQ is sent from the Humaniq ecosystem to the outside world; and, finally, when HMQ is sent from the outside world to the hybrid ecosystem.

Creating a user account

When a user registers a new account, a service is responsible for creating two identical wallets through the blockchain APIs, re-using the same private key. In this way, a user has exactly the same address on both the ETH Mainnet and the Private Chain. The information is then returned to the Tapatybe service (responsible for holding user identities) and tied to the account.

In response, the HMQRef service is called, which performs the required emission on both the ETH Mainnet wallet (by calling the contract and minting the tokens), and the Private chain: at this point, the tokens are transferred from the Humaniq Master/Clearance wallet to the user’s internal wallet.

Transaction from the inside to the outside

When a user initiates a transaction, there are two possible scenarios: either the wallet belongs to the Humaniq network, or it belongs to the ETH Mainnet.

As the transaction commences, a service is called that determines whether the destination address exists in the Humaniq database. If it does, it simply proxies the transaction to the Blockchain API for the internal chain. If the address is indeed external, then the transaction is added to a queue that is picked up by a second service.

This service then proxies the transaction to the ETH Mainnet, which is broadcasted from the Humaniq transit address. Once that is complete, it calls the Blockchain API to create a transaction that ‘burns’ the tokens on a user’s internal balance, sending them to the Clearance Wallet.

Transaction from the outside to the inside

Given the fact an external transaction can come at any time, a blockchain service must ‘listen’ to all of the Humaniq wallets for incoming transactions. Whenever a new transaction is detected, a second service initiates a transfer of funds from the user’s mainnet address to the Transit Wallet, grouping transactions to lower the cost as much as possible.

A third service is then called, which orders the internal Blockchain API to distribute the tokens from the Humaniq Master Wallet to the user’s internal balance.

How does the Hybrid system achieve scalability?

The private blockchains work in parallel, meaning that we can add as many of them as necessary to multiply Ethereum’s TPS. Of course, the presence of inter-blockchain operations implies some loss in efficiency, but these will be a small part of the overall transaction pool.

Isn’t this just a centralised service?

Our Hybrid system can be described as additional infrastructure built on top of a decentralised core, made of the mainnet ERC-20 token and smart contract emissions. The development of our backend infrastructure doesn’t stop here, and our R&D team is working on creating even better solutions.

Nevertheless, it is probably the only scaling solution for an app for currency transactions currently deployed in production. It allows our users to make instant transactions with zero fees, which is a massive advantage over our competitors. Having implemented the Hybrid Blockchain, Humaniq is now free to place its razor-sharp focus on expanding the user base and functionality of the App, without worrying about future bottlenecks in the rate of transactions.

Any questions or feedback? We’d love to hear your thoughts. You can let us know on Twitter, and join our Telegram to communicate directly with the Humaniq team!