DAG (Directed Acyclic Graph) — A competitor to Blockchain!

DAG:

Directed Acyclic Graph (DAG) is an outline which is more expressive than an absolutely linear model. A DAG is an information or data structure which can be utilized to demonstrate diverse problems. It is an acyclic graph in topological ordering. Each directed edge has a certain order followed by the node. Every DAG starts from a node that has no parents and end with one that has no kids. These graphs are never cyclic. A DAG comprises of a set of nodes and arrows where arrows are directed from one node to another.

In simpler terms, DAG is a graph that flows in one direction and elements cannot refer back to themselves. Hence, DAGs are not cyclic.

DAG’s components:

  • Nodes or Vertices. Every node represents some information.
  • Arrows or Directed edges. A coordinated edge starting with one node to another depicts some sort of connection between those two nodes. Arrows in a DAG may not frame a cycle.
  • A root node. One of the nodes will have no predecessor. This is the base of the DAG. It is also called a zero node.
  • Leaf node. Some nodes will have no assessors. These are called leaves or leaf nodes.

DAGs in Cryptos:

Did you hear the term DAG coins and thought it’s a name of a new crypto? If yes, then you are probably close to the idea… Actually all digital coins that make use of DAG (directed acyclic graphs) are called DAG coins.

The basic purpose of blockchain based cryptocurrencies was to provide a decentralized, scalable, robust and a fast replacement for financial transactions across multiple mediums. As a matter of fact, all the credit for such a revolutionary idea goes to blockchain. But, is blockchain efficient enough to provide all of this?

Well, not so far. Blockchain has limitations in speed-TPS and scalability- size of the block, Interoperability, and Sustainability.

Many crypto makers are now looking forward to implement DAG instead of blockchain to achieve a different work structure than that of blockchain. DAGs can enable multiple nodes to exist at the same time for recording transactions while in blockchain only one block is used for recording transactions (two blocks cannot exist simultaneously) at a time and a new block is created about every 10 minutes. The blockchain system based on POW slows down due to the miners competing over mining every next block.

DAG can overcome the single chain issue of blockchain by enable multiple chains to exist on the system simultaneously. It may make block less distributed records another standard in the realm of crypto.

DAG or Blockchain:

Blockchains sequential structure hinders significantly the transaction throughput. If the time of mining remains untouched a DAG of blocks can extend the storage by X times with X blocks on the network at the same time. The blend of blockchain with DAG still originates from side-chains. Distinctive sorts of transactions are running on various chains all at the same time. DAG of blocks still depends on the idea of blocks.

It is different from Blockchain. Blockchain is actually a cryptographically verifiable list of records of things that have happened in the past. It has a linked list data structure and every new entry is linked to the previous one such that you can verify it back to the beginning of history. This is how the blockchain is established. This flat sequential nature is the drawback that is apparent in Bitcoin. That is when the scaling issues arise. Even if you increase the size of the block or increase the speed of the new blocks’ creation making it more rapid, still there are a lot of trade-offs.

DAG based cryptocurrencies actually suggest to turn to a completely new data structure altogether. DAG is a completely different form of data structure. It follows a linked graphic data structure where the links are unidirectional. Acyclic means that the nodes cannot refer back to themselves and hence cannot loop. It simply acts as a flow chart where all information is flowing in one direction. It can have multiple parallel nodes that might join back at a single node. You may also relate it to a file directory structure.

The benefit is that every node and arrow does not need to be sequential by nature.

Differences that exist in DAG are:

  • Due to its block less nature, the transactions run directly into the DAG networks hence the speed of transactions increase.
  • There are no miners on DAG systems. The approval of exchanges goes straight to the exchanges themselves. This implies exchanges occur instantly.
  • As assumed, the DAG network picks an existing later exchange to connect to when new transactions occur. The objective is to keep the system width inside a specific range that can ensure speedy transaction approval.
  • DAG will be utilized for applications that require adaptability for thousands of exchanges every second.

Merits/ Advantages of using DAG:

  • More flexible and communicative.
  • No transaction fee
  • Higher scalability
  • Everyone is responsible for both issuing and validating transactions.
  • Network can easily scale
  • More adoption and usage
  • Valuable in machine-to-machine interactions
  • As the size of the network increases, the speed increases too.
  • Quantum resistant

