# Consensus mechanism

### Proof of Work Consensus (POW)&#x20;

A blockchain with proof-of-work consensus (like Bitcoin) can only be created by miners, who deploy hardware and compute how efficiently a particular mathematical problem can be solved. Every time a miner completes a valid guess, the blockchain network can accept the block they constructed. While miners can choose either chain for computation, the network only accepts the chain with the most proof-of-work (i.e. the most hashes or computations) as the legitimate chain. This means that miners are incentivized to mine on the longest chain, and when they find a valid new block, they will try to find a solution on how to build on the new block. The difficulty of rewriting the blockchain is that it acts as a ledger for recording financial transactions. When a transaction that sends funds to a wallet occurs in a block, and other blocks (confirmed) have been constructed on top of that block, it is impossible for the block (transaction) to be rewritten.

If an entity controls enough hash power to attack the "real chain", it can rewrite (or refactor) the blockchain by rebuilding "old" blocks to replace the latest ones . Here is a brief description of this type of attack, also known as a 51% attack: The attacker first makes a deposit to the exchange, the transaction is recorded in block X, and then the attacker starts to build another parallel chain on his own (without broadcasting the block to the network). And when the required number of confirmations for the top-up transaction is reached, the attacker will exchange the token for another currency and withdraw it from the exchange. When the withdrawal transaction is completed, the attacker publishes a parallel chain constructed by himself, and if this blockchain has more PoW (blocks) than the original chain, the network will accept it as the legitimate chain, and the original blockchain ( including the attacker's top-up transaction) will become the historical version and disappear. After that, attackers can freely use these tokens again.

Since miners are the only entities in PoW-like cryptocurrencies that can directly add blocks to the blockchain, this gives them an important role in governance. If the consensus rules need to be modified in the blockchain network, they must be supported by most hash algorithms. A “soft fork” requires enough miners to re-identify the new consensus rules so that users can transact and expect their transactions to be processed correctly and to package the transaction data in blocks. A "hard fork" divides the original blockchain network into two parts, and the "chain of PoW of workload is the correct chain" accepted by most miners, miners will have the right to decide which chain is considered legitimate.

### Proof of Stake Consensus (POS)

Proof-of-stake consensus is another method of deciding which miners can add new blocks and verify the current state of the blockchain. The problem is solved through proof of stake, rather than competition among miners, with some mechanism for determining the next block producer based on the number of tokens (or "stake") in the wallet. The consensus process is based on the belief that those with the most interests will make responsible and sound decisions for the entire network.

Proof-of-stake consensus eliminates the need for energy-intensive mining activities, but the lack of significant energy expenditure creates another problem, sometimes referred to as “irrelevance.” Take forks, for example, forged POS ( "Forging" is often used in place of "mining") will be mined on both chains separately, since there is little cost to create another chain additionally, so they can earn money on both chains at the same time. This is a problem for blockchain networks because the purpose of the consensus mechanism is to only recognize that there is a legitimate chain, and only the state of the legitimate chain.

Proof-of-Stake has other issues with token distribution. PoW miners have high costs (hardware, electricity) and typically need to sell most of the tokens they mine to meet these costs. Therefore, many mined coins can be purchased in the market without being hoarded by miners. Proof-of-stake counterfeiting costs are very low, and they do not need to sell the tokens they earn in order to maintain network operations. Large stake holders participating in proof-of-stake tend to increase their share of tokens in circulation because they collect large rewards and transaction fees from network users. This has been likened to feudalism, where the network is owned and manipulated by large token holders, and users are required to pay fees for their use. In POS, some restrictions are usually set so that ordinary users cannot directly participate in the proof-of-stake consensus.

#### Hybrid PoW/PoS

The goal of a hybrid proof-of-work, proof-of-stake system is to combine the strengths of both and balance each other's weaknesses. BULL is one of the few cryptocurrencies that uses a mix of PoW and PoS consensus mechanisms, and combining them results in a multi-factor and hybrid consensus mechanism.

In some senses, "Masternode coins" are also hybrid mechanisms in that they have an identifiable proof-of-work component that performs a similar role to Bitcoin, with the additional role of a special node. These special nodes also typically hold a certain amount of tokens as collateral to prove they can be trusted and in the best interests of the network, similar to a proof-of-stake mechanism. Dash is the original masternode coin and refers to this model as Proof of Service. This article focuses on components with hybrid proof-of-stake, so will not discuss the scope of tokens for masternode tokens or proof-of-service.

The main chain, one of the BULL ecological dual hubs, did not innovate a consensus by itself, but borrowed and used the hybrid consensus of PoW+PoS. One of the big reasons is that this hybrid mechanism and the core concept in the BULL vision were not planned. combine. We can see from BULL's early white paper that BULL has been trying to create a new blockchain world that is more compatible, fairer, and more democratic. Based on the PoW+PoS hybrid mechanism, both miners and token holders can participate in voting and jointly participate in major decisions of the BULL community. Both token holders and miners can influence pre-programmed updates, as long as these decisions or updates are widely used Recognition, the chain will automatically update without developer intervention, which is undoubtedly in line with BULL's vision and philosophy.

### BULL's PoW+PoS hybrid mechanism has more functions than pure PoS/pure PoW:

#### On-chain verification

verify the blocks mined by PoW miners to ensure that the blocks mined by PoW miners comply with the consensus rules of the BULL network. Use pure PoW, which is the PoW miners who pack the blocks and verify them. BULL decomposes the work of PoW, allowing PoW miners to package blocks, and PoS voters to verify the blocks packaged by PoW miners, dividing part of the work of PoW miners.

PoS's confirmation of PoW miners' daily block production can check and balance the evil work of PoW miners. For example, it can prevent PoW miners from 51% computing power attacks, prevent PoW miners from forcing hard forks, and prevent PoW miners from packing empty blocks. To make BULL the coin with the highest attack cost under the same conditions, attacking BULL requires not only the majority of computing power, but also the majority of PoS votes.

#### On-chain consensus voting to decide changes to the BULL blockchain consensus rules.

The consensus voting on the BULL chain is divided into two stages: the first stage is to meet the preconditions for blockchain changes and upgrades, and the second stage is the on-chain consensus voting stage. In the first stage, developers need to release the forked code for consensus change and upgrade, 95% of PoW nodes need to be upgraded, and 75% of PoS voter nodes need to be upgraded. If any of these three parties does not cooperate or cooperate, the consensus voting on the chain will not be possible at all, because the preconditions for blockchain change and upgrade cannot be met.

In the second stage, in the on-chain consensus voting process, 75% of the PoS votes are required to agree, and the on-chain consensus rule voting is passed. BULL's on-chain consensus rules voting clarifies the vague rights and responsibilities of ordinary PoW blockchain upgrades, which can maximize the participation of all parties in BULL and form a broader and stronger consensus.

#### Off-chain voting to decide the development direction of BULL and the policy of BULL

This vote is carried out through the Politeia proposal system, which is off-chain but anchored to the BULL blockchain, delegating the power to formulate and make decisions about the future direction of BULL to the entire community.

#### Off-chain voting on how to spend the BULL proposal fund

In addition to deciding the development direction of BULL, Freeman is also a platform for discussing and voting on how to use the proposal fund, delegating the right to use the funds of the BULL community fund to the entire community.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://he-chao.gitbook.io/bull-whitepaper/technical-framework/consensus-mechanism.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
