Categories
Blockchain Financial Services

Blockchain – Hyperledger vs Ethereum: a comparison

In some aspects, various blockchain technologies overlap with their intent and in other parts, they differ greatly, with their distinct features and scope. Let’s take a look at Hyperledger and Ethereum.

Hyperledger vs Ethereum: a comparison

Table of contents:

What is a blockchain?

Before we start working on our Hyperledger vs Ethereum comparison, let’s quickly recap what a blockchain is. If you rip off all the buzzwords and advanced crypto jargon, you can try to treat a blockchain as… a stone. What is written in stone will remain forever, right? But there is no single stone that holds the ultimate truth. Blockchain is made of nodes communicating with each other, and every blockchain node has its own stone. Users update it as time passes with new transactions. Before accepting an entry in a stone, information is reviewed and confirmed according to the blockchain consensus algorithm. It’s just a way of agreeing on the acceptance of valid information/transactions.

After an entry’s acceptance, every stone in a public network of such stones must reflect the change. So, when a transaction happens every stone is updated. Stones are compared to deduce the state of the blockchain. So this is the main reason why blockchain is so appealing. You can have a source of true history written in stone without a central authority. This source cannot be changed.

Is that all?

Looking at Hyperledger and Ethereum, we must first introduce all the contenders. While Bitcoin may be qualified as a public blockchain that handles money transactions (decentralized cryptocurrency). Ethereum and Hyperledger Fabric blockchains are much more than that. We call them blockchains 2.0, or evolved blockchain concepts that comprise of Virtual Machine engines. This means they can execute almost arbitrary Turing-complete code that was deployed into the blockchain (a computer program of some sort).

So now using our stone metaphor, we have scripts that can be written into the stone and you can execute automatic actions that alter the stone or make calculations.

What is Ethereum?

Ethereum is a public blockchain created in 2015 by a smart guy called Vitalik Buterin. He had a vision of extending the idea of Bitcoin’s decentralized cryptocurrency to decentralised applications (what are dapps about?). Those applications would comprise of smart contracts. Ethereum can be seen as a open-source platform that runs those smart contracts. They will be executed exactly as programmed without any possibility of downtime, censorship, fraud or third-party interference.

What is Hyperledger?

Hyperledger is not a blockchain in itself. Hyperledger is an open-source project and a hub for many blockchain projects under the Linux Foundation umbrella. Some projects that reside under the Hyperledger umbrella are:

  • Hyperledger Sawtooth: developed by Intel. Uses a brand new consensus algorithm called Proof of Elapsed Time (PoET) which helps to build networks with a large number of nodes with a small CPU consumption footprint. Supports both permissioned and permissionless blockchain networks.
  • Hyperledger Iroha: made by Japanese developers who originally created this solution for mobile use cases. Designed for simple creation and management of assets. It’s aiming to be easy to incorporate into infrastructure projects. Consists of new chain-based Byzantine Fault Tolerant consensus algorithm. Soon they will release iOS and Android support
  • Hyperledger Indy: Was created to provide independent identity on distributed ledgers. Private information is never stored in the ledger. With this solution, you will be in control of sharing your identity with others
  • Hyperledger Burrow: is a permissioned blockchain node that executes Ethereum smart contracts code (usually written in Solidity). You can specify an amount of gas needed to execute given contract. To invoke a contract you need sufficient permissions, not coins or tokens. Provides high transaction throughput thanks to the proof-of-stake Tendermint consensus engine.
  • Hyperledger Fabric: developed by IBM. Supports only permissioned networks. Provides elastic architecture — different components can be plugged in or out to fit the use case.

Comparison:

So let’s get to it — Hyperledger versus Ethereum! We’ll find out what the differences are between those blockchains in a few selected aspects. Then, hopefully, it will be easier to choose one over the other in certain blockchain applications.

Permissioned blockchains vs public blockchain networks

Ethereum is a public blockchain and permissionless network which means that it can be accessible to anyone for both read and write operations. On the other hand, Hyperledger Fabric is a private network aimed at solving problems specific to the enterprise landscape. Fabric is a permissioned network. This means that only privileged entities and nodes can participate in this decentralized platform. To receive access, one must submit enroll and be granted permission from a trusted Membership Service Provider (MSP). MSP is a component that issues and validates certificates, and later handles user authentication.

Private transaction between members