Detriments/ Disadvantages of using DAG:

  • Needs a lot of traffic for its functioning
  • Decrease in network traffic enhances the network’s vulnerability to attacks
  • Transaction propagation latency
  • Accumulation of unconfirmed transactions
  • Centralized nature
  • Unproven at a large scale

Implementation Examples:

  • In Ethereum, a DAG is created in every epoch using a version of the Dagger-Hashimoto Algorithm combining Vitalik Buterin’s Dagger algorithm and Thaddeus Dryja’s Hashimoto algorithm.
  • The Dagger algorithm works by producing a directed acyclic graph with ten levels including the root and a total of 2²⁵ — 1 values.
  • Ancestry trees are actually DAGs.

Some major projects implementing DAG are:

IOTA:

One of the most commonly known DAG coin is IOTA. They call their DAG Tangle. It removes miners completely from the verification process. For broadcasting every transaction you have to validate two previous transactions in order to get their transactions processed. Everybody is participating in the consensus which makes it even more decentralized. The name itself refers to the term IoT- internet of the things.

MIT disclosed a number of mistakes in this data structure and functioning. IOTA would take only 33% of the network power (number of nodes and some amount of PoW attached to every transaction) in order to generate an attack. In such a small network, that IOTA is currently, it won’t be very hard to achieve. Currently, they have a central system to validate all transactions which are claimed to be only for the time being but it eliminates decentralization from the system. Currently, people claim that IOTA is slow to use. That’s because they don’t have enough full nodes out there to process all the transactions. The network still needs to grow enough to become effusively decentralized.

BYTEBALL:

It uses a DAG in the place of a traditional Blockchain. Their main net has been out longer than that of IOTA and is similarly a DAG based coin. It has a native currency called Bytes but it does not completely get rid of transaction fee as IOTA does. They have transactions fees implied to avoid scams. Their data structure is very similar to that of IOTA. Here the difference is that you have to pay a fee which will be awarded to the 12 witnesses who are responsible for verifying all the transactions. It eliminates the need to have everybody involved in the verification process. They allow you to achieve more than what you could achieve with IOTA. It has a conditional payment platform is not very robust. They have their privacy coins on the network as well for those who prefer privacy. They have enabled instant messaging systems in their wallets too. It still lacks decentralization as all the validation will be done by the 12 witnesses who will know the real-life identities of people as well. They are trying to achieve too much at once which might end up worse. This implementation of DAG is only of a centralized computerized payment system.

NANO:

It is an almost instant, fee-less and infinitely scalable medium for transactions. It also has no miners hence no transaction fee. It has public non-shared ledgers. Every individual has their own block (similar to blockchain) which they verify themselves. This implements PoS called “Balance of vote”. It is an open source project. They have no pre-miners and no ICOs. They have their network and wallet established. The hashing Algorithm this uses is SHA3/Blake2, ED25519 elliptical curve. It is providing unlimited transaction throughput with zero network fees. The problem is that they have a small team hence it is not well developed. This coin is innovative but implements new technology which could produce its own set of problems as it scales.

FANTOM:

Fantom claims the world’s first DAG based smart contract. It implements the architecture of DAG in the distributed ledger technology. It resolves the issue of speed and scalability present in today’s blockchain based smart contracts. It can enable 300,000 transactions per second with fee less than a cent. The transactions will be made asynchronously with instant confirmations. It is aimed to be infinitely scalable. This system will have a lot of bonuses and transparency for trust. It has broad applications in the current market from food-technology to IoT. They call their DAG Opera Chain. It supports verification of people, community management and financial services etc. They use Fantom Virtual Machine (FVM) which will allow executive smart contract bi-code efficiency across all operating systems. The project aims to improve on newer blockchain platforms that are also DAG-based such as IOTA, Nano, Byteball etc. These platforms improve on current blockchain scalability as nodes are designed to process transactions asynchronously.

Fantom differentiates itself by incorporating smart contract DAPP infrastructure into a DAG-based platform so that it offers instant payment, near zero cost (under $0.01 from one wallet to another), and infinite processing scalability.

We do not have any knowledge of the successful implementation of DAG as claimed by many projects though it is promising and looks useful for the crypto ecosystem.


Originally published at www.reddit.com.