Abstract:Blockchain,the underlying technology of Bitcoin,has been widely deployed in many systems including the cryptocurrency,supply chain system due to its transparency,unforgeability and immutability.However,the most of the blockchain platforms such as the Bitcoin are facing the security problems including selfish mining attack,which cause serious effects to the development of blockchain technology.Selfish mining is a kind of strategy in the blockchain technology where selfish miners increase their profit by selectively publishing hidden blocks.Utilizing the central limit theorem and node state transition diagram to establish two probability models in theory,then we use Markov stochastic process and function extremum method to figure out the optimal relative profit.Meanwhile,the simulation experiment of selfish mining is designed and conducted,and the relationship between node computing power and profit in selfish mining is obtained,so as to further verify the rationality of the above models.