In Ethereum there are no means to issue a private transaction between members. That is, if we ignore the fact that in Quorum, JP Morgan’s fork of the Ethereum implementation, provides that feature. In our Hyperledger vs Ethereum comparison, it starkly contrasts with Hyperledger Fabric’s ability to offer that feature. Hyperledger Fabric can have multiple ledgers.

A ledger here is called a channel. A channel can be available only to certain members. This is a very important use case in enterprise integration scenarios, because it isn’t especially desirable to offer full transparency of internal business processes to the competitors. Certain contractual agreements should stay private.

Consensus Mechanism

Ethereum also shares the burden of most public blockchains: a requirement of costly consensus algorithm like “proof of work” to validate transactions and secure the network.

In the consensus model a transaction from one node, every node must confirm it in the form of a valid block before it’s accepted . The one node that creates a valid block first will get the reward in the form of an incentive for honest transactions validation. Nodes which create valid blocks and are rewarded for their work will get less and less rewards over time.

This consensus algorithm requires a lot of CPU power. At some point in the not-so-distant future, Ethereum will migrate to a proof-of-stake consensus algorithm. In contrast to that, Hyperledger Fabric in its default setup uses a no consensus algorithm (No-op). However, due to its pluggable architecture other consensus algorithms like Practical Byzantine Fault Tolerance can be configured. Consensus is abstracted away in a component called Ordering Service. You can even design and code your own consensus algorithm component if your needs can’t be satisfied with the existing implementations.

Hyperledger vs Ethereum: Cost of execution

Every transaction in Ethereum cost some gas, which is the way in which computing resources (CPU, storage) are valued in Ethereum. My colleague wrote a more in-depth article about Ethereum gas, if you’d like to dive in. Ether is the Ethereum’s native cryptocurrency. You can exchange it on some cryptoexchanges to your local currencies like USD or EUR.

As the Ether value as against national currencies is fluctuating, the gas costs, if expressed as a fixed factor, would also fluctuate. That’s the reason why in Ethereum we have the notion of gas and — separately — gas price (which is the value of the gas in the Ether unit). This way computational costs could stay constant to some extent even with high Ether market volatility. This translates to the observation that every transaction invoked on the Ethereum Virtual Machine will cost some real money.

Cryptocurrency is fuel for the costly proof of work consensus algorithm which secures the network. That gas cost not only incentivizes validating nodes to perform their duties. It also deters potentially hostile nodes from executing DDoS attacks that would cost them a small fortune. On the other hand, in Hyperledger Fabric there is no notion of gas. Every participant knows all the other participants of the network. In a setup like that, it’s easy to detect malicious users and activities and revoke their access to entire blockchain if the need arises.

Smart contracts

When writing smart contracts for Ethereum, the Solidity programming language is the main choice for blockchain developers (here’s our Solidity tutorial). In Hyperledger Fabric, smart contracts are called chain codes. In this case blockchain developers have an option to write chain codes in mainstream programming languages such as Golang or Node.js.

Chaincode runs in a secured Docker container isolated from the other processes. There is also one notable difference: Solidity language was designed to ensure that smart contracts written in that language give deterministic results. Node.js and Go with their runtimes weren’t designed to keep this rule in mind. So, as a programmer, you must be careful not to use non-deterministic functions while designing your chain code.

Hyperledger Fabric vs Ethereum – modularity

Ethereum has no notions of modularity. Hyperledger is designed as modular and different components can be switched on and off.

Transaction flow

In Ethereum, when a transaction happens it basically goes through two steps. The first transaction is added to ledger in some order and propagated to all peers. Then, the transaction is executed by all peers. Transactions must always execute deterministically to be sure that all the peers ends up in the same state. In Hyperledger Fabric, it’s a slightly different story. Clients send the transaction by choosing to endorse peers from those specified in the endorsing policy of channel. Endorsement policies are defined using domain-specific language.

The first transaction gets executed using chaincode in any order by chosen endorsement peers. The submitting client collects endorsements and validates signatures, then the transaction is sent to an ordering service. The order for each channel is specified and a Proposal of the transaction is sent to all peers in the channel. Peers validate the transaction and mark it as valid or invalid and state of the ledger is updated. As you can see, not all peers in the channel execute the same steps, as it was the case in Ethereum.

Which blockchain should I use?

