The Codex — Technical Grimoire

What is a BlockDAG?

A Block Directed Acyclic Graph (BlockDAG) is a generalization of the blockchain where each block can reference multiple predecessors. Instead of a single chain, the structure forms a DAG — a graph with directed edges and no cycles.

This allows:

The PHANTOM Protocol

PHANTOM solves the ordering problem in BlockDAGs. Given a DAG of blocks, PHANTOM:

  1. Identifies a k-cluster — the largest set of blocks where each block is connected to all but at most k others
  2. Uses this cluster as the “honest” set
  3. Orders blocks by giving priority to cluster members

The parameter k relates to the network’s block creation rate and propagation delay, capturing how many parallel blocks honest nodes might create before seeing each other’s work.

The DAGKnight Protocol

DAGKnight advances PHANTOM by removing the need to set k in advance:

The Kaspa Implementation

Kaspa is the first production implementation of a BlockDAG with PHANTOM/DAGKnight consensus:


Explore the full technical documentation at vProgs.xyz or BlockDAG.xyz.