A tryst with Directed Acrylic Graph!

The Cherry Block
9 min readFeb 25, 2021

Name any industry and you will find Blockchain already making its mark there. In the last decade, Blockchain has grown from an experiment to a full-fledged technology transforming almost everything that it touched. The centerpiece of this idea is — no need for centralized authority. The idea is considered synonyms to Distributed Ledger Technology (DLT) by many. However, DLT and Blockchain might not be the same thing, or are they?. Today, let me introduce you all to yet another DLT — Directed Acrylic Graph (DAG).

Before going into the specifics of DAG, how it is different from Blockchain, its uses cases, pros and cons, it is important to understand the basis of networks and Distributed Ledger Technology.

Networks

A network is a collection of nodes (devices) that are connected and share data. Unlike a centralized database, the distributed database does not have any central server/database or administration functionality. Also, it is important to understand that distributed network is different from a decentralized network.

Different type of network structure

Distributed Ledger Technology

Distributed Ledger Technology is a digital system for recording transactions where all the transactions are recorded at multiple places at the same time. A distributed network is the core of DLT. Unlike traditional databases, DLT doesn’t have central data storage or authority, hence, a distributed network will always be a part of DLT.

The distributed ledger has a broader perspective and is just about the cryptocurrencies that we heard about. A distributed ledger can be

  • Permissionless — such as normal cryptocurrencies. The major philosophy behind permissionless DLT is giving authority to the public and making it unbiased. This was the very essence that Satoshi talked about in his whitepaper — Bitcoin: A peer-to-peer electronic cash system.
  • Permissioned — The access of permission can be public (or private), however; the authority will always be private. It could be like the blockchain that JP Morgan is using or Hyperledger fabric by IBM.
  • Then there can be federated and hybrid DLTs as well.

DLT works on the concept that the transactions being updated by any node must be agreed upon by everyone in the network. Therefore, the entire network needs to reach at a consensus before any new information or block can be added and this is done through consensus protocol. Or in layman term, since every node in the network has access to the data, how do network ensure that the data is authentic, secure and who will have the right to add new data to the existing data? This all is done through consensus protocol.

Consensus Protocol is of the following types:

· Proof-of-work (PoW) — In proof of work, each node solves a cryptographic puzzle also known as mining in general, to create the new block. The node which solves the puzzle first gets the right to add the new block and is rewarded for the same. The process requires a high amount of computation power and energy. Miners are the major stakeholders in PoW.

Proof-of-Stake (PoS) — In PoS, the overall process remains entirely the same as PoW, but the method to reach the end goal changes. The decision on who will create the block is not taken on the basis of computational power rather who own/stakes how many coins also called validators

These are the two major consensus protocols, others are delegated proof-of-stake, Practical Byzantine fault tolerance, proof-of-trust, proof-of-authority, and directed acrylic graph. The reason why consensus protocol so important is because the consensus protocol/ algorithm of any network is the defining feature of the network. PoW is mostly implemented in the distributed network when security (the problem of double-spending) of the network is the topmost priority. PoS is implemented when security is a major concern however energy efficiency is also the priority. Since in PoW and PoS, a new block is added to existing blocks, it forms a chain and hence PoW and PoS based DLT is a sequential operation and in general, are referred to as Blockchain.

However, with added benefits comes drawbacks as well. Though PoW addresses the problem of double-spending head-on, they are not scalable for retail purposes. The transaction speed of Bitcoin (which implements PoW) is only 5 txn/sec. PoS provides a solution to double-spending and scalability however its staking mechanism might lead to concentration of authority to few people in some cases.

A technological introduction to Directed Acrylic Graph (DAG)

DAG is a term for a specific type of graph mostly used in network theory and computer science. A graph consists of vertices and edges, denoted by G = (V,E) and it is acrylic if you cannot start at a vertex ( point) and return to it by following edges.

A Directed Acrylic Graph is an acrylic graph that gives direction to the entire database/network/flow of information or transaction. The data can only go from former to latter.

The fundamental concept of DAG is simple as explained above. Directed Acrylic Graph is a distributed ledger technology in which each transaction (vertex) is linked with multiple other transactions in a non-cyclic manner and in uni-direction. There is no block in DAG network.

Whereas in Blockchain, as mentioned earlier, DLT forms a linear chain of blocks in chronological order. Transactions are bundled into blocks. Mined/validated blocks are added to the chain of blocks.

In the data structure, if blockchain is a linked list, DAG is a tree. The linked list-like data structure in a blockchain doesn’t allow for more than one chain and this restricts the creation of multiple blocks or parallel blocks. All the transactions are put into the same block.

However, a blockchain and DAG are kind of similar. A blockchain is a DAG with the limitation of being strictly linear. It’s the same as all squares are rectangles with all sides equal.

Why does DAG matter

The whole idea of bringing DAG was to overcome the scalability issue of blockchain. In DAG, since data doesn’t follow strict sequencing and can take a parallel path, the transaction speed of DAG increased tremendously. In more technical terms, any transaction needs to be verified by only the adjacent transitions. Also, there is no need for miners and hence the transaction fees reduce to zero. Without transaction fees, the transaction can be sent without any high cost, unlike blockchain.

