I believe there are various attacks (not exactly the same) that result in a miner / miners causing the hashrate to drop, and since they get the same reward as with everyone mining at full hashrate, they are incentivized to do it.
Ya the typical idea of selfish miner, is you have "one" miner who has like 30-40% of the hashrate of the network and thus can mine a few blocks ahead of others and cause the others to give up mining because they keep getting orphaned. This lowers the total hashrate and gives these selfish miners more reward per block. If they keep mining at this low rate, and this gets detected and rewards get modulated downward, then there would be less of an incentive to do that. Maybe better actually if reward was exactly proportional to hashrate. So 40% hashrate means 40% reward. Also, it doesn't have to be one miner, it can be multiple miners colluding to do this attack.
Another possibility all miners (like 95%) agreeing to mine at a lower hashrate since that way they get the same reward per block at a lower energy cost. Isn't this the classical game theory strategy where the best long term solution is to work together to make things easier? It can also be non-voluntary and due to pressure such as governments increasing the cost of electricity, as is happening in Washington State right now. If all governments double electricity costs, wouldn't that in principle cause the potential hashrate to halve, and then suddenly the centralized governments use their extra capacity to carry out a quick 51% attack? With lower rewards for less than peak hashrate, there is incentive to keep pushing for the peak hashrate to make sure there is no "spare" hashrate just waiting to be deployed for a 51% attack.
Also, in the reddit post about this (
https://www.reddit.com/r/Bitcoin/comments/7e04ov/why_has_there_been_no_selfish_mining_attack_on/) gmaxwell/nullc said an interesting thing:
Selfish mining costs you income now in exchange for lower difficulty in the future, if your relative share of the total network hashrate is falling it's easy to be in a situation where it would lose you money.
So if network hashrate keeps rising (share of selfish miner's hashrate is falling) then it is not profitable, but once we start seeing falling hashrate, it may become more realistic, so we should watch out.
Also Peter Todd said there are attacks more effective than selfish mining, but I am not sure what he's talking about.
@ranochigo says
The network cannot know what the hashrate is at any point of time. The network approximates this based on the last 2016 blocks for the difficulty adjustment. It would be incredibly inaccurate if the sample size decreases as blocks could be found within seconds of each other.
For every 144 blocks, you take the time of block 144 minus the time of block 0 (can use medianTimePast to protect against inaccurate timestamps). Add up the work for those blocks. Take the work divided by time. Then for the next 144 block period use that as the "current hashrate"
Actually, to be more conservative, I would recommend modulating only the miner fees and not the subsidies, and then slowly the reward will be dominated by fees, so there will be a slow transition with this effect. I need to think still of a way this could be done as a softfork, as that would be easier than a hard fork. For example you can set a rule that miners can only take fees * h / p from the fees (easy soft fork), with some standard rule for determining where to put the difference of fees and fees * h / p.