Core concepts

GhostDAG Consensus

I chose GhostDAG for the consensus layer because it solves the orphaned block problem that limits throughput in traditional linear chains. In a standard blockchain, two miners who find blocks at the same time create a fork. One block wins and the other is discarded. In GhostDAG, both blocks are included in the DAG. Work is never wasted.

The k parameter controls how many parallel blocks can be in the same "anticone" (roughly speaking, how many simultaneous block producers the network tolerates). I set k=18 for the Citrate testnet. Kaspa uses k=124 at 10 BPS. We run at 2 BPS on the current testnet hardware. The BFT committee runs on top of GhostDAG to provide deterministic finality at 10-block checkpoints.

From Chain to DAG

In a conventional proof-of-work chain, two blocks mined at roughly the same time create a fork. One block is accepted, the other is orphaned, and the work it represents is wasted. GhostDAG eliminates this tradeoff. Every honestly produced block is incorporated into the ledger, regardless of whether another block was mined at the same moment.

The result is a structure that looks less like a chain and more like a lattice of blocks, where each block references one or more parents rather than exactly one.

Blue Set and Red Set

GhostDAG classifies every block in the DAG into one of two categories:

  • Blue blocks -- blocks that are well-connected to the majority of recent blocks. These are considered honest and contribute to the canonical ordering.
  • Red blocks -- blocks that are poorly connected, indicating they were likely withheld or produced by an attacker. Red blocks are still included in the DAG but carry reduced weight.

This classification is what makes GhostDAG robust against selfish-mining and balance attacks: an attacker's blocks will almost always end up in the red set, neutralizing their influence on transaction ordering.

The k-Cluster Parameter

The parameter k defines the maximum width of the DAG -- how many parallel blocks can be produced in each "layer" while still distinguishing honest miners from attackers. A higher k allows more parallelism but requires more connectivity to maintain security.

Citrate uses k = 18, which means up to 18 blocks can be produced in parallel per round. This value was selected to balance throughput against network propagation latency, targeting a 1-second block interval with comfortable margins for global propagation.

k = 18  -->  ~18 blocks per second
Block interval: 1 second
Finality: ~12 seconds (via BFT checkpoints)

Why Parallel Matters

I think this is the key insight: because blocks are produced in parallel, Citrate achieves transaction throughput that scales with the number of active miners rather than being bottlenecked by a single block producer. This is essential for an AI-native chain where inference requests, model registry updates, and adapter submissions all compete for block space.

Block Ordering

Even though the DAG contains parallel blocks, transactions still need a deterministic total order. GhostDAG achieves this through a topological sort of the blue set, breaking ties using the block's hash. This gives every node an identical view of transaction history without requiring a single leader.

Further Reading