{"id":11325,"date":"2020-08-18T14:44:19","date_gmt":"2020-08-18T09:14:19","guid":{"rendered":"https:\/\/bitcoinik.com\/?st-import=709fc1b8b2041131d37d29ca0cc6a76c"},"modified":"2020-08-18T14:44:19","modified_gmt":"2020-08-18T09:14:19","slug":"directed-acyclic-graph-dag-explained","status":"publish","type":"post","link":"https:\/\/bitcoinik.com\/?p=11325","title":{"rendered":"Directed Acyclic Graph (DAG) Explained"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you talk about cryptocurrencies, the first thing that comes to your mind is the use of Blockchain Technology or Distributed Ledger Technology. Bitcoin was the first cryptocurrency that came into existence that used Blockchain technology. After Bitcoin, many other cryptocurrencies came into existence and were built on similar network architecture.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Blockchain Technology, a new block is added to the chain of blocks. Each block is connected through a cryptographic link. These blocks will have recent transactions that have been broadcast by the users.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is a certain amount of waiting period between a transaction being broadcast and its inclusion into the block. Based on the size of the block and the number of pending transactions, the waiting time may differ from seconds to hours for the transaction to be confirmed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It provides high-level security, as it does not depend on any centralized coordinator. But, blockchain technology has an expiration date and it also faces scalability issues. Hence, detractors believe that these issues in blockchain technology will prevent its mass adoption.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some of them believe that the future of the cryptocurrency payment network relies on a different architecture called the Directed Acrylic Graphs (DAGs).&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s understand more about what is DAG, how it works, and much more.&nbsp;<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_91 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#What_is_Directed_Acyclic_Graph_DAG\" >What is Directed Acyclic Graph (DAG)?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#How_does_it_work\" >How does it work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Cryptocurrencies_using_DAG\" >Cryptocurrencies using DAG<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#IOTA\" >IOTA<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Nano\" >Nano<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#ByteBall_Obyte\" >ByteBall (Obyte)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#DAG_Vs_Blockchain\" >DAG Vs Blockchain<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Mining\" >Mining<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Transactions\" >Transactions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Data_Structure\" >Data Structure<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Validation_of_Transactions\" >Validation of Transactions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Time_of_Launch\" >Time of Launch<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Cryptocurrencies_using_the_platform\" >Cryptocurrencies using the platform<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Advantages_of_DAG\" >Advantages of DAG<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Disadvantages_of_DAG\" >Disadvantages of DAG<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/bitcoinik.com\/?p=11325\/#Final_Word\" >Final Word<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_Directed_Acyclic_Graph_DAG\"><\/span><strong>What is Directed Acyclic Graph (DAG)?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Directed Acyclic Graph is a synonym for Distributed Ledger Technology (DLT). The data structure of DAG is different which connects different pieces of information together. DAG helps solve various problems such as data processing, finding the best route for navigation, scheduling, and data compression.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/I-E-k6ywoRDE7IYux2Amd_-3cksD-R-J8cv3Fgshy9vIcy8yPESopcZ0MzDTatxtElf3RnfaqEL4qMXb7VSlb-BlNyXcjnrT4q098M4pe0OfhDEoCtgsQ-GymKFLTKSB1X4QCclv\" alt=\"Directed Acyclic Graph (DAG)\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Directed Acyclic Graph looks similar to the above image. The DAGs are made up of vertices and edges. The direction of the lines heads in one direction as shown in the image above. They are acyclic, which means that the vertices don\u2019t loop back on themselves. It means that if you start at one point in the graph, you cannot return to the same point. Such data structures are used in the scientific or medical field to analyze the connection between variables and determine their impact on each other.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_does_it_work\"><\/span><strong>How does it work?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In a DAG-based cryptocurrency, each vertex will represent a transaction. DAG does not use blocks to store information, instead, it uses a node or a group of nodes which are developed simultaneously. A small proof-of-work operation is done when a node submits a transaction. When a new transaction is to be added, it is built on the older ones.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/images.slideplayer.com\/15\/4719862\/slides\/slide_4.jpg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say Alice creates a new transaction, so as to acknowledge it, this transaction should reference the previous ones. In some systems, there are algorithms to select on which transaction a new transaction must be built. The transactions that Alice will build on top are still unconfirmed. But, once Alice references them, they will be confirmed.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, Alice\u2019s transaction will be unconfirmed until someone else will build on top of it before it\u2019s accepted. Users will usually confirm those transactions which are heavier in weight so that the system keeps growing.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">DAGs will prevent double-spending. When a node confirms an older transaction, they test the whole path, with DAG\u2019s very first transaction to make sure that the sender has sufficient balance. There are multiple paths involved, but only one path will be verified.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the users build an invalid path, then they will be in the risk of their own transaction being ignored. Even though the user\u2019s path is legitimate, the previous one may not be, as a result of which, none of them will want to extend that particular path.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cryptocurrencies_using_DAG\"><\/span><strong>Cryptocurrencies using DAG<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cryptocurrencies built on DAG are very few but they are growing day-by-day. Among various cryptocurrency projects using this framework, let\u2019s have a look at the famous currencies which are IOTA, Nano, and ByteBall.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"IOTA\"><\/span><strong>IOTA<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Internet of Things Applications (IOTA) was invented in 2016 and it was among the first start-ups to implement the \u201cblockless blockchain\u201d. IOTA uses a network of nodes and a group of nodes to fasten up the validation process. In IOTA, the users have to verify two transactions themselves.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Everyone will participate in executing a consensus and will also contribute a small amount of power to maintain the network. Hence, the network will have a high level of decentralization with proper scalability.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Nano\"><\/span><strong>Nano<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nano is another cryptocurrency built on the DAG system. This currency is independent of blocks and uses nodes to connect. It uses a technology called block-lattice which is a combination of the DAG-based framework and the traditional blockchain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Nano, each user who has an individual wallet will get a blockchain and only the user can operate changes on it. To complete a transaction, both the sender and the receiver should perform an operation on the blockchain.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ByteBall_Obyte\"><\/span><strong>ByteBall (Obyte)<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ByteBall does not use blockchain technology, instead, it is built on the DAG model. Also, it doesn\u2019t provide zero-fee transactions, because the network uses a validator system to cross-check the transactions on the blockchain. The consensus algorithm relies on reputed users who act as validators.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"DAG_Vs_Blockchain\"><\/span><strong>DAG Vs Blockchain<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let\u2019s see how DAG differs from blockchain and why is it more advantageous than Blockchain.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Mining\"><\/span><strong>Mining<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the blockchain, participants mint new tokens using different consensus mechanisms. While in DAG the previous transactions will validate the succeeding one to achieve consensus.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Transactions\"><\/span><strong>Transactions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the blockchain, the scalability and transactions per second are limited. Whereas in acrylic graphs, the scalability and transactions per second are high.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Data_Structure\"><\/span><strong>Data Structure<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The data in the blockchain is structured in blocks in order of transactions which are validated by miners in the ecosystem. In DAG, the data structure follows the directed acyclic graph mechanism where each transaction is independent.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Validation_of_Transactions\"><\/span><strong>Validation of Transactions<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&nbsp;<\/strong>In the blockchain, the miners will have the power to postpone a transaction or they can cancel the transaction. While in a Directed Acyclic Graph, the success of the present transaction relies on its ability to validate the previous two transactions.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Time_of_Launch\"><\/span><strong>Time of Launch<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Blockchain was launched in 2008. Whereas DAG came into existence in 2015.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Cryptocurrencies_using_the_platform\"><\/span><strong>Cryptocurrencies using the platform<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Top cryptocurrencies like Bitcoin and Ethereum use blockchain technology. Whereas currencies like NXT, IOTA, Nano, and ByteBall use the DAG system.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Advantages_of_DAG\"><\/span><strong>Advantages of DAG<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>DAG offers efficient scalability and reduces user fees.<\/li><li>They are well suited for high-volume transactions, including micro and nano transactions.<\/li><li>The speed of DAG validation depends on the transaction volume.<\/li><li>DAG requires lower energy consumption, as it does not require miners and mining equipment.&nbsp;<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Disadvantages_of_DAG\"><\/span><strong>Disadvantages of DAG<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>If the transaction volume is smaller, then DAG may be vulnerable to attacks.&nbsp;<\/li><li>DAG has not been purely decentralized yet.&nbsp;<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Word\"><\/span><strong>Final Word<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The DAG model will become the Blockchain 3.0 after the Bitcoin and Ethereum revolutions. But deciding whether DAGs or Blockchain is the superior technology depends on the application. Different use cases will use blockchain or DAG as their better option. But neither of the systems can replace each other.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you talk about cryptocurrencies, the first thing that comes to your mind is the use of Blockchain Technology or Distributed Ledger Technology. Bitcoin was the first cryptocurrency that came into existence that used Blockchain technology. After Bitcoin, many other cryptocurrencies came into existence and were built on similar network architecture.&nbsp; In the Blockchain Technology, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":11332,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17,19],"tags":[],"class_list":["post-11325","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain","category-crypto-education"],"acf":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts\/11325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11325"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=\/wp\/v2\/posts\/11325\/revisions"}],"wp:attachment":[{"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinik.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}