Problem with security — Double spending in DAG

However, DAG comes with its own set of drawbacks. Since DAG does not have strict sequencing, and transaction follows less restricted order, security can be a concern with DAG. A pure form of DAG data structure cannot avoid double-spending. Transaction from malicious node to its children cannot be identified in DAG.

If node 2, tries to insert two transactions in DAG, it would be impossible to identify which 3 is real. This complication increases as we keep on increasing the no of transactions in DAG. The worst part of this problem is that anyone can hide a fake transaction into DAG which can impact the DLT in the future.

Different DAG invokes a different kind of solution to the double-spending problem. The most common one is the concept of ‘witness’ in the DAG graph. As the name suggests, the witness serves as a reference post. For each transaction protected by a witness, it can be confidently assumed that every other transaction that comes before or after the witness is the real transaction.

The working of witness in DAG is the same as that of the block in the blockchain, to provide a reference point for security. However, unlike blocks, a witness in DAG doesn’t need to

  • Worry about the size
  • Has no specific time interval

One of the crucial drawbacks of a witness in DAG is that, for the real use case, DAG would need more witnesses than we can think of. Consider DAG with millions of nodes. an attacker can insert thousands of fake transactions. In such cases, DAG would need thousands of witnesses to protect the network. In real life, no such DAG is without centralized witness thus defeating the purpose of distributed network and DLT architecture.

Potential use cases of DAG

Gateway for Retail Payment

DAG is zero or low-cost DLT and is fast. If DLT has to go retail, it must choose the path of DAG. Any blockchain offering scalability of fewer than 1000 txn per sec will never support the retail transaction and will never be accepted as peer-to-peer electronic cash. This is one of the reasons why Bitcoin is hardly used for normal transactions. In P2P retail, there are millions of low-value transactions that need high speed, on the blockchain, it will never be possible to carry such micros transaction because of high transaction fee and reduced speed. However, when it comes to moving high-value transactions, speed is not ever a concerning factor, rather parties would be concerned about security. Hence, blockchain would be the most suitable choice for a high-value transaction.

Internet of Things (IoT)

IoT works on the below-mentioned basis principle:

  • IoT network includes a large number of heterogeneous systems — Because of a large number of heterogeneous systems, IoT devices interact a lot on the application layer and network layer and are prone to Denial-of-Service attack (DoS)
  • The memory capacity of IoT devices is limited because of their size — Since the memory capacity is limited, they need to have a constant connection with each other, and they generate a large amount of data.

Although blockchain can solve the problem of security, it will not be able to solve the problem of constant active connection and transaction of a large amount of data between nodes. Because IoT on a blockchain would need the entire capacity of the network the classic blockchain network becomes redundant. The only solution to this problem is DAG. However, if the network is not generating enough transaction volumes it might become vulnerable to attacks as well.

Projects based on Directed Acrylic Graph DLT

IoTA — IoTA was the first crypto project based on DAG. The core of IoTA is the Tangle network. IoTA is not a DAG in a true sense, it is a partial DAG as it imbibes partial Proof of Work in its working. In this, a transaction can be verified by the node making the transaction only if the node validated the last two transactions for double-spending. IoTA offers zero transaction fees best suitable for microtransactions and could prove to be the backbone of IoT in the future. IoTA security is not that great, it is vulnerable to 51% of attack.

Byteball — Byteball tagline is ‘the ledger without middleman’. Byteball is a pure form of DAG. Unlike IoTA Byteball does not provide free transactions. It uses a validator (witness) based approach to tackling the double-spending problem. The witness is basically the most influential node in the network. The USP of Byteball is that it supports private and untraceable transactions. Byteball is secure against 51% attack.

Hathor Network — Hathor network is a utility token for the creation of tokens. There is no transaction fee in Hathor Network, and token creation is very easy without any knowledge of gas or blockchain technology. Hathor Network uses a hybrid of blockchain and DAG. It uses blockchain for security and stabilizing the DAG and side- DAG is used for fast transactions.

Nano — Nano also uses hybrid DAG. It uses a variance of DAG called block-lattice which allows it to leverage the feature of DAG while performing as a traditional blockchain. In Nano, each network on the network has its own can which they can update asynchronously. Each transaction in Nano has two-part, the sender signs the transaction to initiate it and the receiver signs the transaction to receive it. Nano has no transaction fee and is super-fast because of dual confirmation in every transaction.

Other projects based on DAG are IoT Chain and Travelflex.

Conclusion

Directed Acrylic Graph could be the potential candidate for Blockchain 3.0 revolution (Bitcoin is considered Blockchain 1.0 while Ethereum is considered Blockchain 2.0). The solution provided by DAG for solving the scalability issue of traditional blockchain is praiseworthy and an important milestone in DLT history. However, the DAG is still in its infant years. In the days to come, the problem with a centralized witness or using half DAG in hybrid DLT architecture will certainly be challenged. Also, it is far behind in solving the double-spend issue without using a centralized solution. Without the solution of double-spend using a decentralized framework, there can be no decentralized ledger.

--

--

The Cherry Block

Blockchain & Cryptocurrency fundamentals, views and reviews