The Good, the Bad, and the Slashed!

There’s no question that folks that do their part and contribute to makin’ things better fer others should receive some compensation for their troubles - after all, they put their time and effort into doin’ what’s necessary to keep things runnin’ smoothly, so it’s only fair…

Of course, not everybody is always at their best. Sometimes folks subvert the rules and do bad things to feather their own nests…but other times, they just slack off and forget their duty. Whether it’s a product of malice or garden variety apathy, one thing’s fer sure - bad behavior is bad behavior, and that often leads to some real trouble fer a whole crowd of people.

Now it ain’t necessary to penalize someone fer every minor infraction, but when their behavior leads to significant issues or threatens the wellbeing of others, well then, they need to be held accountable fer the consequences! And to that end, folks that backed ‘em or voted fer ‘em should also be brought in line fer allowing bad behavior to transpire!

Usin’ both positive and negative reinforcement somehow feels more balanced than simply applying one approach. Punishment alone is ultimately discouraging and don’t work in the long run, but only givin’ rewards and ignorin’ bad behavior means that folks are motivated solely by financial gain rather than merit and camaraderie. Yep, ya can’t have the good without the bad (and vice versa) - and as it turns out, several folks have realized this and use it to their advantage…

Learn Yerself Some Manners!

Most Proof-of-Stake (PoS) blockchains make use of both reward and penalty mechanisms. It’s as simple as this - good behaviors are encouraged through rewards with validators receiving said rewards for both attesting and proposing blocks to the blockchain as a percentage of their stake. On the flip side, bad behaviors, inactivity, and dishonest validations are subject to a penalty called ‘slashing.’ This mechanism is designed to discourage malicious validator behavior and incentivize network participation (as well as node security and availability).

The particularities of slashing vary from one protocol to another and are therefore defined within each of them. In many cases, a predefined percentage or fixed amount of a validator’s stake is lost if it doesn’t behave as expected. Some protocols even apply a complete slashing of the stake or remove the validator from the group, either for the current epoch or even permanently.

How in the Devil Does It Work?

There’s several different types of misbehaviors that validators can engage in, and at present, they are limited to an unknown misbehavior, a light client attack, duplicate signing and duplicate voting on a proposal. Now let’s take a closer look at what defines them:

  • A double proposal misbehavior is recorded when a faulty proposer proposes two different blocks for the same height and round during Tendermint consensus.
  • A double signing misbehavior is recorded when a validator sends multiple prevote and/or precommit messages for different values for the same height/round.
  • A light client attack misbehavior is recorded when conflicting headers for a given height (which can be verified starting from the trusted light block) are detected. A light client attack is defined in the context of the interactions that take place between a light client and two peers. One of the peers (known as ‘primary’) defines a trace of verified light blocks (the ‘primary trace’) that are checked against the trace of the other peer (the ‘witness trace’). Simply put, a valid light client attack contains two components, namely a common light block and a single conflicting light block.
  • An unknown misbehavior is recorded if something seems amiss, but the exact cause could not be determined. Note that this should only be considered a fallback and used with caution in order to avoid handing out excessively harsh punishments.

This is just a sample of the misbehaviors that will be available and punishable, meaning you will have additional options to choose from. These punishments generally employ percentage-based slashing, but you are more than free to to implement your own slashers for validators and delegators! Yes, you read that right…you can even punish delegators!

Wait a Gosh Darn Minute, I Wasn’t Even There!

Some variations of Proof-of-Stake (PoS) punish delegators just as harshly as they punish validators. This might seem like an extreme measure, but if you think about it in terms of economic impact, it makes perfect sense (assuming you want to encourage the best possible behaviors). If you’re putting your economic power (read money) on the line, then you’re much more likely to make sensible choices (unless you’re a gambling addict of course) and ensure that you are staking with the best available validators.

Choosing to enable delegator punishments on top of validator punishments is a decision that shouldn’t be taken lightly because it drastically impacts your target audience - risk-averse participants in the network might consider not staking at all, thus reducing the pool of available stakers. This may lead to centralization and increase the likelihood of network takeovers occurring.

It’s therefore important that you discuss this with your team because, while the functionality is simple, the psychological and economic impacts it can have are indeed significant. For example, the article Controversial new proposal would forgive ‘slashed’ Polkadot validator describes a case in which the consideration was made to forgive an enacted punishment because humans are, to a lesser or greater degree, impacted by slashing on a deeper level - they are not simply emotionless robots that do not respond to negative occurrences.

Wait, So Should I Use Slashing?

That’s up to you and your unique use-case, but slashing is a mechanism used by several PoS protocols to discourage harmful behaviors and motivate validators to act responsibly. Validators are supposed to help keep the network secure, which, without slashing penalties, might tempt them to use the same node to validate blocks on multiple chains or even the wrong chain.

PoS protocols that don’t employ slashing penalties are generally considered less secure due to a lack of deterrents for bad behaviors. Luckily ol’ Buckley has more than enough experience in the security business and can help you ensure that everyone behaves the way they should when you need ‘em to!