I liked the Hyperledger Fabric vs Ethereum battle metaphor, but in truth Hyperledger Fabric and Ethereum were created to solve different problems. So they shouldn’t really be perceived as competition to each other. They are different products that happen to use the same backbone technology, which is the blockchain itself.

Ethereum vs Hyperledger – conclusion

Hyperledger Fabric was made for a business usage scenario, mostly enterprise solutions. Therefore, organizations can use the Hyperledger Fabric blockchain for their internal (inter-department) integration purposes — or more general cross-enterprise integration scenarios where the parties to the transactions know each other and have valid contractual agreements to communicate with. On the other hand, Ethereum was designed for public blockchain solutions with the notion of fully transparent and objective transaction execution even in an arbitrarily hostile environment. While to some chaos can be a ladder, this doesn’t work for application developers. At Espeo Blockchain, we also help people decide which tech they should pick and guide them through it.

Categories
Blockchain Supply Chain Technology

How blockchain traceability can change your organization

Businesses, governments – various entities can benefit from decentralization. However, even criminals may derive some use from decentralized operation modes and various cryptographic primitives. The goals and objectives of those three categories of organizations are different, so the way blockchain traceability can be used also varies. I’ll look at predictive markets, DAOs …and crypto anonymity.

Businesses and blockchain traceability & transparency

Businesses (for-profit organizations) owned by  groups of shareholders often value the transparency of the way the organization is run. Those organizations aren’t led by a single person, but by an elected group of directors. The most fundamental feature of businesses governed by smart contracts is that all of the transactions and decisions are stored in a publicly verifiable ledger. This sort of businesses can be called a DAO (a decentralized organization). No director can refute the decisions they make, as their cryptographic signatures can’t be forged (direct accountability).

In DAOs, shareholders or members also have a direct and immediate impact on the direction of growth and future decisions. All costs or expenses in organizations like that are accountable, including employee remuneration. In an environment like that any gender, religious, political or other biases can’t exist.

Governments and prediction markets

Governments run in a decentralized mode are a form of a larger DAO. There are some thought experiments to organize governments in the form of a futarchy. In a futarchy, the legislative branch bases on the results of prediction markets. Prediction markets are sort of like betting or voting systems, and they proved to be an accurate way of extracting value from the wisdom of crowds. Any citizen participating in nation-wide prediction markets can have an immediate impact on the bills passed. What’s more, they can easily see the impact of those bills on their own welfare. That’s probably the best form of traceability that exists!

As the decisions are transparent (and the assets/value allocation is transparent) the money allocation to projects/bills is unbiased, and the money is assigned to objectively the best contractors. We won’t see any shady connections between government representatives and their families or friends.

Criminal organizations – blockchain traceability vs. anonymity

Speaking of shady. There’s something we should be aware of. Criminals can also use the blockchain in creative ways, sadly. For example, let’s look at markets that trade in illicit goods or those offering nefarious services. The objective is to tangle up all the dealings and transactions conducted to hide both the nature and the parties to the transaction. Seems like something that just won’t work on the blockchain? Wrong. Distributed systems include, most importantly, the full anonymity of the transacting parties. These are paired with encryption algorithms of the data exchanged by the parties. This allows such organizations to reach their objectives.

Cryptocurrency systems where you can’t see the parties to the transaction or the actual amounts (but with full guarantee of the actual value transfer!) are perfect tools for organizations that value their… privacy. If those parties get caught, the deniability of the transaction is a vitally important feature. (Un)fortunately, that’s what some of the more complex cryptocurrency systems can offer. Those are the problems regulators should definitely research.

Blockchain for different needs

To conclude, various organizations have different needs. Distributed and blockchain technologies are not one-size-fits-all techniques. They can combine and match these technologies in different ways. Prediction markets won’t work for all, and neither will an anonymous crypto system. The goal is to end up with features that suit the needs of a given organization. As we can see, they can sometimes provide an answer to contradicting needs, such as both transparency and deniability.
Just so you know, I’m organizing a workshop on Stellar soon, check it out. Also, if you’re wondering how traceability (or any other feature I wrote about) can work in practice, say, in your company, write to me using the box below.

Categories
Blockchain Finance Financial Services

How to tokenize assets: Real estate ICO

