## 4 A Case Study
### Selfish Mining in Public Blockchains  
The problem of selfish mining in public blockchains (see, e.g., [44; 45; 46; 47; 48]) arises when a minority mining pool adopts a strategic approach to maximize its rewards at the expenseof other miners. This attack strategy involves the mining pool keeping its successfully mined blocks private, creating a fork in the blockchain. Meanwhile, honest miners continue to mine on the public chain, unaware of the pool's private branch. As the selfish miners discover more blocks, they strengthen their lead on the public chain and continue to keep their blocks secret. When the public branch approaches the pool's private branch in length, the selfish miners reveal blocks from their private chain to the public one, causing the public chain to become the shorter branch and their private chain to become the longer one. This results in a waste of resources for honest miners and can lead to a higher number of forks in the blockchain, impacting its performance and security. The selfish mining attack is a significant concern in blockchain systems and requires careful analysis and consideration to develop more robust and efficient solutions. In the rest of this paragraph, we introduce a PEPA model tailored for the analysis of the selfish mining attack. The model we are about to delineate represents a generalization of the one outlined in [26]. In contrast to the assumptions made in [26], where all miners possess identical computational capabilities for both mining and verification phases, we extend our model to accommodate variations in miners' computational powers. Consequently, the rates at which miners mine or verify blocks may differ. This adjustment mirrors a more realistic configuration of the blockchain state, enabling us to delve into real-world scenarios with greater precision and relevance. It is important to note that the case study presented in this paper is different from the one discussed in [26]. Our focus encompasses an examination of how the verification time influences the effectiveness of the selfish mining strategy. This consideration becomes particularly significant in the context of the evolving landscape of blockchain technology, notably with the advent of smart contracts. As outlined in seminal work [45], the impact of verification time on selfish mining strategies may not be negligible, rendering our model applicable to a broader spectrum of scenarios. Our investigation specifically centers on the relationship between verification times and the advantages gained by selfish miners. To elaborate further, we present a PEPA model designed for a blockchain network utilizing a Proof-of-Work (PoW) consensus mechanism. This model accounts for a coalition of fair miners alongside a single selfish miner. Each miner, denoted as \(M_{i}\), operates with an individual computational power represented by \(\gamma_{i}\) and verifies blocks with a time frame following an exponentially distributed pattern, with a mean duration of \(\beta_{i}^{-1}\). In Table 1, we report the specification of a network composed of \(K\geq 3\) fair miners. Let us inspect the behavior of a single fair (verifying) miner, say \(M_{1}\). Miner \(M_{1}\) initiates block mining with action type \(m_{1}\) at a rate of \(\gamma_{1}\), subsequently returning to its initial state to commence mining another block. Upon receiving a block from the network via an activity \((m_{j},\top)\) where \(j\in\{2,\ldots,K\}\), \(M_{1}\) enters the verification process, moving to state \(V_{1}\). Notice that, when \(M_{1}\) announces a block, according to the operational semantics of PEPA, \(m_{1}\) is received by all miners except \(M_{1}\). Thus, all miners moves to state \(V_{1}\), while \(M_{1}\) is still mining. Now, according to the synchronization operation, all miners in \(V_{1}\) synchronize on \(\{v_{1}\}\), and the block is verified at a rate of \(\delta_{1}=min(\beta_{2},\beta_{3},\ldots,\beta_{K})\). Once the verification is completed, all the verifying miners simultaneously move to the mining phase.