Author: Richard Red, Decred Contributor
The consensus mechanism of a blockchain is used to ensure that participants agree on the current state of the blockchain. The consensus mechanism determines which nodes are able to add new transaction blocks, and one of its main goals is to ensure that the blockchain cannot be rewritten.
Proof of Work Consensus (POW)
Blockchains with proof-of-work consensus, like Bitcoin, can only be created by miners, who deploy hardware and figure out how to efficiently solve a specific math problem. Every time a miner completes a valid guess, the blockchain network can accept the block they built. While miners can choose any chain to calculate on, the network only accepts the chain with the most proof-of-work (i.e., the most hashes or calculations) 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 in rewriting the blockchain is that it serves as a ledger for recording financial transactions. When a transaction appears in a block that sends funds to a wallet, and other blocks have been built on top of it (confirmed), it is impossible to rewrite the block (transaction).
If an entity controls enough hashing power to attack the "real chain", it can rewrite (or reconstruct) the blockchain by rebuilding "old" blocks to replace the latest blocks. Here is a brief description of this type of attack, also known as a 51% attack:
The attacker first recharges the exchange, and the transaction is recorded in block X. Then the attacker starts to build another parallel chain alone (without broadcasting the block to the network). When the number of confirmations required for the recharge transaction is reached, the attacker will exchange the token for other currencies and withdraw it from the exchange. When the withdrawal transaction is completed, the attacker will publish the parallel chain built by himself, and if the 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 recharge transaction) will become a historical version and disappear. After that, the attacker can freely use these tokens again.
Since miners are the only entities that can add blocks directly to the blockchain in PoW cryptocurrencies, 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 the majority of hashing instances. A "soft fork" requires enough miners to re-identify the new consensus rules so that users can make transactions and expect their transactions to be processed correctly and the transaction data to be packaged in blocks. A "hard fork" splits the original blockchain network into two parts, and the "chain with PoW is the correct chain" accepted by the majority of miners, and miners will have the right to decide which chain is considered legitimate.
Proof of Stake Consensus (POS)
Proof-of-stake consensus is another way to decide which miners can add new blocks and verify the current state of the blockchain. With proof-of-stake, instead of miners competing to solve the problem, the next block producer is determined by a mechanism based on the number of tokens (or "stake") in a wallet. The principle behind this consensus process is that those with the most stake will make responsible and reasonable 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 called "irrelevance." Take forks as an example, fake POS ("forging" is often used instead of "mining") will be mined on both chains separately, because the cost of creating another chain is very small, so they can earn profits 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 one legitimate chain, and only recognize the status of the legitimate chain.
Proof of Stake has some other issues with token distribution. PoW miners have high costs (hardware, electricity) and usually need to sell most of the tokens they mine to meet these costs. Therefore, many of the mined coins can be purchased on the market and are not hoarded by miners. Proof of Stake, on the other hand, has very low forgery costs and they do not need to sell the tokens they earn in order to maintain network operations. Large stakeholders participating in Proof of Stake tend to increase their share of tokens in circulation because they collect a large amount of 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 need to pay them fees in the process of using it. 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. Decred is one of the few cryptocurrencies that uses a hybrid PoW and PoS consensus mechanism, integrating them to create a multi-factor and hybrid consensus mechanism.
In some senses, “Masternode coins” are also hybrid mechanisms, as they have a recognizable proof-of-work component that performs a similar role to Bitcoin, with the additional role of special nodes. These special nodes also typically hold a certain amount of tokens as collateral to prove that they can be trusted and are in the best interest of the network, similar to a proof-of-stake mechanism. Dash is the original masternode coin and calls this model proof-of-service. This article focuses on coins that have a hybrid proof-of-stake component, so we will not discuss the scope of coins that consider masternode coins or proof-of-service.
Decred’s PoW component is similar to other PoW-based projects and uses the Blake-256 hash function. Decred’s PoS component and how it structures its blockchain is unique enough to warrant further explanation.
To participate in Decred’s proof-of-stake, holders must lock up their DCR and purchase a “ticket.” The price of an individual ticket is set by a market-like mechanism, where the goal of the system is to obtain a certain number of tickets (40,960) — if the target number is exceeded, the price goes up, and if it is not reached, the price goes down. When a user purchases a ticket, the DCR they use becomes locked (i.e., they cannot spend it) until their ticket is voted on by a pseudo-random function, or expires after approximately 142 days. This introduces an opportunity cost to the PoS mechanism, which ensures that PoS voters are given a fair hand in the game and act in the best interest of the network.
PoS participants (also known as voters or stakeholders) can play three different roles: reject voting, vote on changes to consensus rules, and vote on project-level management using the Politeia rating system. The first role, reject voting, is the most direct way for PoS voters to participate in maintaining consensus.
Voting in a Block
When PoW miners find a valid block, they broadcast it on the network, and in order for the block to be considered valid, it must have at least 3 of the 5 randomly selected votes. PoS voters need to keep their wallets open and need to respond when their votes are called (or have a voting service provider act on their behalf). When a POS ticket is called for a vote and responds, its owner will receive a reward.
When tickets are called, they vote on the regular transactions of the previous block, choosing to accept or reject them. Nodes on the network will not consider the new block valid until they have at least 3 votes. If the majority of tickets reject the transactions in the previous block, they are returned to the mempool. These regular transactions include rewards for PoW miners, but not rewards for PoS voters.
Therefore, PoS voters have the power to deprive miners of rewards without affecting their own income. This limits the power of PoW miners and prevents them from tampering with the network consensus rules, which must be voted on by stakeholders. In fact, when malicious or inefficient behavior is detected, PoS voters can "veto" these malicious miner behaviors by voting, in this way, preventing malicious PoW miners from tampering with transactions and obtaining illegal rewards.
This PoS verification layer can significantly improve the security of the network and protect against most attacks. The common method used in most double-spend attacks is to overwrite the blockchain by replacing the existing chain with private and stealthy mining, then publish it some time later and invalidate the transactions in the "old" chain (i.e. they can Make a double payment). Since Decred blocks require an input of randomly selected tickets to be considered valid, and blocks cannot be built by PoW miners until this input is received, it is impossible for PoW miners to mine in secret unless they also control Most tickets (see article below).
The design of a hybrid PoW/PoS mechanism can significantly increase the cost of network attacks because attackers must circumvent two independent systems at the same time. Especially if the PoS component is configured to only acquire tickets slowly. Only a limited number of tickets can be purchased per block, and purchasing a large number of tickets will cause a sharp increase in price. Additionally, once tickets need to be purchased, the funds used to purchase them are locked, locking up the attacker's funds for the attack and exposing them to the risk of devaluation.
Having randomly selected stakeholders vote on each block means that the blockchain must be shared with all mining nodes, thus enhancing the security of the network. Decred's hybrid mechanism is designed to give stakeholders power over PoW miners.
Consensus Modification Voting
Decred decided at the outset to make PoS stakeholders the dominant decision-making force in blockchain governance. Modifying or writing consensus rules requires an approval upgrade process, through which changes to the network consensus rules can only be made after a vote. And changes can only be made after at least 75% of the votes are in favor. The process begins if a certain percentage of miners (95%) and voters (75%) are running the upgrade software and making potential changes to the rules. If the change proposal receives more than 75% support after a 4-week voting period, it is accepted, otherwise it is rejected and the vote is restarted if the number of votes is insufficient. If the proposal is accepted, the change to the consensus mechanism will be activated after one month.

Project management: Politeia
Decred's block rewards are divided into PoW miner rewards (60%), PoS voter rewards (30%) and Treasury (10%), which is used to fund open source software contributors who develop the project. Ticket holders have the right to vote on how this part of the funds should be used, what features should be added, and make decisions through the Politeia platform.
Concluding Thoughts
Since PoS voters receive 30% of the block rewards, they cannot maintain their relative share of DCR circulation simply by holding existing stakes. Most new DCR is mined by PoW miners, thus alleviating their "irrelevance" in the PoS system and playing their role in protecting the network. Miners must sell most of the rewards they receive to maintain their operating costs, so this approach ensures that the supply of DCR in the market is reasonable.
The Decred blockchain presents a unique architectural pattern and is one of the most well-known examples of a hybrid PoW/PoS system. As with the significant changes in the PoS consensus mechanism across groups, future projects deployed through hybrid PoW/PoS mechanisms will also be unique and will not necessarily follow the existing Decred framework.
