In year 2010, user RHorning described the idea of selfish mining in the Bitcoin forum bitcointalk. The forum user provided simulation results for the attack, at the time called the mining cartel attack. Later in 2013 the term selfish mining and its formal description was introduced by Cornell researchers Emin Gün Sirer and Ittay Eyal in the paper Majority is not enough: Bitcoin mining is vulnerable.
The selfish mining attack is a method for mining pools to increase their returns by not playing fair.
The selfish miner continues to mine the next block but not broadcast it. They continue to do so maintaining their lead. This way there would be a hidden fork in the blockchain which can only be seen by the selfish miner. When the rest of the network is about to catch up with the selfish miner then the selfish miner releases their portion of solved blocks into the blockchain.
The result is that their chain and proof of work is longer and more difficult so the rest of the network adopts their block solutions and they claim the block rewards.
After introducing selfish mining some further researches showed that more generalized selfish mining strategies could be even more profitable.
for example Theoretical Bitcoin Attacks with less than Half of the Computational Power (draft)
and specially Stubborn Mining: Generalizing Selfish Mining and Combining with an Eclipse Attack
provided a comprehensive generalization of selfish mining and also introduced different names for each of its variations:
Lead Stubborn Mining Strategy
A Lead Stubborn Miner waits until the honest miners catch up with him to broadcast all of his secret blocks as opposed to the selfish miner who does not take the risk of being caught by the honest miners and broadcasts his blocks if his advance shrinks to one block.
j–Trail Stubborn Mining Strategy
trail Stubborn Mining is an amelioration of Lead Stubborn Mining. When a trail Stubborn Miner's private chain falls behind the public chain, they may decide to continue mining on it anyway, in the hope of catching up. We consider a family of trail stubborn strategies parameterized by a threshold j, such that a j–trail stubborn miner accepts the public blockchain only when their private chain falls behind the public chain by j + 1 blocks). So by definition the 1–trail stubborn mining is the same as lead stubborn mining. Here we study only 2–trail, 3–trail and 4–trail stubborn mining since the other trail stubborn strategies can be easily dominated by other strategies.
Equal Fork Stubborn Mining Strategy
An Equal Fork Stubborn Miner waits for the official blockchain to overcome his secret fork by one block. He/she only gives up when the length of the official blockchain is equal to the length of his secret fork plus one.
Of course these strategies are not generally more profitable than the honest mining strategy. For example if you own even a 25% hash rate share of the network (which is usually denoted by α), being a selfish miner would never be more profitable than being an honest miner unless for some reason more than half of the other miners chose to mine on the fork you have created (which is usually denoted by γ).
If you are interested in seeing when you can exploit the network by being a selfish or a stubborn miner in the next section you can find a simulation of these strategies. You can change the sliders and click the simulate button to see that in comparison with an honest miner, which strategy is more profitable and by how much.
This is a simulation based on a random number generator used in the simulation of mining a block, so every time you push the button the results would be a little bit different.
SoIn other words
First you can go back and change the α , γ and n again and click simulate.
Here you can find some information about the mining blocks of different strategies based on your chosen α , γ and n.
| Honest Mining |
Selfish Mining |
Lead Stubborn Mining |
2 – Trail Stubborn Mining |
3 – Trail Stubborn Mining |
4 – Trail Stubborn Mining |
Equal Fork Stubborn Mining |
|---|
| You Published | |||||||
| Others Published | |||||||
| Total Blocks Published | |||||||
| Orphaned Blocks | |||||||
| Total Blocks Mined | |||||||
| Orphaned Percentage | |||||||
| You Published % of all blocks | |||||||
| Others Published % of all blocks |
Here you can find some information about the apparent hash rate, profitability, difficulty changes and attack duration of different strategies based on your chosen α , γ and n.
| Honest Mining |
Selfish Mining |
Lead Stubborn Mining |
2 – Trail Stubborn Mining |
3 – Trail Stubborn Mining |
4 – Trail Stubborn Mining |
Equal Fork Stubborn Mining |
|---|
| Your Real Hash Rate | |||||||
| Your Apparent Hash Rate | |||||||
| Your Profitability Ratio | |||||||
| Difficulty Changed | |||||||
| Difficulty Will Change To | Attack Cycles Duration |
Here you can find the expected theoretical values of the apparent hash rate and profitability ratio of different strategies based on your chosen α , γ and n.
For more information click here
| Honest Mining |
Selfish Mining |
Lead Stubborn Mining |
2 – Trail Stubborn Mining |
3 – Trail Stubborn Mining |
4 – Trail Stubborn Mining |
Equal Fork Stubborn Mining |
|---|
| Your Apparent Hash Rate Would Be | |||||||
| Your Profitability Ratio Would Be |
Although some mathematical formulations for these strategies have been developed before, they usually lack a consideration of the time(duration) of the attack and also the proper analysis of the costs of the attack. For example in Optimal Selfish Mining Strategies in Bitcoin selfish mining strategies are considered to be optimal. The same goes for some textbooks like Bitcoin and Cryptocurrency Technologies and Distributed Ledger Technology: The Science of the Blockchain .
In contrast in year 2018 three articles On Profitability of Selfish Mining , On Profitability of Stubborn Mining and On Profitability of Trailing Mining were published providing a deep and comprehensive study on these strategies.
Let's take a look at some parts of the these articles.
As you know
you should also know
now we define
First of all your Hash Rate ( ) means that we expect in the long term the average proportion of blocks mined by you would be also . Then since you are adapting a selfish or stubborn strategy the average proportion of blocks mined by you could be different than so we define your Apparent Hash Rate ( ) which is a function of and . On the other hand Profitability Ratio ( ) is a function of , , and which is the benchmark for the comparison of different strategies, more precisely, strategy is more profitable than strategy if and only if .
For example profitability ratio of selfish mining strategy ( ) has different values before and after difficulty adjustment:
This fact also holds for apparent hash rate of selfish mining strategy ( ) :
The reason for that as described in the article is:
“The protocol underestimates the real hashing power in the network since only the blocks that are in the (offcial) blockchain are taken into account. The number of orphan blocks grows in the presence of a selfish miner and a signicant amount of honest hash rate is lost. The average time used by the network to validate blocks increases. After 2016 blocks, a difficulty adjustment is done automatically ignoring the production of orphan blocks. Despite the fact that the total hashing power of the network remains the same, the new difficulty is lower than it should be, and the block validation time decreases. So the revenue per unit of time of the selfish miner improves and makes the attack profitable.”
Here you can find profitability ratio and apparent hash rate of different strategies:
( hm | Honest Mining Strategy,
sm | Selfish Mining Strategy,
lsm | Lead Stubborn Mining Strategy,
j–tsm | j–Trail Stubborn Mining Strategy,
efsm | Equal Fork Stubborn Mining Strategy. )
In Equal fork stubborn mining is generating series for Catalan numbers and is the n-th Catalan number
In j–trail stubborn mining and
If you are intrested in these stuff, here is some links for you :
For selfish mining this is probably the best source.
For stubborn mining this is the best source.
For mathematics of selfish mining this is the best source.
For mathematics of stubborn mining this and this are absolutely the best sources.
Do you have any question?
diba.meysami@gmail.com
makh.khosravi@gmail.com