Blockchain vs. DAG Technology

A quick comparison.

Image for post
Image for post

The Directed Acyclic Graph or DAG, is another form of DLT. Some consider it to be a rival technology to blockchain, others an enabler.

Both blockchains and DAGs record transactions on a distributed ledger, but do so in starkly different ways. In this week’s nakamo.to Knowledge Base article, we’ll be briefly comparing them in terms of how they work, their strengths and their weaknesses.

Structure

Blockchain is a distributed ledger or database, replicated over all the nodes in the network. This distributed ledger is forms a linear chain of blocks of transactions in an unalterable, chronological order. Transactions are bundled into blocks of transactions to be validated. Validated blocks are added to a chain of previously validated blocks.

By comparison, a DAG is a network of individual transactions linked to multiple other transactions. There are no blocks of transactions in DAG networks. If blockchain is a linked list, a DAG is a tree, branching out from one transaction to another, to another and so on.

Consensus

In blockchain, consensus is achieved by validating transactions block by block. Various solutions exist for this, one is theconsensus mechanism that requires users (AKA miners) to race to solve a computationally strenuous problem. Successful validation may earn the miner a fee to be paid by other users.

In a DAG, individual transactions provide validation for one another. Network users are both miners and validators, although they cannot validate their own transactions. This typically means that in a DAG there is little or no need to pay fees.

Pros

Blockchain offers transparency and immutability. It is also relatively well established, being the basis of cryptocurrencies like Bitcoin and of distributed application (Dapp) platforms like Ethereum. Blockchain offers solid guarantees and cost-effectiveness for transactions of medium to high value.

By scaling very efficiently and avoiding or reducing user fees, DAGs are well suited to high volumes of transactions, including micro and nano-transactions. The higher the volume of transactions, the faster a DAG validates them. DAGs also cut out the need for miners and in turn mining equipment — meaning lower energy consumption.

Cons

As blockchain transaction volumes grow, storage and network bandwidth requirements increase. ‘Proof of Work’ can also consume large amounts of computing power and electricity. Mining may become concentrated between just a few big mining users or companies and in the case of big dips in cryptocurrency value, incentive to mine can be destroyed altogether. Just take what happened last week. High transaction fees are also an issue. There are of course different consensus algorithms, but ‘the perfect’ consensus algorithm is yet to emerge (if it ever does).

A DAG has other challenges. A reduction in the volume of transactions may make it vulnerable to attacks. To mitigate against this risk DAG projects have so far included centralised features such as central co-ordinators, pre-selected validator or ‘witness’ nodes or completley private network systems. DAGs have not been able to sustain ‘pure decentralization’ — yet.

What’s best?

Start with your business requirements. Compare possible solutions to see what best meets your needs. Remember that you or your team will need to understand the technology chosen, customer or end-user preferences, and any requirements to cap transaction fees and run distributed applications like smart contracts. Different use cases may then make blockchain or DAGs a better option.

Written by

Co-Founder of . Fascinated by blockchain technology and its potential to shape our future.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store