# Profitable Double-Spending Attacks
## Appendix B Proof of Corollary 1.
 \tag{115}\]  
where \(E[T_{i}]=i\lambda_{T}{}^{-1}\)[22]. By substituting \(P_{DSA,i}\) in Equation (15) into Equation (115) and rearranging the order of operands, we obtain  
\[ \begin{array}{rl}\lambda_{T}\mathbb{P}_{DSA}\mathbb{E}_{T_{AS}}&=\sum \limits_{j=N_{BC}}^{2N_{BC}}\left(\begin{array}{c}j-1\\ N_{BC}-1\end{array}\right)\sum\limits_{i=2N_{BC}}^{\infty}(i+1)C_{\frac{i}{2}- N_{BC},2N_{BC}-j}p_{A}{}^{\frac{i+2}{2}}p_{H}{}^{\frac{i}{2}}\\ &+\sum\limits_{i=N_{BC}-1}^{\infty}(i+1)\left(\begin{array}{c}i\\ N_{BC}-1\end{array}\right)p_{A}{}^{i+1-N_{BC}}p_{H}{}^{N_{BC}}-\sum\limits_{i=N_ {BC}-1}^{2N_{BC}-1}(i+1)\left(\begin{array}{c}i\\ N_{BC}-1\end{array}\right)p_{A}{}^{i+1-N_{BC}}p_{H}{}^{N_{BC}}.\end{array}  \tag{116}\]  
By rearranging the indices of summations, we arrive at  
\[ \begin{array}{rl}\lambda_{T}\mathbb{P}_{DSA}\mathbb{E}_{T_{AS}}&=\sum \limits_{j=N_{BC}}^{2N_{BC}}\left(\begin{array}{c}j-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{N_{BC}+1}p_{H}{}^{N_{BC}}\cdot\sum\limits_{i= 0}^{\infty}(2i+2N_{BC}+1)C_{i,2N_{BC}-j}(p_{A}p_{H})^{i}\\ &+p_{A}\left(\frac{p_{H}}{p_{A}}\right)^{N_{BC}}\sum\limits_{i=N_{BC}-1}^{ \infty}(i+1)\left(\begin{array}{c}i\\ N_{BC}-1\end{array}\right)p_{A}{}^{i}-\sum\limits_{i=N_{BC}}^{2N_{BC}}\left( \begin{array}{c}i-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{i-N_{BC}}p_{H}{}^{N_{BC}}.\end{array}  \tag{117}\]By substituting the generating functions \(M_{k}(x)\) and \(G_{k}(x)\) defined respectively in Equation (A8) and Equation (A9), Equation (A19) becomes  
\[ \begin{array}{ll}\lambda_{T}\mathbb{P}_{DSA}\mathbb{E}_{T_{AS}}&=\sum\limits_{j =N_{BC}}^{2N_{BC}}\left(\begin{array}{c}j-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{N_{BC}+1}p_{H}{}^{N_{BC}}\left(2\sum\limits_{ i=0}^{\infty}iC_{i,2N_{BC}-j}(p_{A}p_{H})^{i}+(2N_{BC}+1)M_{2N_{BC}-j}(p_{A}p_{H}) \right)\\ &+p_{A}\left(\frac{p_{H}}{p_{A}}\right)^{N_{BC}}\left(\sum\limits_{i=N_{BC}-1} ^{\infty}i\left(\begin{array}{c}i\\ N_{BC}-1\end{array}\right)p_{A}{}^{i}+G_{N_{BC}-1}(p_{A})\right)-\sum\limits_{ i=N_{BC}}^{2N_{BC}}i\left(\begin{array}{c}i-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{i-N_{BC}}p_{H}{}^{N_{BC}}.\end{array} \] (A20)  
We use the following relationships,  
\[\sum\limits_{i=0}^{\infty}iC_{i,k}x^{i}=xM^{\prime}_{k}(x)\] (A21)  
and  
\[\sum\limits_{i=k}^{\infty}\left( \begin{array}{c}i\\ k\end{array} \right)x^{i}=xG^{\prime}_{k}(x),\] (A22)  
and their derivatives are given by  
\[ \begin{array}{ll}M^{\prime}_{k}(x):=\frac{d}{dx}M_{k}(x)=\sum\limits_{i=0}^{ \infty}iC_{i,k}x^{i-1}\\ =\frac{(k+1)}{\sqrt{1-4x}}\left(\frac{2}{1+\sqrt{1-4x}}\right)^{k+2}\end{array} \] (A23)  
and  
\[ \begin{array}{ll}G^{\prime}_{k}(x):&=\frac{d}{dx}G_{k}(x)\\ =\sum\limits_{i=k}^{\infty}i\left(\begin{array}{c}i\\ k\end{array}\right)x^{i-1}\\ =\frac{(kx^{k-1}+x^{k})}{(1-x)^{k+2}}.\end{array} \] (A24)  
By substituting Equation (A21) and Equation (A22) into Equation (A20), we obtain  
\[ \begin{array}{ll}\lambda_{T}\mathbb{P}_{DSA}\mathbb{E}_{T_{AS}}=\sum\limits_ {j=N_{BC}}^{2N_{BC}}\left(\begin{array}{c}j-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{N_{BC}+1}p_{H}{}^{N_{BC}}\cdot\left(2p_{A}p_ {H}M^{\prime}_{2N_{BC}-j}(p_{A}p_{H})+(2N_{BC}+1)M_{2N_{BC}-j}(p_{A}p_{H}) \right)\\ \hskip 142.26378 pt+p_{A}\left(\frac{p_{H}}{p_{A}}\right)^{N_{BC}}\left(p_{A}G ^{\prime}_{N_{BC}-1}(p_{A})+G_{N_{BC}-1}(p_{A})\right)-\sum\limits_{i=N_{BC}}^ {2N_{BC}}i\left(\begin{array}{c}i-1\\ N_{BC}-1\end{array}\right)p_{A}{}^{i-N_{BC}}p_{H}{}^{N_{BC}}\end{array} \] (A25)  
Putting \(x=p_{A}p_{H}\) into \(M^{\prime}_{k}(x)\) in Equation (A23) results in  
\[M^{\prime}_{k}(p_{A}p_{H})=M^{\prime}_{k}(p_{m}p_{M})=\frac{(k+1)}{1-2p_{m}} \left(\frac{1}{p_{M}}\right)^{k+2}.\] (A26)  
Putting \(x=p_{A}\) into \(G^{\prime}_{k}(x)\) in Equation (A24) gives  
\[G^{\prime}_{k}(p_{A})=\frac{\left(kp_{A}{}^{k-1}+p_{A}{}^{k}\right)}{p_{H}{}^{ k+2}}.\] (A27)  
By substituting Equation (A12), Equation (A14), Equation (A26), and Equation (A27) into Equation (A25), we finally obtain Equation (27). \(\Box\)