The paper investigates the issues of the safe operation of a two-level blockchain with a complex mixed consensus protocol — Proof-of-Stake in the main blockchain (mainchain) and Proof-of-Work in the secondary (sidechain). This two-level blockchain is built on the principle of the Proof-of-Proof protocol, where the safety of the sidechain is ensured by the stability of the mainchain, by referring the mainchain blocks to the sidechain blocks using special transactions. Such a structure allows faster issuance of blocks in the sidechain and, accordingly, faster processing of transactions without loss of security and without increasing the volume of the block. In turn, such a two-level blockchain is of the greatest interest for the creation of a cascade system of state registers, which will be guaranteed to be protected against the substitution and forgery of documents. The main results of the work are explicit analytical expressions for estimates of probability of double spend attack on such two-level blockchain, under the condition of adversary in sidechain and in mainchain. Keywords: blockchain, mainchain, sidechain, cryptocurrencies, mining, Proof-of-Proof consensus protocol, double spend attack.