Guide: What is Directed Acyclic Graph?

Kript Team
kriptio
Published in
4 min readJan 20, 2019

Introduction to DAG

In computer science and mathematics a directed acyclic graph (DAG) is a finite directed graph with no cycles. In other words, it’s a graph where everything flows in the same direction.

  • Directed: It implies that the links between all the nodes have the same direction.
  • Acyclic: It means that cycles are not possible, so that transactions cannot loop back on themselves after linking to other transactions.
  • Graph: The term graph stands for topological sorting, where the nodes are connected to each other with edges in a certain order.
Directed Acyclic Graph

DAG components:

  • A node with no parents
  • Nodes with no children
  • Nodes, where data is stored
  • Directed edges, where links go only one way

DAG features:

  • Data structure is similar to tree-like file directory structure
  • Cannot be cyclical
  • Can go only in one direction
  • The same node can never be encountered for the second time
  • Edges can be connected to more than one edge

DAG vs blockchain

DAG is a relatively new technology that appeared as an alternative to the blockchain architecture. It is more technologically advanced comparing to the blockchain, though it’s also not free from drawbacks. In general, DAG is much like blockchain as it is composed of a network of nodes confirming transactions. The main difference between DAG and blockchain is in data structure. DAG doesn’t need blocks. Instead of holding data in blocks, it provides a kind of chain, where transactions are linked from one to another and identified by their hashes. Besides, unlike the blockchain, DAG does not need miners to confirm each transaction, as within DAG the nodes themselves become miners and only transactions for the two closest nodes are to be verified. Therefore, the process of transaction confirmation is much more lightweight and transaction fees are reduced to zero.

DAG advantages:

  • Higher throughput. Blockless nature of DAG provides quick transactions. In DAG validation is parallelized which leads to higher throughput.
  • Infinite scalability as increase of the network size leads to increase in transaction speed.
  • Lower transaction fees as there are no miner fees.
  • Better solution for micro transactions due to fee structure.
  • Increased decentralization as there is no influence of large mining pools over the network.

And the main DAG disadvantage comparing to blockchain is that it needs a lot of traffic to start operating.

Examples of implementation

IOTA — an open-source distributed ledger meant to power the future of the IoT with feeless microtransactions and data integrity for machines. IOTA uses its own data structure called Tangle and based on DAG instead of blockchain. It allows multiple transactions to be verified simultaneously. This is simpler and more flexible than the classic blockchain technique of bundling transactions into blocks that can only be validated in a rigid, linear way, one block at a time. IOTA’s DAG data structure allows for the network’s easy scalability. Everyone is participating in reaching a consensus and, therefore, the more people are using IOTA, the faster the network becomes.

Byteball — a platform for payments and smart contracts, allowing for private transactions and a messaging system. It utilizes DAG instead of blockchain or blocks. Transactions do not have to connect in a straight chain, they are linked to multiple previous transactions and form a DAG structure.

COTI — the world’s first DAG protocol optimized for creating decentralized payment networks and stable coins. The core component of COTI’s infrastructure is a proprietary consensus algorithm based on machine learning called Trustchain. The Trustchain lies on a multi-DAG data structure which drives up scalability, processing over tens of thousands of transactions per second. The goal of the project is to revolutionize crypto adoption by becoming the base layer upon which future decentralized solutions will be built.

Fantom — the world’s first DAG-based smart contract platform solving the issue of scalability and confirmation time of the existing blockchain technology.

Perlin — the first practical, trustless and decentralized cloud computing marketplace that leverages underutilized compute power in everyday smart devices to make supercomputing economically viable and accessible globally. Perlin’s compute layer is bootstrapped on top of it’s DAG-based ledger unlocking a plethora of underutilized compute resources from everyday devices.

Content kript.ioShare with your friends if you enjoyed this postDownload Kript on AppStore and GooglePlayFollow us on Telegram, Facebook, Twitter

--

--