Caduceus DAG Consensus Mechanism’s New Algorithm (Part 1)

8 min readJul 19, 2022

“Performance” is one of the top blockchain trend words for 2022, driven by the need for ecological growth in the blockchain. The performance bottleneck of the majority of blockchain systems is now noticeable, although technical development continues to make significant strides.

In this essay, we want to address three questions: What are the security benefits of the DAG’s ledger consensus SPECTRE protocol? How can a high scalability balance be attained? How may multi-threaded asynchronous parallel computing be accomplished?

To do this, we look at the optimization and upgrading of the blockchain’s basic structure using the bottleneck of the existing consensus mechanism, and the algorithm innovation of the DAG consensus mechanism of Caduceus as examples.

DAG structure

Directed Acyclic Graph (DAG) is a block structure and in general, the DAG structure means that each block has more than one pointer, which can point to multiple blocks and form a directed acyclic graph structure. It is not a specific type of technology, but it uses different methods and the same code name to solve different problems.

DAG however, cannot be seen as a singular technology. DAG may be used in the alliance chain, the PoS public chain, and the public chains for PoW. The particular technical aspects of using DAG to these various issues vary greatly as well. Although this is an entirely separate technology from DAGs in public chains, some side chain solutions even claim the usage of DAGs. DAG may be seen in all parallelizable circumstances.

Differences between PoW, PoS, DPoS and DAG

BTC and ETH use a simple yet very efficient strategy. Before broadcasting, the nodes first self-certify their credentials, however there is the issue of computational resources for self-certification despite the fact that the communication demand between networks has been significantly decreased. Their effectiveness is mostly influenced by block size and manufacturing rate and low TPS is caused by the sluggish block creation pace, which is necessary to avoid bugs and the block’s limited capacity for transactions.

By utilising the quantity of tokens (or storage capacity and other indications) as the weight basis and a distributed method to choose each checkpoint node, PoS implements a technique akin to classic distributed consistency verification. The benefit of this technique is that no self-certified independent program using computational resources is required. The drawback is that each election will place a lot of strain on the network that has many nodes, and it is simple to produce outcomes in excessive centralization.

By lowering the number of chosen nodes, DPoS — a PoS version — lessens the network burden. All nodes are split into leaders and followers, and the followers are only informed of the leaders’ decisions when the leaders have reached an agreement. This is a classic divide and conquer technique. Without increasing the amount of processing resources, this approach can successfully lower network congestion. A situation with a set number of witnesses serving as candidates for accounting, however, it’s not appropriate. Additionally, the chosen witness nodes’ representativeness is weak in a situation with a limited number of network nodes.

Due to the drawbacks of the aforementioned consensus technique, DAG replaces the chain checkpoint synchronisation approach with an asynchronous mechanism. However, DAG also carries out global operations according to the sequence of operations since it lacks a fundamental consistency confirmation mechanism (such as a ledger or log system). In the long term, however, DAGs are a highly innovative and intriguing mechanism that opens up new possibilities for advancements in the area of conventional data administration.

The effect of DAG structure on performance

The number of bifurcations that the network can support is indicated by the bifurcation coefficient, or k. The whole network is prohibited from forking at k=0. The blockchain is the network that prohibits splits.

Ethereum also meets these criteria since, although having forked blocks, these blocks are solely used to gauge the weight of the main chain and will not ultimately be added to it (the transaction data recorded by the blocks is not included in the main chain). The DAG network’s k value has to be an integer bigger than 0. Therefore, from a structural perspective, the blockchain is a unique and simplified DAG, and the DAG is an extension of the blockchain structure.

DAG is an asynchronous accounting technique that may significantly increase TPS, or the rate at which information is processed across a network. The blockchain is a robust synchronous accounting network, which necessitates that all nodes simultaneously record the same information. The blockchain network’s capacity to handle information is often constrained by this need, resulting in reduced TPS. So what form of consensus is used in this forking-capable asynchronous ledger network?

DAG may be thought of as a network topology that permits bifurcation, and the bifurcation coefficient k determines the number of possible bifurcations. Block production may happen more quickly on a network that supports forking than it can with broadcast.

As a result, DAG enables nodes in the network to simultaneously record several pieces of data. On the one hand, more transactions are bundled into a given amount of time. On the other hand, when a block A is broadcast by the whole network, a forked block B is also broadcast by the entire network. These two factors work together to give DAG the traits of high concurrency and poor synchronisation.

Block generation consensus for DAG may be equivalent to that for blockchain. POW is one such instance. The block generation time may be set extremely quickly since forking is permitted. Blockchain and block consensus are not always the same. To process transactions at very fast rates, the IOTA project, for instance, immediately stops the process of packing and producing blocks and publishes to the network as soon as a transaction happens (each block in the DAG graph is not a block but a pen transaction). How does the DAG prevent nodes from acting maliciously and adhere to the time specifications in comparison to the processing mode of the blockchain’s single structure?

