nahmii, a Gateway to Scalable Virtual Economies (Part 1)

Katat Choi
hubii
Published in
8 min readNov 21, 2019

--

The blockchain scaling problem has been a hot topic in the last few years, as it is one of the main barriers to making the technology practically usable and ready for mass adoption.

This article is the first in a series of two. The first part will discuss the state of blockchain technology and provide a technical overview of existing Ethereum scaling solutions, including why they are struggling to realise the full potential of the technology. In the second part, we will cover our own scaling solution, nahmii, which is architecturally different from the other approaches. We will also demonstrate nahmii using a simple web3 app (which can be run on any web browser) as well as explaining the key concepts using its SDK. Finally, we will discuss some potential use cases for scalable blockchains using nahmii.

First they ignore us, then they laugh at us, then they fight us, then we win.

Momentum has been building within the blockchain industry since the introduction of Bitcoin in 2009. In addition to generating significant media interest, the technology has also been hailed as a potential disruptive force across a wide range of industries.

Recent high-profile blockchain initiatives such as Facebook’s Libra project and China’s DCEP digital currency have seen the technology reach a new, more mainstream audience. We have now reached the point where almost all major organisations are investigating blockchain, with many moving beyond mere curiosity about the technology and into active development. This shift marks an inflection point in the evolution of blockchain. As of today, it is likely we are in

fighting phase to find the equilibrium between the emerging decentralised communities and the traditional centralised organisations.

If we assume that markets work like living organisms, then liquidity provides the nutrients required to maintain their health and growth. In a competitive environment, only those organisms with a sufficient supply of nutrients will thrive. Continuing our analogy, markets without sufficient capital will die.

One of the advantages of having a central power to govern a financial system is the low latency in making new transactions compared to the decentralised organisations powered by blockchain. Centralised transactions within the traditional organisations can therefore be processed at the millisecond level with uncapped limited for the throughput.

People in China nowadays rarely carry cash in their pockets. Instead, the mobile phones are new “wallets” to make the payments daily, for both shopping online and offline. According to the People’s Bank of China (PBOC):

Mobile transaction volume reached 277.4 trillion yuan ($41.51 trillion) in 2018, up more than 28 times from five years ago.

On the side of blockchain-powered applications, high development costs, a steep learning curve, slow transaction processing and the complicated UX are the key barriers preventing mass adoption. Add in blockchain’s well-known scaling problems and this raises a simple question: if the centralised financial model is working so well, why experiment with blockchains that are still so cumbersome to transact in real-world use cases?

The answer is found in blockchain’s unique features: permissionless, trustless and decentralisation. The Internet offers freedom for information to flow through the networks. Blockchain offers the freedom for value to flow through the markets, reducing the costs and inefficiency introduced by the middlemen who control the rules of the market networks. Who will benefit from this technology? One obvious example is the financial industry, which inherits the traditional top-down structure of power distribution where centralising forces create a monopoly business which stifles innovation.

Consider the recent trend of DeFi applications. This new approach has revealed the potential value of mesh network structures, utilising composability atop different protocols to derive a new set of financial services. DeFi protocols, 0x, MakerDao, Set and many others, have demonstrated the power and flexibility of decentralised technologies. Because of their permissionless nature, these innovations have allowed for such rapid iteration that traditional financial institutions may find themselves left behind in the near future.

While it is clear that some industries are unlikely to benefit from this move towards decentralisation, the competition between the two ideologies looks set to foster innovation in the markets for some time to come. Before decentralised solutions like blockchain can achieve their true potential however, major barriers to adoption must first be overcome.

Struggles on Scalability

In order to compete with the existing centralised services, blockchains must be able to scale while retaining trustlessness. The ability to make quick, convenient transactions without requiring a middleman or giving up ownership of your assets is a key differentiation point between the two approaches.

This raises an important question: if scalability is essential to the mainstream adoption of blockchain technology, why haven’t we seen a blockchain which offers both scalability, decentralisation and security? The answer lies in the Blockchain Trilemma.

Blockchain Trilemma is a term implying a balance between the three key aspects when designing a blockchain. The limitation is that only two out of three can be maximised.

Because of the trustless nature that most blockchains embrace, they are optimised to maximise decentralisation and security. The base layers of these blockchains are therefore mainly built for securing the assets in a trustless manner. In theory, scalability is better handled by second-layer solutions, which build on the security and decentralisation features of the base layer.