In the crypto space, tokenization is the buzzword of 2018. Here in Crypto Valley, one can run into an entrepreneur tokenizing a real asset nearly on a daily basis. What’s more, many of the projects are already at an advanced stage. Therefore, it’s not unreasonable to expect that by the end of Q4 many startups from Crypto Valley will be issuing tokenized assets such as gold & silver, art, real estate, and agricultural property. Tokenization of an asset, however, is a complex process, mainly because of the tokenomics it involves. Let’s focus on a real estate ICO.

Tokenization – real estate token

The complexity of token economics can be illustrated through the example of a stable real estate token. By ‘stable’ I mean there are no large price fluctuations on the value of the token. This is a common tokenization use case in the blockchain space at the moment, as real estate is generally an illiquid asset. By tokenizing it,  it’s possible to bring liquidity to the markets. So let’s try to build a real estate ICO!

For a real estate token, we would like the value to represent the actual value of the underlying asset. But how can we guarantee this? Just for the sake of example, let’s imagine that we have 100 million worth of real estate as the backing asset. We can also imagine that the ICO is capped at 100 million. Each token represents a proportion of the actual apartment, being a security token.  Let’s enter the time after the ICO has been successfully hard capped and the token listed on an exchange. We need to analyze two different things: when demand is higher than supply, and vice versa.

When demand surpasses supply

As the demand grows larger than the supply, we’ll see a price increase of the real estate token. This would be an ideal situation for a utility token or a security token of a more speculative nature. However, for our purposes that would not be ideal. The value of the token wouldn’t be backed by the real estate anymore and would start to grow. Just like in the many economic bubbles in the past.

The solution for stabilizing the price would be to allow an unlimited supply of tokens to be released to the market so that the real estate token issuers would be able to issue real estate to the markets per demand. Roughly speaking, this would mean that the token issuer would have to offer an unlimited supply of tokens to the markets.

Meeting the increasing demand brings a different problem to the table – how will the newly created tokens be backed. Will there be a pool of real estate larger than what was offered in the real estate ICO, or will the issued funds be held in escrow and used to purchase more real estate? Depending on the model chosen, and on legislation, it may be possible that issuing new tokens will require financial licensing.

When supply surpasses demand

Another problem arises when there’s a bigger supply of the token than there is demand. This would happen, for example, in a situation where a major token holder decides to liquidate their position all at once. Surely, one might argue that market forces wouldn’t lead to the price of the token going below the value of the underlying asset. However, this might not be the case – what if the market actors simply would decide to wait for a lower price and join the dumping party with the expectation to buy even lower?

We can solve this problem in a couple of ways. First, if we use an ERC-20 token, we can have the liquidity mechanism using Bancor. The tradeoff is that it will tie a large amount of the ICO capital to the Bancor smart contract. Another approach would be to directly build market makers into the exchanges that are used to trade with the tokens. However, as the number of exchanges grows, it could mean spreading the liquidity reserve in multiple locations simultaneously.

Exchanging the tokens

Another question comes to mind: where is the business model in all of this? The company could focus on growing the amount of real estate and deriving a cash flow from rental contracts. It could also consider other ways of getting income. For example, it would be possible to charge a transaction fee. Depending on the technicalities, this can be done directly on a smart contract. If a smart contract solution isn’t ideal, it can be directly implemented on a customized blockchain protocol.

This leads to the next question. Would it be ideal to use an ERC-20 token and integrate it into an existing exchange platform, or would it be better to use a customized blockchain protocol? An ERC-20 token is easy to integrate into different exchanges. However, it will have the limitations of Ethereum protocol.

Real estate ICO: What about regulatory compliance?

The final big question is how to deal with KYC/AML compliance. After all, if the token is to represent actual real estate, the investors may have legal rights to dividends and to the real estate itself. Therefore, we need to have a way to vet ICO investors. Also, the ability to invest and transfer the tokens needs to be limited to identified parties. The easiest way to solve the compliance aspects of security tokens is to whitelist the identified real estate ICO investors and use exchanges that only allow identified investors to trade. If you’re considering a dedicated blockchain, these control mechanisms need to be implemented at the protocol level.

I’d be happy to talk to you about tokenization, and your real estate ICO (or any other plans to tokenize something valuable!), if you’re planning one. Write to me using the form below!

Categories
Blockchain Software

Utility token vs. security token explained

