What is a Meta-DAG?
(Any views expressed in the below are the personal views of the author and should not form the basis for making investment decisions, nor be construed as a recommendation or advice to engage in investment transactions.)
TL;DR
A "Meta-DAG" is a type of hybrid DAG introduced by Zenon Network (NoM), the feeless Layer 1 blockchain.
Meta (from the Greek μετά, meta, meaning "after" or "beyond") is a prefix meaning "more comprehensive" or "transcending".
DAG is a kind of data structure – like a database that connects different pieces of information together.
A Meta-DAG refers to the dual ledger architecture of NoM. The Meta-DAG contains a transaction ledger with proof-of-work links and a consensus ledger that relies on vote-weighted proof of stake, a proof of work incentivization scheme, a difficulty oracle, and a super-quorum selector. Here is what it looks like in practice.
Are DAGs "filled with bullshit"?
@JCP (Joseph Poon), co-author of the Lightning and Plasma whitepapers had some interesting thoughts about DAGs in 2018.
"DAG research is a potential area of research with scalability. I do warn that DAG is basically filled with bullshit.... in a very upfront way. Anyone that claims to do DAG is BSing you. An example of that is IOTA which straight up doesn't work. If IOTA worked we would have had cryptocurencies 20 years ago. That's not to say DAG is broken. There is a lot of interesting DAG research but it is a challenging problem and often times requires deposits and constructions around that. It's an awesome area of research. Probably a year away, at the minimum. But a lot of interesting opportunists around these scalability issues."
What is a DAG?
Before we dig into a Meta-DAG, let's first explore a traditional DAG. DAG stands for Directed Acyclic Graph. It is a kind of data structure, like a database, that connects different pieces of information together.
DAGs look something like the image above. They are made up of vertices (the spheres or transactions) and the edges (the lines connecting them).
- Directed because they head in one direction (you can see this illustrated with the arrows).
- Acyclic (i.e., not cyclic) because the vertices don't loop back on themselves – if you start at one point and follow the graph, you can't return to that same point.
- Graph because we have vertices (blocks) and edges (references)
These structures are generally used to model data. You might rely on a DAG in scientific or medical fields to observe the relationship between variables and to determine how they impact each other. For our purpose, we're more interested in how they can help to achieve consensus in a distributed cryptocurrency network.
How does a "Traditional" DAG work?
Traditional DAG-based cryptocurrencies are made up of transactions. There is no notion of blocks and mining is not required to extend the database. Rather than gather transactions into blocks, each transaction is built on top of another. However, a small Proof-of-Work operation is done when a node submits a transaction to ensures the network isn't being spammed and to validate previous transactions.
For a new transaction to be added and acknowledged, it must build on top of older transactions. A bit like how a block in Bitcoin references the one that came before it, but in a DAG multiple transactions are referenced.
In some DAGs, such as IOTA, the algorithm will select which transactions (or "tips") a new transaction must build on. Tips with the most accumulated weight, measured by confirmations on the path, are more likely to be selected. Users are more likely to confirm transactions with a "heavier" weight so that the system keeps growing. Otherwise, there would be nothing stopping users from continuously building on older transactions.
How does a "Traditional" DAG prevent Double Spend?
Nodes confirm older transactions by traversing a path back to the DAG's very first transaction to be sure that the sender has a sufficient balance. There could be multiple paths, but only one needs to be verified.
If users build on an invalid path, they run the risk of their own transaction being ignored. Theirs could be legitimate, but because the previous one wasn't, no one will want to extend that particular path.
Is it possible to end up with multiple branches that aren't aware of each other allowing for a double spend?
That is possible, but it can be resolved with a selection algorithm that favors tips with a heavier accumulated weight. Over time one branch will be stronger than the rest. Weaker branches will be abandoned, and the network will continue building on the heaviest one.
What is a Meta-DAG?
A Meta-DAG is a type of dual ledger architecture unique to Zenon Network. The architecture consists of two ledgers: a transaction ledger and consensus ledger.
The transaction ledger is a block-lattice where each user has their own dedicated blockchain. These individual blockchains are called “account chains”. The account chains consists of actual transactions appearing in the network that are settled: send, receive and zApp related transactions. Every user has an account chain that is independently updated from other account chains as the virtual voting progresses.
Transactions in the user account chain will be emitted to Sentinels before being sent to Pillars for consensus. Sentinel nodes prove the receipt of the transaction by adding a small PoW computation and other additional data (e.g. digital signature, metadata), then they relay that transaction to another random sentinel node, forming PoW links. A minimum of three hops are required with an upper bound dynamically imposed by a difficulty parameter. When the PoW link is complete, the transaction is sent to a pseudorandomly chosen consensus node called a Pillar Node.
The consensus ledger is a simple ledger with blocks that reference transaction from the account chains. The consensus mechanics include a vote-weighting function based on proof of stake, an incentivization scheme based on proof of work, a difficulty oracle and a super-quorum selector.
Every five minutes 30 unique Pillars are selected to validate blocks called Momentums. Momentums are created every 10 seconds. Momentums are grouped into epochs for consensus.
As time progresses Pillars incorporate transactions into the consensus ledger but initially mark them as not decided. The reason is that a user can make a double spend and disseminate it to two different representatives. After a number of epochs, all the Pillar nodes will detect with high probability the double spend transaction and they will vote only one to remain in the ledger.
Some of the concepts of the Meta-DAG as outlined in the whitepaper and described herein are not in production yet. For example:
- Sentinels and PoW links
- Dynamic Plasma
- Vote-weighted proof of stake
- Proof of work incentivization scheme
The community developers are working towards implementing these features in 2023.
Conclusion
A Meta-DAG is a type of hybrid DAG used by Zenon Network to determine consensus in trustless distributed ledger. The system design leverages two ledgers: a block lattice for user transactions and a consensus ledger to finalize transactions. In 2018 Joseph Poon thought DAGs were "full of bullshit". Is that still the case?
The Meta-DAG builds on traditioned DAG architecture to deliver speed, security, and decentralization unmatched by any other cryptocurrency project at the time of writing.
Member discussion