Most traditional information systems are built on a centralized hierarchical principle. In such systems, there is a single decision-making center, to which other nodes are subordinate, therefore, they must certainly perceive and follow centralized instructions. In addition, the presence of a decision center causes additional threats, since to disrupt the operation of the entire system it is enough to destroy or compromise the main node. Decentralized systems are more stable and secure, especially in a situation of complete distrust of each other. They are more reliable for storing important information, such as digital assets, registries, inventories and the like. That is why blockchain technologies for building decentralized systems are becoming increasingly popular and widespread. However, when deploying decentralized systems, the task of coordinating the state of various network nodes arises. This is especially true when the nodes operate in a mode of complete distrust of each other, that is, if situations are possible where the proportion of nodes is controlled by intruders. This problem is solved using consensus protocols, that is, such rules and algorithms that, when executed, achieve the same state for most nodes of a decentralized system. This article discusses probabilistic consensus protocols, that is, when the occurrence of a certain state is a random event. Coordination of system states is possible in various ways, including possible false cases that are imposed by attackers. For example, attackers can double their electronic assets by spending them twice. Of course, if most nodes are controlled by intruders, the system will not work properly. But even with a smaller share of resources, attackers can also with a certain probability impose a false state of the system and thus implement a double-spend attack. The article discusses various situations and possible states of the system, analytically deriving formulas for calculating the probability of a successful double spending attack on a blockchain system with a probabilistic consensus protocol. When conducting research, the model of independent players was used, which, unlike the well-known works, takes into account the complete set of elementary events and system states. Based on the results obtained, recommendations are given on the safe functioning of a decentralized system.