A significant number of second-layer scaling solutions have been proposed, each claiming to complement and scale their base-layer blockchain. We can use some basic criteria to assess each approach, with a particular focus on scaling. Importantly, commercially-useful scaling solutions require more than just higher transaction throughput. As an example, any solution to the scaling problem for Ethereum should address five issues — not one: low throughput, unpredictable fees, high latency, delayed finality and steep learning curve for developers.

For more details about some of these terminologies, please refer to our previous blog post.

Below is a comparison matrix covering several of the key metrics across the main scaling solution approaches:

Comparisons between some scaling solutions, by https://kauri.io/article/7ccaaa2fe7f344d5bf53807cb5c01530/top-5-ways-to-scale-your-ethereum-blockchain-application-(dapp)

These metrics do not address finality and latency as key factors in evaluating how well a scaling solution works, thus the analysis presented here is incomplete. Consider the following example using Ethereum: During periods of congestion on the Ethereum network, it can often take many minutes or even hours for a transaction to be mined when paying a low gas price. This is due to the restricted capacity of the base layer, which can only process a limited number of transactions per block. Transactions can therefore become ‘stuck’ in a pending state, waiting to be mined.

Ethereum’s capacity issues cause uncertainty for users regarding when a transaction will go through. While it is possible to effectively ensure that a transaction will be mined quickly, this requires the user to pay a premium over the safe gas price. In some cases, transaction fees can rise by ten, twenty or even fifty times their normal rate. Transactions on Ethereum are also subject to latency and finality delays. New blocks are added to Ethereum’s blockchain at a rate of approximately one every fifteen seconds. Sometimes the network disagrees about which block should be the next official entry into the blockchain. The delay in reaching consensus leads to ‘orphan blocks’, where a transaction can appear to have been mined but is ultimately rejected as part of the official record. This impacts on Ethereum’s finality, requiring users to wait for a number of blocks before a transaction can be considered ‘safe’.

If a scaling solution can achieve instant finality while utilising the base layer to guarantee the security of assets, it would significantly improve throughput effectiveness and fee predictability of blockchains.

Today, the best-known scaling solutions utilise state channels and side chains. These two solutions have different strengths and weaknesses, depending on the target use case, with different approaches to the blockchain trilemma.

Here is a brief summary of the pros and cons of each:

State Channel:

pros

  • Instant finality
  • Unlimited throughput

cons

  • Requires both parties to be available to sign every new transaction (requires both the sender and recipient to sign the incoming transaction)
  • The recipient has to connect to a channel (which also introduces fee costs on smart contracts) in order to receive funds.
  • Capital inefficiency. The amount that can be relayed from one channel to another is determined by the capital availability on the connected channels. This limitation poses challenges when there are a large number of value transfers to route between the channels.

Side chains:

pros

  • Good throughput

cons

  • Unpredictable operational costs, as the operator has to perform periodic commitments to the base layer. These costs will eventually propagate through to users.
  • Worse finality latency than the base layer. Side chains inherit their finality issues from the base layer, as transactions are only final once they have been committed to the base layer. The performance of the base layer therefore determines the performance of the second layer, with the caveat that the second layer can only ever be at best equal to the base layer. In reality, side chains will always have worse finality than their base layers.

Learning curve

The issues above introduce a number of new concepts in comparison with the conventional Browser/Server or Client/Server technical architecture. Blockchain-curious developers therefore face a steep learning curve, particularly when faced with immature development tools. This issue highlights a wider problem in the blockchain space: the high barrier to entry for developers and users alike.

It is clear that these technical barriers have not been fully overcome. The impact of these issues has been felt throughout the industry, with poor user experiences, higher development costs and a general increase in risk for blockchain businesses. Therefore, in practice, it is important that second-layer scaling solutions address the problems from their base layers while simplifying the process for adoption.

When a product needs to integrate with a third-party service, developers must first evaluate its potential costs and profits. If the service is too complicated to digest, the project is often deemed too risky to proceed. When creating products based on immature technology, these risks are multiplied further. How can we make the development environment for blockchain products better?

The second part of this article will take a look at hubii’s answer to that question, nahmii, and how our SDK is lowering the barriers to entry for new developers with different backgrounds. Stay tuned for part two!

PS: I am a hubii developer mostly working on hubii core, an Ethereum desktop wallet integrated with nahmii, as well as helping with hubii’s smart contracts and backend.

Many thanks to

for graciously doing the proofreading and rephrasing the sentences in this article.

--

--