# Profitable Double-Spending Attacks
## 5 Practical Example of Profitable DS Attacks against BitcoinCash  
We analyze resources required for profitable DS attacks against BitcoinCash network. The resources include the computing power proportion \(p_{A}\), expected OPEX \(\mathbb{E}_{X}\), expected attack success time \(\mathbb{E}_{T_{AS}}\), and the required value of fraudulent transaction \(C_{\text{Req.}}\). To this end, we first recall the parameters involved in block mining reward \(R\) and the OPEX X. The parameters used in Equation (29) and Equation (30) are assumed to \(x_{1}=x_{2}\), \(x_{3}=x_{4}\), \(r_{1}=r_{2}\), and \(r_{3}=r_{4}\) which lead to linear functions \(X(\lambda_{A},t)\) and \(R(\lambda_{A},t)\) with respect to \(\lambda_{A}\) and \(t\). There are three more parameters: \(\gamma\), \(\beta\), and \(\lambda_{H}\)\({}^{-1}\). From Equation (29) and Equation (30), the parameter \(\gamma\) is the expected cost spent per generating a block; and the parameter \(\beta\) is the reward per generating a block. Parameter \(\lambda_{H}\)\({}^{-1}\) is the average block generation time of the honest chain. All the parameters are different for each blockchain network. In BitcoinCash, the reward \(\beta\) per block mining was 12.5 BCH (without transaction fees), which is around \(\beta=0.44\) BTC per block mining (as of 26 February 2020). The average block generation time was fixed at \(\lambda_{H}\)\({}^{-1}=600\) seconds. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Block Confirmation Number** (\(N_{\text{BC}}\)) & **1** & **3** & **5** & **7** & **9** \\ \hline Attack success probability (\(\mathbb{P}_{AS}\)) & 0.411 & 0.419 & 0.376 & 0.334 & 0.297 \\ \hline Expected attack success time \(\left(\mathbb{E}_{T_{AS}}\right)\)(Scaled by \(\lambda_{H}\)\({}^{-1}\)) & 1.953 & 5.338 & 8.434 & 11.418 & 14.325 \\ \hline Expected OPEX \((\mathbb{E}_{X})\)(Scaled by \(\gamma\)) & 2.106 & 6.139 & 10.436 & 14.977 & 19.716 \\ \hline Required value of target transaction (\(C_{\text{Sof}}\))(Scaled by \(\gamma\)) & \begin{tabular}{c} 1.302 \\ \((1-\mu)\) \\ \(+3.819\) \\ \end{tabular} & \begin{tabular}{c} 3.559 \\ \((1-\mu)\) \\ \(+11.10\) \\ \end{tabular} & \begin{tabular}{c} 5.622 \\ \((1-\mu)\) \\ \(+2.215\) \\ \end{tabular} & \
\begin{tabular}{c} 7.612 \\ \((1-\mu)\) \\ \(+37.25\) \\ \end{tabular} &
\begin{tabular}{c} 9.550 \\ \((1-\mu)\) \\ \(+56.96\) \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Numerical computations of required resources for profitable DS attacks with \(p_{A}=0.4\) when \(t_{cut}=cN_{\text{BC}}\lambda_{H}^{-1}\) with \(c=4\). The parameter \(\gamma\) is obtainable from nicehash.com. BitcoinCash uses the SHA-256 cryptographic puzzle for which the unit of computation is hash. As of 26 th Feb. 2020, the rental fee for 1-peta (P) hashes per second for a day was around 0.017 BTC, which was around \(1.97\times 10^{-7}\) BTC per second. In other words, the rental fee was approximately \(1.97\times 10^{-22}\) BTC per the computing of a hash. Referring to BTC.com, the network's computing speed is 3.57-exa (E) hashes per second; i.e., \(3.57\text{E}\cdot 600=2142\text{E}\) hashes are needed to generate one block on the average. As the result, the parameter \(\gamma\) is obtained as  
\[ \begin{split}\gamma=1.97\times 10^{-22}&\left[\text{BTC}/ \text{hash}\right]\times 2142\text{E}[\text{hashes}/\text{block mining}]\\ &\approx 0.422\left[\text{BTC}/\text{block mining}\right].\end{split}  \tag{38}\]  
Note that it holds \(\beta>\gamma\). From Equation (37), this relationship makes DS attack DS(\(C,p_{A},t_{cut};N_{BC}\)) with \(p_{A}>0.5\) and \(t_{cut}=\infty\) always profitable regardless of the value \(C\) of target transaction. In case of DS attacks with \(p_{A}<0.5\), the cut-time \(t_{cut}\) must be determined as a finite value for profitable DS attacks by Theorem 2. We set \(t_{cut}=cN_{BC}\lambda_{H}^{-1}=12000\) seconds with \(c=4\) and \(p_{A}=0.35\). We compute the resources required for profitable DS attacks against BitcoinCash when \(N_{BC}=5\).