Utility tokens and security tokens represent the two main categories of the ICO token. People easily get confused about their differences and use cases. I’ll go through a quick presentation of their key characteristics and dig deeper into the security token topic. Let’s highlight the benefits to investors and the trading aspect of those tokens.

The difference between a utility token and a security token

Utility tokens provide their holders with an access to the company’s services and/or products. Yet, they aren’t issued in the form of an investment asset. That means that the purchase of a utility token doesn’t have to comply with securities laws at this point.  A utility token has a certain use case inside a project, but it isn’t designed as an investment. It ‘s not a company share. However,  this can still be profitable In fact, the price of a utility tokens can grow over time if the demand for the service or product increases. So, buying a utility token that brings value may bring profit to its holder.

A security token is quite different. It gives its holder a right of ownership and is subject to securities regulations. In the US for example, the SEC has ruled that security tokens are subject to the same federal laws that regulate traditional securities. This brings a limit to the type of investors that can invest in security tokens. Therefore, their trading is also extremely limited and restricted.

The main problems for ICOs using utility tokens:

The rise of ICOs in the last 18 months has brought some major issues in the market. Investors are getting more and more cautious after numerous scams have been widely publicized in the media.

One other major issue has been brought to light when it comes to ICOs using utility tokens. Regulators all over the world (especially the SEC in the United States) are investigating tokens according to their actual usage, as opposed to how they were intended to be used. This is very important because a utility token might actually be considered as a security token. A very high number of ICO tokens are expected to rise in value over time. Therefore, investors are holding on to them as an investment, instead of actually using them within the project. This is where the regulators see a problem, and that’s why they consider those tokens as securities. The SEC chairman, Jay Clayton, even said: “I believe every ICO I’ve seen is a security” . Though, to be fair, he did also say that not all ICOs are scams.

This is why a lot of companies have decided not to let US-based investors invest in their ICO, or look into building a project with security tokens instead of utility tokens.

Why is a security token so appealing?

Issuing security tokens during an ICO is seen by a lot of industry professionals as more efficient and less expensive compared to using utility tokens. It reduces legal risks and brings safety for companies in the long term.  On the other hand, a lot of ICOs still try to avoid using security tokens because as I mentioned earlier in this article, it brings about the restrictions about who can invest and trade the tokens, which limits the potential of fast and wide adoption.

Strong ICOs backed by very solid teams are using security tokens more and more often these days. The reason is simple – they don’t want to risk any issues with the regulator. What’s more, they often don’t have any problems raising funds from accredited investors. Plus they’re able to operate on the US market.

You’ve been warned

As we mentioned earlier, a company issuing utility tokens that are later considered as securities by the regulator could bring huge potential liabilities. So, it’s natural that founders are becoming more and more aware of this.

The bottom line is that if you are a company founder dedicating all your time and resources to building a massive business, you want to be sure that your ICO is compliant with ever-growing regulations. Otherwise, it leads to liabilities. On the same note, if you are an investor in an ICO, you’ll definitely want to invest in a token that brings you maximum protection. A regulated security token is often the best way to achieve this.

I’m not saying that utility tokens are good or bad. Or that security tokens are the best way to go. However, as a company founder or as an ICO investor, you’ll probably need to take the elements I’ve mentioned into account. Those two types of tokens have very different aims. As you could see above, security tokens are designed to represent shares of the company, while utility tokens represent access to the company’s product or service. It should also be noted that sometimes, a security token is the only way to go. For example, a lot of projects promise buy-backs of their tokens which makes them a security to the regulator.

The trading of security tokens is its major disadvantage:

The major issue with a security token is that only accredited investors can invest.
The requirements include the following. Only one of these elements needs to fulfilled):

  • An annual income of over $200,000 as an individual or $300,000 with a spouse.
  • Net assets of more than $1 million excluding the primary residence of the investor.
  • An institution with more than $5 million in assets.
  • An entity fully owned by accredited investors.

Meeting the criteria above is fairly hard for most investors. This is why a lot of companies go for a utility token: to attract the largest number of investors without being limited to their net worth or geographical location. Using a security token enables an organization to provide token holders with benefits like dividends, voting rights as well as profit shares. This is something a lot of investors are looking for. Also, a security token can still have a utility use case. It can be used within the project’s service or product as a native transaction value.

If you’re still not sure how to handle your ICO, write to me using the form below, or see my contact at the bottom of the page. I’m sure I can suggest something.