In reality, it is impossible to eliminate network latency in the actual operation, and this delay will result in forks. You must make sure that no new blocks are created during the network delay time period t, that is, k=0, in order to prevent forks. It is crucial to understand how the k value is defined. The security of the network will be compromised by too many forks if the k value is too big; on the other hand, if it is too little, the network performance will be constrained and the TPS will decrease. For instance, a network with k=0 is the blockchain. K is often set to 3 in a DAG to strike a compromise between performance and security.

How to judge if a block is generated by a node? First find the set of anti-ones of this block. If the number of intersections between this set and the subset S of the k-cluster of the DAG is less than or equal to k, the block is generated by an honest node and will be added to the subset S, and vice versa. Blocks generated by attacking nodes will not be added to the set.

All blocks that are appraised after being filtered through the whole iteration process will be included in this subset S. Currently, S is referred to as the biggest k-cluster subset, or MSCk, and the ledger will reflect the total number of blocks. So, how can multi-threaded asynchronous parallel computing be implemented?

When k=0, the PHANTOM rule is the longest chain consensus of Bitcoin. Like the SPECTRE protocol, the PHANTOM protocol is an extension of the longest chain consensus. The difference with SPECTRE is that PHANTOM’s strictly ordered ledger consensus is also applicable to networks with smart contract requirements.

How SPECTRE resolves conflicting transactions.

Through inter-block voting, SPECTRE removes transactions that disagree with one another. Transaction “x” happens before transaction “y,” which is recorded as xy, according to the transaction information recorded in block “X,”. Meanwhile transaction “y” occurs before transaction “x,” which is recorded as yx, according to block “Y.” These two transactions are in opposition to one another.

Voting process:

Block X and Block Y can vote for each self respectively.

The blocks generated after block “X” are called future blocks of “X”. Looking back at these future blocks, we find that 6, 7, and 8 can only be traced back to “X”, so these three blocks all vote for X and are marked in blue. Similarly, the future blocks of backtracking block “Y” find that 9, 10, and 11 can only vote for “Y”, marked in red.

The outcome of block 12 will be the same as the previous round of voting since it goes back to both “X” and “Y”. The previous vote round is shown by the dotted line in the graph. The outcome of the vote is “X” in accordance with the minority following the majority principle.

The prior blocks of “X” or “Y” are the blocks created before “X” or “Y”. These blocks will vote for the option that has received the most votes after tallying the votes of the subsequent blocks that correspond to them. Blocks 1 through 5 are all voted in favour of “X” as a consequence, and the transaction “xy” is regarded as legitimate while “yx” is ignored.

According to the “longest chain consensus,” the blue block will be added to the ledger since the chain 5->6->7->8 is longer than 9->10->11.

Let’s now adopt a new perspective and decide between two transactions that contradict, such as 6<10 and 10<6, using the SPECTRE principle.

Because block 6 votes for itself and because block 7 and block 8 can only be traced back to block 6, blocks 6, 7, and 8 vote for block 610. The future of 5 votes for the former block, and the future of 6 votes for the previous block. Block 5 votes in favour of 6<10, and it stays with blocks 6, 7, and 8. By example, the voting for blocks 9 to 11 will be 10<6.

Blocks 1 through 4 all come after blocks 6 and 10. Let’s consider the number 4 as an example. In its subsequent blocks, votes for 6 and 10 will be cast in the following order: 5, 6, 7, 8, 10, 11, and more. The remaining 1–3 will likewise be decided by a 6<10 vote. In the end, the majority is made up of the blocks that received votes of 6<10, the blocks that received votes of 10<6 are ignored, and the information from 10<6 is deemed invalid.

Finally, a consistent answer may be obtained using SPECTRE and “Longest Chain Consensus.” Under this blockchain framework, it is essentially a condensed form of SPECTRE, and under the DAG structure, SPECTRE is the extension of “Longest Chain Consensus.”

DAG technology is generally a helpful addition to the blockchain, and its asynchronous communication mechanism has clear advantages in terms of improving scalability, cutting down on confirmation times, and lowering transaction fees. DAG technology will continue to advance the decentralised technology space in the future.

Conflicting transactions may be excluded by SPECTRE, and it can fend against assaults. Because it can only do a relative ordering of conflicting transactions (determining the order), the smart contract function SPECTRE cannot be integrated because it is unable to provide an absolute ordering for all blocks.

Timing is a necessity for smart contract operations, and the two key components that make up the core network are the consensus process and underlying ledger structure. Time for blockchains is built into the chain structure of the underlying ledger by default, but for DAGs that support “forking”, timing can only be accomplished via ledger consensus, and because SPECTRE lacks time, it cannot be utilised as a smart contract.

In order to solve the problem of blockchain projects’ poor performance, Caduceus has created new technologies from existing ones and accelerated the growth of the metaverse sector. The DAG consensus mechanism’s path for application innovation has finally been opened up after a protracted period of labour. See part 2 for more details.

Join the community:









Caduceus Metaverse Protocol — Providing an open blockchain platform for Metaverse development. Join the community —