What is a directed acyclic graph in cryptocurrency? How does DAG work?

Published at: Nov. 7, 2021

DAG vs. Blockchain

Blockchains and DAGs both record transactions on a distributed ledger, albeit through different means. 

Below is a quick comparison of the two in terms of benefits and drawbacks:

Pros of DAG

Suited for microtransactions and high volumes of transactionsEliminates the need for mining equipmentFees may be reduced significantlyLower energy consumption

Cons of DAG

Vulnerable to attacks due to low volume of transactions Still in its infancy; has not yet sustained high levels of decentralization 

Pros of blockchain

Well-established and widely-used by cryptocurrencies like Bitcoin and EthereumTransparent and unalterable, highly-secureCost-effective for high-value transactions

Cons of blockchain

Demanding storage and network bandwidth requirementsLarge amounts of power consumedHigh transaction fees

At the end of the day, deciding on which model to use will depend on one’s business objectives. As we discussed, each model has its strengths and weaknesses, and either one can be more applicable depending on your requirements.

What is the role of DAG in blockchain?

DAG can be seen as a viable alternative to blockchain, although it still requires further fine-tuning. The DAG model seeks to improve common issues with blockchain technology such as cost, speed and scalability. 

Technically, both technologies record transactions on a digital ledger and work towards the same goal. The differentiating factor between the two of them is mainly the structure each model uses to store data.

What crypto uses DAG?

It used to be unimaginable to think of cryptocurrencies without thinking of blockchain. With the DAG model, however, several cryptocurrencies have already been built using this technology. 

Some examples are Obyte, IOTA, and Nano, to name a few. Although still relatively new, the DAG framework shows great potential. As mentioned, some projects have already used it successfully. The most well-known ones are:

Obyte

Obyte or ByteBall is a cryptocurrency that is completely independent of the blockchain, having implemented the DAG framework. However, Obyte transactions still have a fee. 

This is because the Obyte network utilizes a validator system that allows for double-checking of transactions. It makes use of a consensus algorithm that relies on witnesses. These witnesses are trusted and reputable users who act as validators. 

Obyte also supports untraceable transactions, as well as unreachable contracts. 

IOTA

Internet of Things Applications, or IOTA, implemented its ‘blockless blockchain’ network in 2016. The idea behind IOTA is that all users effectively become miners. To validate one transaction, for example, a user has to verify two transactions. 

IOTA uses a network composed of nodes and tangles, or groups of nodes, that serve to make the validation process faster and more efficient. 

All users contribute a small amount of power for the network’s maintenance, and everybody participates in executing consensus as well. This allows the network to be highly decentralized and scalable at the same time.

Transactions have near-zero fees; hence, IOTA is considered a cost-effective alternative cryptocurrency for micro-payments. 

Nano

Nano is also a cryptocurrency operating on the DAG system. Nano has independent blockchains connected by nodes and is called block-lattice technology. Technically, it’s a mix of DAG and blockchain.

Every user has an individual wallet and a blockchain. Only the user can execute changes on their own wallet/blockchain. Transactions are completed once the sender and receiver both perform operations on their respective blockchains. 

Nano offers zero transaction fees, as well as high transaction speeds to its users.

What are DAGs used for?

The DAG model seeks to address two perceived weaknesses of blockchain technology, namely, decentralization and scalability. It seeks to improve security and usability as well. 

How so?

On the Bitcoin blockchain or Ethereum platform, miners can only create one block at a time. Hence, new transactions can only be validated when the previous one is completed. The DAG model eliminates these blocks, adding transactions directly to the blockchain. 

With the elimination of blocks, the DAG model won’t require mining. This means less power is required to support the network. DAGs also have several advantages, such as:

High transaction speeds unencumbered by block creationNo miners mean no transaction fees as wellLess energy consumption and environmental benefits compared to mining

Currently, though, the use of DAGs in crypto is still in the early stages. Unlike blockchains, they are still not fully decentralized. As such, they are primarily used for getting networks started, and not yet as a system that can be used to build a stable network.

How does a DAG work?

As mentioned, a directed acyclic graph is more efficient at data storage. Its structure is tree-like, with interconnected nodes as its ‘branches.’ 

Since each node can have more than one parent root, the model allows for more transactions to be validated simultaneously. This is because users do not have to wait for transactions to complete before processing a new one. 

So in a directed acyclic graph, each new transaction has to reference previous transactions before getting accepted into the network. This is no different from how blocks on a blockchain also reference previous blocks. The rationale behind this is that a transaction can only be successfully confirmed when it is referenced by another transaction, and so on. 

In a DAG, each vertex represents a transaction. There are no blocks, so mining is also not required. Transactions are built on top of one another instead of gathering them into blocks. Then, as previously mentioned, proof-of-work tasks are done whenever a node submits a transaction, to validate prior transactions and avoid spam. 

