Authors: Joachim Neu, Ertem Nusret Tas, David Tse
The Avalanche Attack on PoS (Proof-of-Stake) GHOST (Greedy Heaviest Observed Sub-Tree) combines selfish mining with equivocations. The adversary uses withheld blocks to displace an honest chain once it catches up in sub-tree weight with the number of withheld adversarial blocks. The withheld blocks are released in a flat but wide sub-tree, exploiting the fact that under the GHOST rule such a sub-tree can displace a long chain. Only two withheld blocks enter the canonical chain permanently, while the other withheld blocks can subsequently be reused (through equivocations) to build further sub-trees to displace even more honest blocks. The attack exploits a specific weakness of the GHOST rule in combination with equivocations from PoS, namely that an adversary can reuse 'uncle blocks' in GHOST, and thus such equivocations contribute to the weight of multiple ancestors. Formal security proof of PoS GHOST seems doomed.
For details, see the proof-of-concept implementation code, the detailed description, and the illustrations below.
A proof-of-concept implementation is provided in ghost-avalanche-attack
. It provides settings to simulate the attack for vanilla PoS GHOST and the Committee-GHOST variant proposed for PoS Ethereum.
(By "vanilla PoS GHOST" we mean a one-to-one translation of GHOST from proof-of-work lotteries to proof-of-stake lotteries. In that case, every block comes with unit weight.)
We plot a snapshot of the block tree (adversarial blocks: red, honest blocks: green) resulting after 100 time slots. The attack is still ongoing thereafter, and as long as the attack is sustained, no honest blocks remain in the canonical chain permanently.
- Adversarial stake: 30%
- Initially withheld adversarial blocks: 4
- Adversarial stake: 20%
- Initially withheld adversarial blocks: 12
Selfish mining and equivocations can be used to attack PoS GHOST (using an 'avalanche of equivocating sub-trees rolling over honest chains'---hence the name of the attack). The following description is for vanilla PoS GHOST, but can be straightforwardly translated for Committee-GHOST. Variants of this attack work for Committee-GHOST with Proposal Weights as well.
Suppose an adversary gets
In that moment, the adversary releases the
At the same time, ties are broken such that honest nodes from now on build on what was the second withheld block. This is crucial, as it allows the adversary to reuse in the form of equivocations the withheld blocks 3, 4, ...,
As an overall result of the attack so far, the adversary started with
The process now repeats (cf Figure 4 below): The adversary has a bunch withheld blocks; whenever honest nodes have built a chain of weight equal to the withheld blocks, then the adversary releases a competing sub-tree of height 2; the chain made up from the first two released withheld blocks is adopted by honest nodes, the other block production opportunities can still be reused in the future through equivocations on top of it and thus remain in the pool of withheld blocks of the adversary.
If the adversary starts out with enough withheld blocks
PoS Ethereum's LMD (Latest Message Driven) aspect interferes with this attack.
We illustrate the attack using a slightly simplified example where the adversary starts with
First, the adversary withholds its flat-but-wide sub-tree of
Figure 1:
Once honest nodes reach a chain of length
Figure 2:
Note that the adversary can reuse blocks 3, 4, 5, 6. Honest nodes build a new chain on top of 2 -> 1 -> Genesis. Once that new chain reaches length
Figure 3:
Finally, note the adversary can reuse blocks 5, 6. Honest nodes build a new chain on top of 4 -> 3 -> 2 -> 1 -> Genesis. Once the new chain reaches length
Figure 4:
Honest nodes now build on 6 -> 5 -> 4 -> 3 -> 2 -> 1 -> Genesis. All honest nodes so far have been displaced. Overall, the adversary gets to displace