Dag vs Blockchain

Introduction

The terms Blockchain Technology and Distributed Ledger Technology (DLT) are often used interchangeably, causing many newcomers to think that they are one and the same. Time has come to prove this is not accurate. DLT is a broader term and includes several other technologies. Directed Acyclic Graph, also known as DAG, is another type of DLT.

Both Blockchain and DAG technologies record transactions on a digital ledger that can be distributed and decentralized and have a token-economic incentive mechanism. Though they may seem similar, some people still consider DAG a rival to blockchain technology.

To make understand the whole space, let’s take a closer look at what Blockchain and DAG technology are and how they have evolved over the years.

What is Blockchain?

The Blockchain is a transparent public ledger that is immutable, meaning it cannot be changed and linked together by “blocks.” Blocks are the components of this technology that retain the transaction data, which is then permanently recorded in the system. They can be thought of like individual pages of the city record book. The book is the traditional Blockchain or the public ledger, while each page being a block that contains specific data. A good example is Bitcoin or Ethereum cryptocurrencies.

Each block contains, among many things, a record of some or all recent transactions and a reference to the block that came immediately before (previous hash). It also contains an answer to a complex mathematical puzzle. The answer, also known as a nonce, is unique to each block. New blocks cannot be appended to the chain without the nonce. The process of mining is the process of competing to find the next nonce, through the proof of work algorithm. Once the new block is validated, it is added to the chain, which is arranged in a linear sequence over time.

Approximately after every ten minutes, the process is repeated, and a new block is created. The blockchain is authenticated by thousands of globally disturbed validating nodes and users. All the participating nodes have an entire copy of the blockchain.

What is Dag Technology?

While chains can visually represent blockchains, a directed acyclic graph DAG can be represented by a file directory structure. This is similar to clicking a file on your desktop and having it reveal more sub-folders and so on. Its sequence can only go in one direction, making it similar to blockchain transactions in that it’s immutable and users cannot tamper with it once it’s confirmed.

So, DAG-based systems can be referred to as block-less distributed ledger that is scalable and light-weight. There are a few significant DAG projects like; Byteball, IOTA, Hashgraph, and NANO.

Unlike the blockchain, individual DAG transactions are linked to one another directly rather than being grouped and processed in blocks. This increases the scalability of DAG as compared to the average blockchain. In simpler terms, you can think of a DAG-based network as a river that continues to flow in a sequential stream. Over time, every tributary joins the river without slowing it down but rather creating a more powerful and faster flow. Hence, the bigger the user base, the faster the transaction becomes without affecting the cost.

Directed Acyclic Graph DAG vs Blockchain

Structure

First, as mentioned above, blockchains are a distributed ledger that forms a linear chain of blocks of transactions arranged in an unalterable and chronological order. While DAG is a network of individual transactions similarly linked to multiple other transactions as a file directory structure.

Consensus

In the blockchain, consensus is achieved by validating the transactions of a block. Various solutions exist for this. One is proof of work consensus that requires a race to solve a complex mathematical puzzle, referred to as mining. Successful miners earn the miner fee, which is paid by other users. It is crucial to note that miners play an important part in creating new Bitcoins. This is currently being applied in networks like the Bitcoin and ethereum network. One other example is proof of stake (POW) which is also used in the ethereum network.

In DAGs, one transaction offers validation for the other. Participants in the network are both miners and validators, which greatly increases the scalability. However, they can’t validate their transaction. Hence DAGs require little to no fees as an incentive. For example, Hashgraph uses the gossip about gossip algorithm. This means each transaction has information about the previous transaction that has been shared across all nodes and confirmed.

Is Dag a Blockchain?

While some people argue that DAG will replace blockchain technology, it is crucial to note the two technologies enable different use cases. However, there are blockless DLT that are using existing dags, two good examples are iota and hashgraph.

DAG and Blockchain enable different use cases

DAG moves data in a cheaper, faster, and more efficient way. This enables the use of cases that require scalability and large amounts of low-volume micro-transactions. On the blockchain, this would not be economically feasible as the transaction fees are too high. Also, blockchain only handles about ten transactions per second and it also consumes a high amount of power, while DAG handles thousands of transactions per second.

On the other hand, if you wish to transfer a sizeable amount of money, speed and transaction fees become less important, and security becomes the major concern. Therefore, for this use case, blockchain becomes a better alternative.

The bottom line is, the two technologies are designed for different use cases and have different structures. Thus, DAG cannot be considered to be a blockchain, but rather it is a block-less distributed ledger.

Is Hashgraph a Dag?

Hashgraph offers a different approach to distributed ledger technology. It defines itself as a data structure or a consensus algorithm that utilizes the Direct Acyclic Graph (DAG) for storing and accessing information. Hashgraph uses the gossip about gossip algorithm to come to a consensus. Gossip about gossip is the history of how the transactions on the network are related to each other through previous hashes, resulting in a DAG called Hashgraph. Therefore, the Hashgraph algorithm can be considered as a DAG since it utilizes its techniques.

Is Hashgraph Better than Blockchain

Since Hashgraph is new in the market, many people do not have a clear idea about the technology. Therefore, to better understand which is better of the two, here is a brief comparison of DAG vs Blockchain and how they differ.

 

Comparison Between Blockchain and Hashgraph

 

Approach

One of the major differences is that Blockchain stores data linearly- in blocks, while Hashgraph stores and accesses data using DAG. Take for example the Bitcoin network. It stores bitcoin transactions in blocks whose header contains hash values linked from the first transaction to the most recent transaction.

Security

Blockchain utilizes cryptographic methods to make sure security for the data stored and transmitted, while Hashgraph utilizes the Asynchronous Byzantine Fault Tolerance to secure the network from bad actors.

Consensus Algorithm

Blockchain lacks a single approach to consensus. In most cases, it depends on the crypto or system. Some of the algorithms include; proof of work (POW), and so on. Hashgraph, on the other hand, uses virtual voting as the form of gaining network consensus. 

Speed

Blockchain’s speed varies depending on the crypto or the solution. In some crypto like Bitcoin or ethereum, blockchain based network can handle up to ten transactions per second. Comparatively, Hashgraph is faster than blockchain as it can handle thousands of transactions per second.

Which Technology is Best?

Hashgraph is undoubtedly a more advanced technology when compared to blockchain. But that doesn’t mean it will replace blockchain in the coming years. There are still projects that can utilize blockchain better than Hashgraph. Considering Hashgraph is privately held, the adoption is slowed down. We do have Hedera Hashgraph, a public Hashgraph network that would help accelerate its growth.