In this paper, we provide a new theoretical framework of pyramid Markov processes to solve some open and fundamental problems of blockchain selfish mining under a rigorously mathematical setting. To this end, we first describe a more general blockchain selfish mining with both a two-block leading competitive criterion and a new economic incentive, and establish a pyramid Markov process to express the dynamic behavior of the selfish mining from both consensus protocol and economic incentive. Then we show that the pyramid Markov process is stable and so is the blockchain, and its stationary probability vector is matrix-geometric with an explicitly representable rate matrix. Furthermore, we use the stationary probability vector to be
able to analyze the waste of computational resource due to generating a lot of orphan (or stale) blocks. Nextly, we set up a pyramid Markov reward process to investigate the long-run average profits of the honest and dishonest mining pools, respectively. Specifically, we show that the long-run average profits are multivariate linear such that we can measure the improvement of mining efficiency of the dishonest mining pool comparing to the honest mining pool. As a by-product, we build three approximative Markov processes, related to the pyramid Markov process, when the system states are described as the block-number difference of two forked block branches. Also, by using their special cases with non network latency, we can further provide some useful interpretation for both the Markov chain (Figure 1) and the revenue analysis ((1) to (3)) of the seminal work by Eyal and Sirer (2014). Finally, we use some numerical examples to verify the correctness and computability of our theoretical results. Note that the pyramid Markov (reward) processes can be applied to open a new avenue in the study of blockchain selfish mining from a perspective of normative computing, thus we hope that the methodology and results developed in this paper shed light on the blockchain selfish mining such that a series of promising research can be produced potentially.