How to Avoid Double-Spending Attacks in Hybrid Blockchain

Applicature
Applicature
Published in
8 min readOct 9, 2018

Types of Blockchains and Their Characteristics

With the rapid development of blockchain technology, the crypto community is devoting an overwhelming interest to it. It comes as no surprise that more and more startups, entrepreneurs, and businesses have implemented blockchain as a tool that helps to solve industry’s challenges and improve the efficiency of its workflow.

Providing an unprecedented level of record maintenance and storing details of financial and other transactions, blockchain technology can contribute to any industry by:

  • reducing manipulative and deceitful activities
  • providing transparency and traceability of records
  • ensuring immutability
  • increasing security levels

According to a company’s needs and requirements, there are different types of blockchains to choose from.

Do you need to provide higher transparency and public access for your data? The public blockchain is the right choice. Public protocols rely on proof-of-work consensus algorithms. The community can easily access them and participate in the public blockchain without restrictions.

Do you need to cut paperwork and enhance internal business management while keeping information internal? Then the private blockchain is the best choice. It provides written permissions to certain centralized sources of authority, whereas read-only permissions have the option of being either viewed or restricted.

Federated or consortium blockchains are commonly managed by a group of individuals or organizations. There is no possibility for any user to freely access or view a transaction history or its verification. Consortium blockchains appear to be the choice for all sorts of financial institutions.

As there are a number of blockchains to choose from, there are also pros and cons in each system. Consider the graphic for comparison:

Currently, one of the relevant topics involves the issue of the absence of a governing body in the public blockchain. Because it provides open read-and-write access, anyone can share and generate accessible data. On the one hand, this is an advantage; on the other, it is a disadvantage in terms of security.

Now, a new type of blockchain has appeared: hybrid blockchain. It combines the best features of three blockchains, and provides a new solution to the above-mentioned issues. In particular, the hybrid blockchain solves security issues and prevents various types of attacks that can be performed due to smart-contract bugs and pitfalls within the blockchain system.

The Essence of the Hybrid Blockchain and Its Advantages

The hybrid blockchain combines characteristics of public and private blockchains in order to provide users with a choice: which transactions will remain public, and which should be accessible only to a smaller group of participants.

This provides the transaction process with privacy, while at the same time ensuring verification via immutable public-blockchain history. Hybrid verification functions similarly to Satoshi Nakamoto’s decentralized public verification:

Hybrid blockchains ensure that their members have equal rights to view and add details, and/or permission for certain transactions. What’s essential is that the identity of the involved parties is not shared with other network participants. For enhanced confidentiality, the private state of the hybrid blockchain is handy. As the perfect alternative to the financial technology industry, it ensures:

  • security
  • decentralization
  • transparency
  • immutability

Hybrid blockchains are a great match and the perfect solution for privately-regulated entities and governmental institutions. They ensure greater flexibility and data control (which can be shared either privately or publicly). Read more about public, private, and hybrid blockchains here.

Let’s take a closer look at some examples of hybrid blockchains.

XinFin

XinFin, one of the first hybrid blockchains, was launched in 2017 via initial coin offering. It recently launched its first decentralized application and global financial trade platform.

XinFin functions on two blockchains:

  • Ethereum (public)
  • Quorum (private)

Its hybrid network relies on a delegated PoS consensus between reliable nodes with the use of smart contracts and IoT on top of the protocol. This approach enables uploading of current data onto the blockchain. Though the platform is still young, it has already helped numerous projects in the areas of supply-chain management, logistics, trade, finance, etc.

HyperLedger Fabric

Hyperledger fabric emerged as another alternative option to the public blockchain. Hyperledger provides new capabilities for businesses and enterprises with its features of open governance, enhanced transparency, and accountability. With the use of hyperledger, asset-transfer processes are guaranteed to gain enhanced privacy and scalability. With these new tools, business networks are capable of interacting on a new level with an enhanced transaction-verification process.

The main blockchain characteristics are decentralization, confidentiality, pluggability, and ease of use.

Ethereum Consortium

A new project called the Ethereum Consortium Blockchain Network is about to be launched. It was designed to help representatives of various industries work more efficiently and create consortiums.

One of its innovations is the ability to create a consortium with only three nodes running from the same IP address. Another, even more important aspect of the Ethereum consortium, was designed to improve security: the automatic generation of private user keys. This means blockchain participants won’t need to create or provide private keys. These keys will be automatically generated from the passphrase, thereby simplifying the whole process.

Having discussed the basics of hybrid blockchains, their features, and characteristics, it becomes clear that they provide a higher level of security. Security is one of the most significant issues to deal with, as it is not a secret that blockchains often get attacked by hackers.

Let’s take a closer look at the double-spending issue and ways to avoid it.

