In this post Shawn explains the Nothing At Stake Problem simply. He goes over the nothing at stake definition, and also touches on nothing at stake Casper issue.
Barging into the bosses office and flipping him off may sometimes be too tempting to resist. But we manage to refrain. Why? Cause we're incentivised against doing so. Usually, there are consequences – like losing your job. Bad behaviour usually has associated costs. Behave badly – lose something.
Sometimes, however, there are situations that allow you to act badly and lose… nothing. If the bad behaviour results in the most fruitful outcome, you’re most likely going to capitalize on it. This usually results from overlooked incentivization models. In blockchain technology, The Nothing of Stake problem is an example of an incentivization structure that allows someone misbehave – and get away with it.
Nothing At Stake definition: – a situation where someone loses nothing when behaving badly, but stands to gain everything.
Nothing At Stake Problem in PoS
When a fork occurs, the Consensus Method helps the network agree between the two chains. Participants have to choose which chain to follow, and the majority wins. Ideally, you want the Consensus Method to incentivize people to choose only one of the chains.
Kinda like you having your employees choose between this: “Should I should I slap my boss across the face – or should I keep my job?”
You can’t have both. You can’t act “badly” and have no costs. (Unless you have another job waiting for you, in which case – power to you!)
Proof Of Stake allows you to slap your boss and keep your job - You have nothing at stake.
Proof Of Stake: The Costs To Validate
In PoS, participants compete in a lottery to win the right to propose the next block. Each participant deposits tokens into a pool from which a “winner” is chosen. This deposit is the primary cost that a participant has to incur. All other costs are negligible.
The winner’s block is either accepted or rejected – and the process continues with the chain being extended on each “accepted” block.
Proof Of Stake: A Fork In Mess
However, things can get really messy if we run into a “Fork”. A “fork” in the chain may occur if:
In both cases, two new blocks are proposed – and hence we have a split in the chain:
Now, participants have to pick one of the two chains. The problem, however, is each participant can choose to follow both chains. Ideally, one chain will be picked:
Remember, the only real cost to a validator was his deposit. Since the chain forked, his deposit exists on both chains. So it costs him nothing more to validate on both chains. This allows him to collect transactions fees and rewards on both chains.
Nothing At Stake Problem: Best To Cheat
In fact, he is incentivised to follow both chains as his optimal strategy.
When every validator picks the optimal strategy, we will end up with a chain like this:
Why? Because we’d have 100% consensus on both chains. Everyone’s voting for both sides – so the chains extend at the same pace. At first glance, it may not seem like a big deal. But this compromises the security of the network drastically. A malicious actor can intentionally fork the chain, and get away with a double-spend. All he has to do is the following steps:
- Keeps validating on both chains as well.
- Wait for confirmation of the bad transaction.
- Stop validating on the first chain.
This would tip the balance of the vote onto the other side of the chain – the one with his bad transaction. Eventually, the second chain would outpace the original chain. The bad transaction will be officially accepted, and first chain will be orphaned.
The key point to notice is that the validator can follow both chains and have no opportunity cost.
For example, when you decide to quit your job for a new job, there's an opportunity cost. What if your boss was intending on promoting you? However, Proof Of Stake allows you to have two full-time jobs at no cost. If you don't get promoted in the first job – big deal. You have the second job that will promote you. You have Nothing at stake – no opportunity cost.
Being able to validate on both chains with no costs is like having two jobs.
If the first chain gets orphaned, you still get all transaction fees & rewards from the second chain. In fact, if you pick only one chain you stand to lose your rewards & fees IF your chain gets orphaned. Hence, the optimal strategy is to pick both chains.
Nothing At Stake Problem: PoW vs PoS
Proof Of Work is not vulnerable to a Nothing At Stake problem. Why? Because , unlike PoS, a participant has to use external costs to build blocks in Proof Of Work. An external cost forces participants to place his "bet" on one chain or the other. The external cost in Proof Of Work is the electricity/hash power used by the miner.
To understand this better, we can go back to our Farmer's Analogy. Farmer's had to place their sacks of rice in one of the two rows. The more sacks they had, the more votes they got. The rice was their "external cost". They couldn't vote on both rows with all their sacks. They'd either have to split their sacks of rice or pick one row. The external factor of "rice" ensured that the village mayor didn't have to worry about the nothing at stake problem.
Similarly, In order to build blocks on a chain, he needs to place his electricity on the chain he believes in. To build blocks on both chains – he will have to split his electricity in two. He has an opportunity cost here. As he will not be using the full potential of his hash power on either chain. Since he is not building optimally on either chain, he will lose out on potential rewards. Regardless of which chain is eventually picked as a winner, he will have had some opportunity cost.
In Proof Of Stake a participant does not have any external costs to build blocks.
Remember: the only cost was the initial deposit. Because of this, he can place his bets on both chains. He can simply build blocks on both chains – and wait for a winner. Regardless of which chain wins, he comes out ahead – and no opportunity cost. He had nothing at stake.
Nothing At Stake & Casper: Hypothetical?
It's important to note that we are assuming that all participants act “optimally”. The more likely scenario is that there will be some people who act honestly and reject the “bad chain”. That’s not to say, though, that the Nothing of Stake problem should be ignored. Even if a portion of validators acting selfishly, then attacking the network becomes easier.
But the great news is that the Casper team is not taking the nothing at stake problem lightly – be it a hypothetical problem or not. Ethereum Casper will include punitive measures like “Slashing” that addresses the Nothing At Stake problem. I will discuss and explain that in part 2 of this post!
Follow Up Readings
1) Understanding Longest Chain - A Simple Analogy
2) Blockchain Forks - How Are They Resolved?
3) An Orphaned Block - What happens to your transaction
Get my upcoming eBook for Free!
"The Mango Guide TO Understanding Blockchain"
Offer Valid For FIRST 500 registrations only