A selfish mining attack, also known as a block withholding attack, describes a malicious attempt to discredit blockchain network integrity. Selfish mining attacks occur when an individual in a mining pool attempts to withhold a successfully validated block from being broadcast to the rest of the mining pool network. After the selfish miner withholds their successfully mined block from the group, they continue to mine the next block, resulting in the selfish miner having demonstrated more proof-of-work compared to other miners in the mining pool. This allows the selfish miner to claim the block rewards (and financial rewards) while the rest of the network adopts their block solutions.
A selfish miner will maintain their own private chain, and publicly reveal it opportunistically in order to obtain greater rewards that would normally be granted based on their actual contributions (Hashrate) to the mining pool. It is possible for multiple participants in a mining pool to engage in selfish mining behavior during the mining process.
The minimum profitable threshold, using the Markov chain model, has been demonstrated to be symmetric around 21.48% if two miners in a pool are engaging in profitable selfish mining. Research using Markov chain models demonstrates that two selfish miners are profitable after 51 rounds of difficulty adjustments (approximately 714 days for Bitcoin) if both their hashrates are 22% (which is slightly higher than the profitability threshold of the mining pool which is 21.48%), and are profitable after 5 rounds (approximately 70 days for Bitcoin) of difficulty adjustment if their hashrates are 33%. Profitable selfish mining becomes more difficult to successfully execute as the number of selfish miners in a mining pool increases, and/or the miners choose to increase their selfish mining hashrates because there is a negative correlation between the profitable time of selfish miners and their mining power.
Two possible solutions have been proposed to prevent selfish mining attacks from occurring on blockchain networks. The first is to randomly assign miners to branches of the blockchain when a fork occurs, and the second is to set threshold limits for mining pools on the network that would prevent selfish miners from gaining a signifiant advantages over other miners operating on the network.