By principle, new transactions are built on top of older ones in a DAG-based cryptocurrency. The main difference with blockchain is that in a DAG, multiple transactions can be referenced, instead of just one at a time. 

Some systems have an algorithm that selects ‘tips’ or transactions to build on based on accumulated weight (or the number of confirmations leading up to the tip). 

Double-spend protection in DAGs works with nodes confirming older transactions by assessing a path tracing back to the DAG’s first transaction. This confirms whether or not the sender has sufficient balance. Should a user build on an invalid path, then that transaction is at risk of being ignored. 

Conflicts resulting from multiple paths are resolved via a selection algorithm that favors tips that have a heavier accumulated weight.

What is a directed acyclic graph (DAG) in crypto?

A directed acyclic graph or DAG is a data modeling or structuring tool typically used in cryptocurrencies. 

Unlike a blockchain, which consists of blocks, directed acyclic graphs have vertices and edges. Thus, crypto transactions are recorded as vertices. These transactions are then recorded on top of one another. Similar to a blockchain, however, transactions are also submitted to the DAG via nodes. Proof-of-work (PoW) tasks are required of nodes to submit a transaction. 

Simply put, whereas a blockchain system looks like a chain, DAG’s system looks more like a graph. The DAG model is currently seen in the industry as a possible substitute for blockchains in the future due to its efficiency in data storage and processing of online transactions. 

The DAG model is seen as a possible solution to the current decentralization issue in crypto. With this model, miners will not have to compete for new blocks to add to the chain. 

With nodes developed simultaneously, transactions can likewise be processed faster. Developers are eyeing DAG as a better, more secure solution that can improve a network’s usability once it becomes more scalable.

Tags
Related Posts
What the SEC can learn from the German regulator
The United States Securities and Exchange Commission’s chairperson Gary Gensler announced this month that the crypto industry should not escape the purview of the regulator. He highlighted that decentralized finance (DeFi) trading and lending protocols need particular attention when it comes to investor protections. Regulation can extend into a menu of options that covers custody, reporting, counterparty verification and asset classification and issuance. Reports are surfacing that people are waiting with bated breath on how the SEC will regulate the DeFi industry, but Germany's Federal Financial Supervisory Authority, also known as BaFin, has found a way to apply existing securities …
Technology / Aug. 12, 2021
Our Man in Shanghai: Huobi to become Grayscale of Asia, Yao Ming’s NFT wine and more ...
This weekly roundup of news from Mainland China, Taiwan and Hong Kong attempts to curate the industry’s most important news, including influential projects, changes in the regulatory landscape, and enterprise blockchain integrations. Huobi Asset Management is looking to be the Grayscale of Asia with the launch of four cryptocurrency-related tracker funds. The funds include a Bitcoin Fund, an Ethereum fund, a multi-asset basket of digital currencies, and a private equity fund for mining businesses. The aim is clearly to entice major institutional investors into the space with a product that feels familiar. The fund and asset management company is set …
Technology / April 30, 2021
Socios to launch fan token for major Ukrainian esports organization
Natus Vincere, a Ukrainian multi-game organization, has announced plans to launch a fan token on blockchain-based platform Socios. According to a Nov. 4 announcement, the token will enable a number of new fan engagement opportunities, including the right to vote in polls as well as the chance to earn unique rewards linked to the organization. The maximum supply of fan tokens will be capped at 5 million coins, with a limited number of tokens available at a fixed price of $1. An initial flash sale is expected to take place in the coming months, Socios said. Following the flash sale, …
Technology / Nov. 4, 2020
Cellebrite Launches Crypto Tracer Solution to Track Illicit Transactions
Digital intelligence firm Cellebrite has launched its “Cellebrite Crypto Tracer” solution. The new offering is powered by CipherTrace and aims to trace illicit cryptocurrencies involved in money laundering, terrorism, drugs, human trafficking, weapon sales and ransomware schemes. The suite of tools will be available to investigators, analysts and non-technical agents who want to lawfully obtain evidence and trace criminals who use cryptos like Bitcoin (BTC) through the darknet. Citing figures from an Oxford University study, Cellebrite states that an estimated $76 billion worth of illegal activities involve Bitcoin. Curating millions of information references to trace transactions The Cellebrite Crypto Tracer …
Technology / July 28, 2020
From DeFi year to decade: Is mass adoption here? Experts Answer, Part 2
Yat Siu of Animoca Brands Yat is the executive chairman and co-founder of Animoca Brands, which delivers digital property rights to the world’s gamers and internet users, thereby creating a new asset class, play-to-earn economies and a more equitable digital framework contributing to the building of the open Metaverse. “2021 was the year of NFTs, and in the second half of the year, we saw a growing emphasis on GameFi. This trend will continue well into 2022. Real mass adoption of DeFi will happen via GameFi, which will explode in growth during 2022 as the potential for mass financial inclusion …
Decentralization / Dec. 22, 2021