Yotam Gafni

@yotamyachmoorgafni

“The selfish mining fallacy” explained and debunked

A few months ago Craig Wright went into a tirade regarding Selfish mining. In this analysis I will let alone his style which is artistic to say the least. Calling selfish mining ‘a cancer’ is an unhinged exaggeration that also makes it hard to regard his argument seriously.

Reminder — Selfish mining is a mining strategy where the miner / mining pool strategically chooses when to submit his blocks to the public chain, rather than submitting them immediately upon discovery. In this way the miner is able to cause the other miners to work ‘for nothing’ on obsolete chains, enlarging his overall share of the mining revenue.

Trying hard enough, you can extract two main arguments from Craig Wright’s writing on the subject, which I actually find interesting, but unsupported with facts once you dive into them. I will present them now.

Argument I: Bitcoin probabilities are not IID

Craig Wright’s original argument was against the above depiction of the Selfish mining probabilities in the original article. He claimed that after the selfish miner gained 1 stealth block in advance over the rest of the miners, they still have worked for all the time that took him to mine this 1 block, so the probabilities going out from state 1 are changed — the rest of the miners are more probable to mine the next block now then they were before. This however doesn’t hold as bitcoin mining attempts are in fact IID, as summarized in the Rizun←>Wright bet. More here.

Argument II: The orphaned blocks

What Craig Wright claims is that while Selfish mining increases the share of the selfish miner revenue out of overall miner revenue, the overall cake grows smaller so he ends at a loss because of the lost computation time and energy over orphaned blocks. His argument actually holds until difficulty adjustment, which takes around two weeks.

It is true and a bit awkward that the original selfish mining article does not address this point, but only quickly talks about it being irrelevant once the difficulty adjustment is set in place. I will extend their calculation to show the effect of the orphaned blocks on miner’s revenue in the first period before difficulty adjustment and we will see that it is negligible in the grand scheme of things.

In the original article we have:

We add to it a count of the orphaned blocks, whether mined unnecessarily by the selfish pool or by the others -

It’s named ‘revenue’ though no one earns block rewards on these blocks, but it is revenue in the sense that it is the lost revenue when selfish mining happens.

Now, when we want to calculate the selfish miner’s revenue before the difficulty adjustment -

Reminding that after difficulty adjustment we have -

Assuming γ=0, the worst network propagation behavior for the selfish miner, we have for

α = ⅓ — First round revenue share is 13/51, subsequent rounds revenue share is ⅓

These numbers are his share of the overall mined blocks, so it is adjusted for orphaned blocks and ‘wasted’ computation.

α = 0.4 — First round revenue share is 0.341, subsequent rounds revenue share is 0.484

α = 0.49 — First round revenue share is 0.48, subsequent rounds revenue share is 0.896

Now, Putting some dollar values on it, say for α=0.4

source — https://digiconomist.net/bitcoin-energy-consumption

The selfish miner costs are $54,711,016 for the first 2-weeks period.

His revenue, in bitcoins translated to Dollars would be $67,590,087

So, he’s at a profit actually even in his ‘losing’ streak —that’s because mining is profitable in general.

For the second 2-weeks period, his cost would still be $54,711,016

But now his revenue would be $95,935,431.

All in all he would come out with a profit of $54,103,486.

If he was to play nice, his first month profit would have been less — $49,148,928.

I will conclude that unless Craig Wright comes up with something truly astonishing in his promised math analysis, which is now almost a year overdue, the best of his arguments as I could extract from his writings on the subject are null and void.

A good question is why then selfish mining didn’t happen in reality yet. While I don’t have the answer for it, I will suggest that playing selfish mining is similar to playing betrayal in the Prisoner’s dilemma. While playing cooperation is best for everyone, playing betrayal is the Nash equilibrium under the conditions of the Prisoner’s dilemma — a significant one being that the prisoners can not communicate. In the case of selfish mining, if a large pool was to try this tactic, and carry everyone to use it too, the impact would be enlarging costs for all miners while not earning anything for himself. While it’s not clear how easy it is to detect selfish mining, a reasonable assumption with the amount of attention the Bitcoin blockchain is receiving that it would eventually be discovered. A prudent player would probably not go for it, but “Greed can blind the wise man”, so who knows, we might live to see it happen eventually.

More by Yotam Gafni

Topics of interest

More Related Stories