Wednesday, May 1, 2019

NEM vs Ethereum vs Hyperledger

In my journey as one of the cadets in UnionBank’s Blockchain Institute, we have covered so far three potential platforms for designing and developing decentralized applications (dapps). I am going to tackle these platforms, namely NEM, Ethereum, and Hyperledger, as how they differ from each other and what are the strengths and weaknesses in terms of technology, usage and implementation.


The first platform introduced in Blockchain Institute is called NEM (pronounced as nem). It is a blockchain and cryptocurrency platform launched in 2015 that uses proof-of-importance (PoI) as its consensus algorithm. Unlike other platforms, POI checks the overall support of the user on the platform especially if one had huge investment in NEM. The platform’s main currency is called XEM which is valued at Php 3.14 at the time this is written but creating own currency or token called mosaics is possible.


Experimenting with the platform is quite easy. A user only needs to download NanoWallet, a browser-based application. This allows any user to create accounts, send or receive XEMs, create and manage mosaics, and enabling a feature called multisignatures. Multisig, for short, adds security to one’s NanoWallet by allowing a transaction to proceed only if certain amount of trusted people approve the transaction, just like a joint bank account.


While blockchain platforms are usually slow, NanoWallet always suffers from connection issues such as the ‘node’ needs to be changed every time a transaction is made in order to proceed. But the worst thing on this platform in terms of developing dapps is the documentation, or the lack thereof. While NEM has few of it discussing about its SDK, tools, and function calls, their documentations are somewhat unclear. Because of it, NEM is difficult to integrate in a web or mobile app to the point that in our hackathon, only few groups have properly implemented the platform in their projects. Adding to the injury is NEM’s lack of support from developer forum sites like StackOverflow, where bugs, error, or other problems are undocumented.


Second in our blockchain studies is Ethereum. Mostly known as a cryptocurrency in the (almost) same popularity as Bitcoin, Ethereum is also a blockchain development platform for dapps. It uses smart contracts written in its own programming language called Solidity. Smart contracts are where the functions of dapps are located once it is deployed in Ethereum’s blockchain network. Its consensus algorithm is the usual proof-of-work (PoW) where user is checked based on the number or length of work one has made on the platform. It uses a pricing mechanism for transactions called Gas for better resource allocation and in order to avoid spam. To avoid confusion, Ethereum is the platform while Ether (ETH) is the currency priced at a whopping Php 4,577.15 as of this writing.


Solidity has an online IDE called Remix, which means learning the language and playing with the platform requires no prerequisite software to be installed. But when one is ready to take developing dapps to the next level, there are several tools that can be used such as Metamask, Geth, Truffle and Ganache. In addition to that, unlike NEM, Ethereum app development is well-documented and has many support from developer forum sites, meaning searching for solution is a breeze.


One major issue of Solidity for me is there is still no stable version of the compiler. While I don’t mind it being in “beta”, the inconsistency of function calls and syntaxes between version updates is a bummer. For example, when I write a code using an online guide and I need to add functions on my own, that requires switching between many compiler versions to see whether it will compile or not. Until Solidity reaches a stable version 1.0, the reliability of the platform is in question.


The platform we are currently playing with is Hyperledger. It is a collaboration of open-source blockchain platforms initiated by The Linux Foundation in 2016, with major global companies contributing to the project. Among the many frameworks and tools on the initiative, we focus specifically on the Hyperledger Fabric and Hyperledger Composer made by IBM and Digital Asset. Fabric is the framework where smart contracts are deployed, while Composer is a set of tools for developing smart contracts and dapps. Unlike NEM and Ethereum, Hyperledger is only a platform and does not have a cryptocurrency, nor charging fees for every transaction.

The first thing I noticed when learning about Hyperledger is it has a very neat documentation compared to other platforms. More than guides, it offers free and comprehensive online courses through Cognitive Class, and it even has an online GUI called Playground for experimenting the platform.  For me, it is as expected from a well-known company like IBM.


While I am still in the process of studying Hyperleger, I cannot justify the fullness of the platform just yet. My two nitpick so far is 1.) it always shows connection problems and Docker issues while performing the lab activity in IBM Blockchain Foundation Developer online class. It is probably just a problem in my computer, so I still solve it as of the moment. Another is 2.) developing in it is resource-heavy, as it downloads files with enormous sizes (usually 100 to 200 MB per file) and activating tools such as Docker use significant amount of RAM and CPU power.

To wrap things up, all three platforms have its ups and downs so none of these are perfect. And for me, the rough sides are acceptable as these are relatively new, but once NEM, Ethereum and Hyperledger have matured enough in terms of performance and stability, it will become widespread across many industries across the world, including UnionBank’s blockchain initiative. With that, the power of blockchain is truly promising and I can’t wait to see what we can build with these in the future.

By Johnny Zarate

What You Need To Know About Ethereum and Hyperledger

In today’s financial space, blockchain is the talk of the town. Many companies are trying to incorporate blockchain technologies in their processes, thus the need for blockchain developers is increasing. Two of the most prominent blockchain technologies are Ethereum and Hyperledger. Before diving deeper into technical aspects of the two, there are some things that needs to be understood first.

Know what blockchain is

Imagine a database, but it has several copies across many computers and is encrypted using cryptographic keys. That is blockchain in a nutshell, as it stores data in blocks distributed in a network. Its first widely known use is in a cryptocurrency called Bitcoin, where every transaction is saved in a blockchain.

    Know the principles of blockchain
One of Blockchain’s key “selling” point is the use of consensus when submitting transactions, as data is verified by people in the network before a transaction enters into the blockchain. Another is immutability, meaning once a transaction is stored it can no longer be tampered or deleted. This is significant in the long run as this mechanism preserves records better than databases.

  Know the difference between a private and public blockchain

Let’s go with public blockchain first, as it was the initial idea of blockchain. Being public means virtually anyone across the world has access to the blockchain. Ethereum is public and is for general purpose such as cryptocurrency. One risk associated with this is high risk of being hacked by highly-programming-skilled criminals. To prevent this, transactions must be “paid” using cryptocurrency. In addition, Ethereum has a thing called “gas”, a second currency required so a transaction can go through.

Security concerns lead to the development of private blockchain. Instead of being worldwide accessible, transaction records are stored on a specific, limited network. This is where Hyperledger belongs, as it offers development tools for specifying own blockchain network. Private blockchains do not have cryptocurrency by default, but it can integrate cryptocurrencies from other platforms.

    Know the significance of blockchain in a use case

You might end up saying blockchain is cool, but this does not mean everything is “blockchainable”. Review and understand each aspects of a use case scenario. Once you have created an application design based on the scenario, think carefully if the principles of blockchain can benefit potential users of the application, or its disadvantages will make people “turn off”.