The Issue of Double-Spending and How to Avoid It

Double-spending is the term used in the crypto community to refer to a 51% attack. This is the process of using the same funds (cryptocurrency) twice for different purposes. Let’s discuss the popular car example. For instance, you have 15 Bitcoins, and want to purchase a car. You send your funds, but the car will be delivered to a specified place in several days. If you call a double-spending attack and succeed in your intentions, you can reverse your 15 Bitcoins, and, say, purchase a boat, too. Then you get both items and pay only once.

The issue of double-spending is, unfortunately, common, and therefore crucial to prevent. Blockchains take preventative measures in order to eliminate deceitful behavior. Bitcoin, Bitcoin Cash, and Litecoin, for instance, verify every transaction with the help of PoW (proof of work) consensus. Other blockchains, like Cardano, Ethereum, and Stellar, use PoS (proof of stake) consensus to avoid double-spending. The Applicature blockchain agency has launched its own Proof of Stake consensus for greater stability and security while performing multiple transactions.

These two algorithms have the same purpose: verifying the transaction. The only difference is the process. PoW rewards miners who solve a mathematical puzzle first, while PoS relies upon the miner’s wealth (stake). In the second system, there are no rewards, as miners charge fees for verifying transactions.

With hybrid chains, the core idea is to store value balances on the public side while distribution rules are computed in the sidechain. As a result, there is a need for tools to obtain proofs from the sidechain that there are no fraud transactions that could lead to fake distribution of public account balances.

How to Avoid Double-Spending in Hybrid Blockchains

Hybrid blockchain implementation is a great choice for eliminating attacks and deceitful behavior. It’s no secret that sidechains (both private and consortium) are more exposed to attack due to poorer security. To reach a greater level of safety, hybrid chains combine private and public network states. In this way, private organizations can keep track of their records without intervention while verifying transactions with the use of public blockchains.

Let’s take a closer look at several solutions for avoiding double-spending within hybrid blockchains.

Plasma and the Plasma Cash Solution

The Ethereum Plasma protocol is one of the best solutions for guaranteeing a higher level of security. It works with blockchains like Bitcoin, Ethereum, and others. Its technique conducts off-chain transactions, but at the same time relies on the public blockchain to verify these transactions. In addition, Plasma “off-chain” (sidechain) technology combines state channels to resolve various problems. It takes operations from the main public chain, transacting and solving them in an off-chain manner. This can be visualized as a side-chain hierarchical tree that systematically provides data to the public chain.

The Plasma Cash solution operates in a similar manner. Plasma Cash is better suited to blockchains supporting smart-contract usage. It aims to cut transaction costs for smart-contract and DApp execution. This technology adds a smart-contract layer in order to interact with the public chain. Plasma Cash doesn’t require downloading each block for verification like Plasma does. Instead, one just has to keep an eye on the block data of coins and transactions. Plasma Cash functions on the public blockchain, and compares transactions on the side chain. If everything is verified and works well with the Merkle root, then the transaction can be broadcast on the public chain.

The only drawback with Plasma and Plasma Cash is the cost. These solutions require additional gas, according to the ERC721 standard.

Note that closed, private enterprises will not benefit from Plasma solutions, as transactions will still have to be verified publicly. This is a better choice for side chains with more than one owner.

Transaction Data Storage in the Public Blockchain

Transaction data can be stored in public blockchains to ensure greater safety. When a company keeps smart contracts as a registry in the public blockchain, it is possible to record relative transaction data on the side chain.

To cut expenses, companies often process transactions on side chains. For verification, though, they broadcast results to the public blockchain.

This solution is cheaper than Plasma and Plasma Cash, but appears to be a bit less secure due to the higher number of participants.

Blocks Anchoring in Public Blockchain

Last but not least, security can be ensured within hybrid chains by block anchoring in public blockchains. This solution is not as secure as the previous two, but it is much cheaper.

Anchoring means broadcasting data on the public blockchain from a set of blocks. For instance, every ten, hundred, or thousand blocks gets regularly broadcast from a sidechain to the public blockchain. This results in a so-called anchor, after which modifications can no longer be applied.

To conclude, we should stress that hybrid blockchains offer a new approach to data storage and transaction processing. They are well-suited to semi-private businesses that prefer to keep their data close, yet verify all types of transactions in a more secure way. Hence, the hybrid solution of performing operations off-chain and broadcasting them on the public chain for verification appears to be a great way out.

Contact Applicature to find out which type of blockchain best suits your business.

Subscribe us on Twitter and Telegram to stay updated!

--

--

Applicature
Applicature

Applicature is a Venture Builder and Accelerator of Blockchain companies. Since 2017, we’ve helped more than 270 companies grow.