Knowledge Lab · Kaspa basics

What does GHOSTDAG do, in plain words?

Short answer

GHOSTDAG puts Kaspa’s parallel blocks into a shared order. Instead of treating every competing block as something to discard, it lets the network use blocks made at nearly the same time and agree on which transactions count. This makes fast proof of work possible.

GHOSTDAG puts Kaspa’s parallel blocks into a shared order, so blocks made at nearly the same time can contribute to the ledger rather than simply being discarded. It then gives transactions an order, allowing the network to accept valid payments and reject conflicting ones. [1]

Why an order is needed

A payment network needs a way to resolve conflicting payments. If someone tries to spend the same coins twice, nodes need to agree on which payment comes first. The GHOSTDAG paper describes processing transactions in the agreed order and accepting each transaction only if it is consistent with those already accepted. [1]

Bitcoin’s longest-chain rule provides order through a chain of blocks. GHOSTDAG generalizes that approach to a blockDAG, a structure in which a block can refer to several earlier blocks instead of just one. This lets the structure include blocks created in parallel, before their miners had received one another’s blocks. [1]

That matters when blocks are created quickly. Communication takes time, so honest miners can produce competing blocks without doing anything wrong. GHOSTDAG is designed to keep its ordering secure even when block creation is fast compared with the time blocks take to travel across the network. [1]

How it works

GHOSTDAG does not treat every block as equally useful for choosing the order. It builds a well-connected group called the blue set. Blocks outside that group are called red. These are algorithmic labels, not a direct judgment that a miner is honest or dishonest. [1]

In simplified terms, it:

  • Starts from the strongest existing branch, judged by the blue blocks in its history, and inherits its ordering. [1]
  • Examines the other parallel blocks, adding them to the blue group when they fit its rules. [1]
  • Places both blue and red blocks into an order that respects their links to earlier blocks. Red does not mean automatically discarded from the ordering. [1]

The rule uses a parameter called k. It limits how many blocks within the blue group can be unrelated by ancestry to any one member. In plain words, it allows a bounded amount of parallel block creation. [1]

What it guarantees, and what it does not

GHOSTDAG does not make a payment irreversible immediately. Its security is probabilistic: assuming honest participants control most of the mining power and the paper’s network assumptions hold, the chance of an established order changing falls exponentially as time passes. [1]

Nor does keeping parallel blocks mean accepting every transaction inside them. Conflicting transactions still have to be resolved through the agreed order. [1]

A useful detail is why GHOSTDAG exists alongside PHANTOM. PHANTOM searches for the largest suitable group of blocks, a computationally difficult problem. GHOSTDAG uses an efficient, step-by-step selection instead. [1] In Yonatan Sompolinsky’s essay, he calls it “a practical efficient variant of PHANTOM”. [2]

For the underlying design, read the PHANTOM GHOSTDAG paper. [1] For a view of it operating, watch Sompolinsky discuss a live block visualizer in the Bitcoin Takeover interview at 1:43:26. He emphasizes that the system uses proof of work, without a committee choosing the blocks. [3]

Sources

  1. PHANTOM GHOSTDAG: A Scalable Generalization of Nakamoto ConsensusPaper · Research paper
  2. In which I run with the GHOSTs of my hometown*Website · Essay by Yonatan Sompolinsky on hashd.ag · November 24, 2020
  3. S16 E41: Yonatan Sompolinsky on Bitcoin, Kaspa & Proof of WorkTalk · Chapter “GHOSTDAG visualizer”, from 1:43:26 · August 21, 2025

Checked on

All answers