DAGs or Directed Acyclic Graphs are a mathematical and computational construction that would allow the creation of distributed systems and networks with many functional similarities by those offered with blockchain technology.
Lto creation of technology blockchain by Satoshi Nakamoto It was an unequaled technological revolution, and since then, many developments have attempted to position themselves as the next big step, one of those attempts being DAGs.
Abbreviations DAY means Directed Acyclic Graph o Directed Acyclic Graph, is a construction known in the mathematical and computer world for many years. In fact, they are older than blockchain technology by far. But they have recently captured attention due to the technical possibility of building identical distributed systems as those currently created using blockchain technology.
Interesting don't you think? This “unknown” and exciting technology is understood by some people as a tool capable of offering us the functionality of the blockchain, also promising important improvements. But what is true in all this? What are DAGs really? What are its origins? Are DAGs really the evolution of blockchain technology? Why didn't Satoshi Nakamoto in all his awesomeness use them in the first place? We will answer these and other questions below.
NFT Elementary Course
Basic levelIt is clear that nothing will be the same from the NFTs, and therefore it is essential to know all the basic aspects that this type of token contains.
What is DAG and what is its origin?
First of all, you should know that DAGs are not a new concept. In fact, DAGs have been known since the development of Graph Theories in mathematics and which were later used in computing due to their enormous utility in this field. As we discussed, when we talk about DAG we are talking about a graph with two very interesting properties: are directed and acyclic. But what does this mean?
First, a graph is directed, when all the nodes (or vertices) that are part of the graph are connected by edges that indicate a well-defined direction.
Second we speak of acyclic graph, when we are before a graph where there are no travel cycles for it. In other words, it is impossible to go from one vertex of the graph, go through the rest of its vertices and end at the vertex where the route started.
Thanks to these basic concepts, we can then say that:
A directed acyclic graph, or DAG, is a finite directed graph with no directed cycles. This means that its vertices are connected by edges with a specific direction and the route of the entire graph takes us from point A to point B, without having the possibility of returning to point A in any way.
The study of this type of structures began in 1878, when James Joseph Sylvester, a renowned English mathematician, began his studies of graphs. Since then, Graph Theory has been devoted to studying and classifying these types of structures especially useful in mathematics, physics, computing, linguistics, and other areas of science.
Mathematics and graphs What does this have to do with cryptocurrencies?
Now that you know the origin and concept of a DAG, you are probably wondering, how does all this relate to cryptocurrencies and blockchain? How can we use a DAG to do the same as with blockchain?
Well, both questions are very valid, and the answers are equally valid and will give you a new perspective on how the blockchain can or could evolve. To do this, imagine the following:
A blockchain or blockchain is what its name says: information that grouped in sets is related in an orderly and cryptographic way with the previous set. And such a relationship cannot be broken at any previous point in the chain without immediately overriding the next blocks.
Something like what is shown in the following graph where we see a chain without modification in its history and another with modification in said history.
Well, this structure of joining blocks in a specific way to create with them an unchangeable history, and that in case it is modified, a fork is generated (as shown in the graphic above), we can also do it with a DAG.
For that, look at the following example:
If you look closely you will see that there is a relationship between the vertices (which in blockchain are blocks) and that relationship is given by the edges (the hash and Merkle Root of the blocks on the blockchain). If in the DAG we modify an edge, whatever it may be, its relation is rewritten, generating a new DAG, and therefore a different history (a fork in the blockchain).
This other modified DAG, is a bifurcation or rewriting of the DAG from the original exercise, and shows us that it is possible to recreate the same relationship given in the blockchain, using this type of graph.
DAG Properties
Now DAGs have certain properties that are vital for them to work as they are:
- They have a starting point (origin) and an arrival or end point (sink). When directed, this ensures that our route always goes from a point of origin to an end point, and we cannot return on that route. If the construction of this structure is applied consecutively, we will be creating an incremental history within the DAG, just as it happens in a blockchain.
- Modifying a relationship between vertices rewrites the entire DAG, because its structure and weight have varied. This is equivalent to if we modify a block on the blockchain, the result is a different blockchain from that point onwards.
- They are parallelizable. A DAG can have parallel generation and paths of different value between different vertices. This optimizes its generation and the ability to verify the relationship between the vertices and the information they may contain.
- They are reducible. A unique property of DAGs is that their structure can be reduced to an optimal point where their path meets all the relationships specified in it without any loss. Basically it means that it is possible to reduce the relationships of the vertices (or blocks) to a minimum point where such reduction does not affect the ability to verify the information of any vertex at any time. This is especially useful for example in light wallets o SPV.
DAG vs Blockchain Which is better?
Now, since we know what DAGs are, their properties and that they can do the same job as a blockchain, we can ask ourselves the question which is better?
Well, the answer to this is complex and answering it depends on taking several things into perspective. First. Although the blockchain structure can be considered, even today with more than 10 years after its creation, an experimental technology, DAGs are a technology that is currently highly experimental in the context of cryptocurrencies.
On the other hand, creating a mining and consensus system is much more complex in a DAG. The way in which blocks can be generated, create relationships between them, reduce these relationships without losses, among other functions add a higher level of algorithmic complexity.
This greater complexity also leads to programming errors or failures in the structuring of the operation of the system. And if there is something worse than a serious software error, it is a failure in the structure of a system that involves completely altering its operation to repair it, and if that is possible.
It is possible that Satoshi Nakamoto had seen and addressed this problem and instead decided to design a much simpler and equally effective solution, thereby creating the blockchain. Without a doubt, this is something that we will never know, since there is no public record of it.
Pros and cons
Pros
- In a DAG a node can issue and validate a transaction by itself. To achieve this, the transaction and its validation must be linked and add verification to at least two previous transactions within the DAG.
- They are highly scalable due to the decentralized and parallel form of their operation. This is possible because the transactions in a DAG are independent. Equally independent are the validation processes for it.
- Transactions in a DAG create a scheme known as "Double Committed Transactions." This means that under any scheme, a transaction with only two confirmations can be given as irreversible, a fact, which can take a few seconds thanks to the parallel work of the network.
- There are no miners in the DAGs, so there are no payment of fee or commissions of great value. Thanks to the cryptographic ease of validation and its high performance, the node's profits from the confirmed transactions are recovered by the total volume of transactions attended among other services that the node can provide.
Cons
- Developing DAGs is complex, especially due to its complex consensus algorithm and the protections necessary to prevent its weak parallelism from being exploited.
- DAGs require coordination systems. These coordination systems become a point of failure that can negatively affect the operation of the network.
- Many DAG projects do not use secure cryptographic tools and this opens the doors to attacks. This was presented in the famous cryptocurrency IOTA, where the network's cryptographic protections were bypassed by an online seed generator. The attackers used this generator to gain access to IOTA users' funds and steal their money. In total, more than $ 10 million was lost to this attack.
- The use of weak cryptographic techniques makes the generation of addresses practically non-existent, this being a serious privacy problem.
DAG use cases
Currently there are several projects that use DAG technology to present real and functional options in the form of cryptocurrencies. Some of these projects are:
Ethereum
The mining algorithm of EthereumThe known Ethash (or Ethash Dagger-Hashimoto, as he is also known), makes use of DAGs to create a complex data structure that can currently reach 4-5 GB of data. This structure is created by the Dagger algorithm, designed by Vitalik Buterin, and its objective is to provide a mining base for the Hashimoto algorithm.
IOTA
IOTA is a cryptocurrency project aimed at the world of IoT (Internet of Things), which promises thanks to its DAG, fast, very cheap transactions and unmatched scalability. The project was launched in 2016, aiming to offer the billions of devices connected to the Internet of Things a solid and scalable infrastructure to transmit value.
Since then it has stood out for its interesting proposal. However, it has been negatively affected by serious security problems that have affected its users and have led to the loss of some 50 million dollars, an important sum that represents around 10% of its current market capitalization.
Obyte
Obyte is a project also focused on generating cryptocurrencies and other services integrated into a DAG. The project dates from 2016 and was presented in Bitcointalk. It is a small project, with a market capitalization of around 12 million euros. However, despite this, the value of its token is $ 17 USD and its supply is limited to 1 million coins. This makes Obyte a token with a strangely high market value. It is used, above all, in Russia (where its creator, Anton Churyumov is from).
Introductory course to DeFi
Medium levelTime to update. Traditional finance has changed, discover the revolutionary ecosystem of decentralized finance (DeFi).