PoS (Proof of Stake) is essentially a consensus protocol that holds a certain amount of currency to obtain mining qualifications and benefits. After the original Proof of Stake was proposed in 2013, the problem of Nothing At Stake (no stake) and The Long-Range Attack (Long-Range Attack) problem is the challenge of the often-discussed Proof of Stake consensus protocol. Want to learn more about PoS? To know what, you also need to know why.
Today we will take a look at the Nothing At Stake problem (no stake).
Nothing At Stake, a situation where someone loses nothing when behaving badly, but stands to gain everything.
The essence of the Nothing At Stake problem is doing evil has no cost, and the benefits are infinite. Specifically, when there is a fork in the PoS consensus system, the block producing node can produce blocks for multiple chains at the same time without any loss, so that it is possible to obtain all benefits .
Its like there is a window, you can get money by queuing up, when there is only one window, everyone will line up obediently, everyone has it, and it is fun.
But when the second window appears. As we all know, in the end, only one of the two windows may receive real money, and the others money will become waste paper. But you dont know which window will be the window to send real money while queuing. So what do you do? You might place an errand order to help you double up while you line up at another window.
However, in the actual PoS block generation node, the avatar has no cost at this time, and it is just a calculation performed by the computer.
What kind of chaos will this cause?
Smart block producing nodes will have the motivation to generate new forks, support or initiate illegal transactions, and other profit-seeking block producing nodes will queue up blocks on multiple chains (windows) at the same time to support new forks. As time goes by, there are more and more forks, illegal transactions, and rampant evil. The blockchain will no longer be the only chain, and there is no way for all block producers to reach a consensus.
In addition, the nothing-at-stake problem also makes double-spend attacks easier. Unlike PoW 51% attacks, PoS attack nodes only need a certain amount of computing power (sometimes only 1%) to attack. For example, for a coin whose pledged total amount accounts for only 30% of the currency in circulation, the attack cost is easier to attack than a network with a 60% pledged rate.
How easy is it? As shown in the figure below, there are still three block producing nodes A, B, and C. If A is an attacking node, it will create two transactions when a fork occurs. Send X coins to one of your own wallet addresses, and at the same time send X coins to the exchange on another fork. Because of Nothing At Stake, block producing nodes of B and C will produce blocks on the two forked chains at the same time. When the transaction is confirmed by the exchange, A sells X coins and converts them into privacy coins, and moves them out of the exchange. After that, A increases the block weight by increasing the amount of pledged coins, or creating multiple other block producing nodes, and only continues to produce blocks in the forked chain. At this time, the longest chain is obvious, and the gap is gradually widened, and it will eventually become the longest chain, and A successfully double spends X coins.
Why is the Nothing At Stake problem just a PoS challenge? Wouldnt there be PoW?
The PoW mechanism inherently avoids this problem. Because when producing a block, miners will pay an opportunity cost—computing resources. If a fork occurs, miners need to carefully choose which chain to produce blocks on. Once they choose the wrong chain, the cost of computing power will not be profitable. Miners will not choose to equally divide the computing power on the two chains, which will only reduce the probability of generating blocks on the original chain by half, which may not be worth the loss.
So how to solve the Nothing At Stake problem?
The general strategy is post-punishment, that is, if it is judged as a malicious block production behavior, a part of the stake or a deposit will be used as a fine. However, all punishments and regulatory measures are only after the event, unlike the invisible constraints of PoW that require computing power to generate blocks.
Lets take a look at how Tezos uses a penalty mechanism to avoid the Nothing At Stake problem: participating in mining on the Tezos chain requires a deposit, which is used to ensure the honest behavior of the baker. Broadcast blocks on both branches, then his deposit will be forfeited. If the baker successfully creates and broadcasts a legitimate block, he will receive block rewards and transaction fees. This mechanism uses monetary rewards and punishments to avoid double mining problems, and the security of nodes is maintained by bakers themselves.
In addition to post-punishment, the solutions so far have all sacrificed a certain degree of performance and the principle of decentralization, and the design of the contract mechanism is also more complicated.
Where does this complexity lie?
In PoS, nodes have many roles and responsibilities: in addition to block producing nodes (Miners) similar to those in PoW, there are also validators (Validators) who endorse blocks, and guardian hunters (State Guardians) who catch bad guys.
Guardian Hunter’s stake has a certain lock-up period. Generally, it takes X blocks to get the pledged coins, which can give Guardian Hunter enough time to catch illegal nodes.
In addition, although the project party can select trusted nodes through pre-node screening, the problem of centralization is still unavoidable:
If the network develops rapidly and the benefits exceed the reputation of the organization, the selected real-name nodes may not still be credible;
Whether the node has enough motivation or technical ability to ensure its own anti-attack capability, so as to ensure network security;
The number of nodes is limited, the scalability is not enough, and it is still centralized.