Polkadot Hello World #5: Minting, Bonding, Staking, Slashing

By talfco | Polkadot Journey | 25 Aug 2019

$1.22 tipped


This week’s article is about “minting”, “bonding”, “staking” and “slashing” which are core functions of a Proof of Stake (POS) blockchain consensus engine.

It’s a follow-up article of “Polkadot Hello World #2: Get Nominated As An Official Validator”, which is an introduction to the topic and explains the Byzantine Fault Tolerance (BFT) and it’s relationship to PoS. So you may check out this one as well.

When I was thinking about the right teaser image for this article - by playing around with the keyword “slashing” - I got remembered of the brilliant hit by Ian Dury & The Blockheads “Hit Me With Your Rythm Stick” from 1979. So instead of a static image, I start this article with this old post-punk music video, honouring the validators out in the PoS network universes, trying not to get hit by the rhythm stick of the consensus engines …

Ian Dury & The Blockheads — Hit Me With Your Rhythm Stick (1979)

… so back to work then.

When I started my Polkadot blockchain researching work some weeks ago I wasn’t aware that the crypto economy is actually going through a big shift in direction to decentralized staking networks. Not just Polkadot, but a lot of other blockchain networks are looking forward replacing (or already replaced) the energy-hungry Proof of Work consensus approach with a new consensus model, the so-called Proof of Stake (PoS).

Just a short wrap-up: In a PoS consensus network a group of Validators together will form the new chain. They are a new breed of miners (well minters) who …

… are proposing and voting on the next block, and the weight of each validator’s vote depends on the size of its deposit (i.e. stake). Significant advantages of PoS include security, reduced risk of centralization, and energy efficiency. (Ethereum Proof of Stake Wiki)

Minting

1*jxurxxFeGhVNK5m3RV7Hlg.jpeg

San Francisco Mint Employees in the Machine Shop — 1873 (License Wikimedia Commons)

This brings us to the first keyword of the article. The process of generating blocks with Proof-of-Stake is loosely referred to as Minting. Not sure why the word is used but could imagine that the task of the Validator is more driven to check an already produced raw block and attest its correctness, which results in a minting process of the coins.

Where in the world of PoW there is this hard and dirty (energy-consuming) job to be done of Mining to get hold of a raw block.

1*Z0fXHWk22y1kInRqnW4Lfg.jpeg

Bundesarchiv Bild 183–17031–0003, Bergarbeiter bohrend — 1952 (Creative Commons License)

Polkadot’s Consensus Algorithm

Combining the PoS consensus approach with BFT research in a public blockchain was first introduced by Jae Kwon around 2011 and ultimately led to the development of the Tendermint Algorithm (in 2015), which is the PoS consensus engine in the Cosmos Network, another Internet of Blockchains solution.

Various different consensus algorithms got developed in the meantime, amongst others Polkadot was announcing in its white paper a modern new algorithm.

Polkadot achieves low-level consensus over a set of mutually agreed valid blocks through a modern asynchronous Byzantine fault- tolerant (BFT) algorithm. The algorithm will be inspired by the simple Tendermint and the substantially more involved HoneyBadgerBFT . The latter provides an efficient and fault-tolerant consensus over an arbitrarily defective network infrastructure, given a set of mostly be-nign authorities or validators.(Polkadot Whitepaper)

The algorithm got the name “Grandpa”, as an abbreviation for “GHOST-based Recursive Ancestor Deriving Prefix Agreement” and may be integrated into the upcoming Polkadot POC-3.

To finish this short excursion to the consensus algorithm world, let me introduce the category to which Grandpa belongs to, a so-called “chain-based proof of stake” category:

The algorithm pseudo-randomly selects a validator during each time slot and assigns that validator the right to create a single block, and this block must point to some previous block (normally the block at the end of the previously longest chain), and so over time most blocks converge into a single constantly growing chain. (Ethereum Proof of Stake Wiki)

 

Bonding

A key concept in PoS networks is “Bonding” which can be translated as building up a strong “binding” relationship with a PoS network.

You express your commitment to the network by locking a defined amount of your network token for a certain time period. You signal the network that you are a trustable network actor and accept the rules and regulations of the network.

In Polkadot POC-2 Bonding/Staking are a combined action

0*1dEw07VjEXHqiHDF.png

By submitting a “staking.stake” transaction and sign it with the private key of your address, your Polkadot Stacking Tokens (DOT) will be locked and you are ready to act as a validator (in case you get elected).

0*nWRf6WdqyUDLMv3y.png

By staking your token and taking over an active role in the network, you are eligible for newly minted token and fees, which over time will grow your ownership in the network.

In contrast to that, people who are not bonding their token to the network will have easy access to them which means ultimately liquidity. But they will not participate in the constant stream of new token distribution and will over time reduce their ownership in the network.

Having a reasonable set of trustful validators, which actively participate in the securing of the network and which altogether will grow their ownership of a successful network, is the nucleus of a PoS blockchain network.

Rewarding in Polkadot

This implies that there is a reward system in place which is fine-tuned and well balanced to foster trustful Validators. As the Polkadot Whitepaper paper states

In general, it is important that the reward is sufficiently large to make verification worthwhile for the network, yet not so large as to offset the costs of fronting a well-financed, well-orchestrated ”industrial-level” criminal hacking attack on some unlucky validator to force misbehaviour.

Gavin’s Wood goes on and describes the envisaged reward system as follows:

Incentivisation can happen through a pro-rata allocation of funds coming from a token base expansion (up to 100% per year, though more likely around 10%) together with any transaction fees collected. While monetary base expansion typically leads to inflation, since all token owners would have a fair opportunity at participation, no tokenholder would need to suffer a reduction in value of their holdings over time provided they were happy to take a role in the consensus mechanism.

By expanding the overall amount of available DOT tokens, there is obviously an inflation or an overall value dilution ongoing, which can be neglected as long as you participate. The expansion is unlimited as he states:

What is the inflation rate for Polkadot staking tokens: The Polkadot staking token base expansion is unlimited. It rises and lowers according to market effects in order to target a particular proportion of tokens held under long-term bond in the validation process.

Taking all these facts into consideration, it’s clear that DOT’s aren’t aimed as cryptocurrencies.

Polkadot tokens are neither intended nor designed to be used as a currency. They would make a bad currency: most will remain illiquid in the staking system and those that are liquid will face substantial fees for transfer of ownership. Rather, the purpose of Polkadot tokens is to be a direct representation of stake in the Polkadot network.

Slashing in Polkadot

Now let’s come to the uncomfortable part. As an active network community member - be it as Validator or Delegator — you may be punished in case you don’t comply with rules and regulations.

Validators have the ultimate goal to secure the network and must comply with the network rule being ready 7x24 to validate new blocks and obviously not trying to cheat or attack the network by different means.

Breaking the rule will result in a punishment, also known as Slashing

In case the consensus algorithm detects a rule break of a Validator, it will reduce or remove completely the staked tokens. The penalty size is dependent on the seriousness of your misbehaviour. Obviously, availability problems of your Validator node will be penalised less than actions which try to attack or fool the network.

It’s not the consensus algorithm alone which tries to detect misbehaviours, but also well-defined Polkadot network roles, as for example the Fishermen:

Unlike the other two active parties, fishermen are not directly related to the block-authoring process. Rather they are independent “bounty hunters” motivated by a large one-off reward. Precisely due to the existence of fishermen, we expect events of misbehaviour to happen seldom, and when they do only due to the bonded party being careless with secret key security, rather than through malicious intent. (Polkadot Whitepaper)

An interesting question which must be answered when the network confiscates tokens.

What should happen with the sanctioned tokens? Should they be burned (removed completely out of the network) or distributed to the others well-behaving validators? What do you think?

The short answer is that burning tokens gives value to everyone through distributed scarcity, whereas distributing it to remaining validators would encourage them to sabotage each other in an effort to get each other’s slashed tokens. ( (Two Point Oh: Explaining Validators)

1*BEcbq4DKBEq1aPYWTA4tuA.png

Link Slashing-and-burning in Eno, Finland. Public Domain Licensing

As an analogy to the above picture: Having Slashed and Burnt the bonded tokens of bad actors, the soil (or network in our case) is ready to progress with healthy growth.

Polkadot POC-2 provides already some basic slashing functionality. As for example in the below screenshot, the Polkadot Network Status is reporting a slashing of the Validator node “5FTt471….”, which is going over 4 subsequent steps. Each step gets more severe and finally, after burning 15'000 microDOTs, the Validator gets kicked out of the active Validator set.

As an analogy to the above picture: Having Slashed and Burnt the bonded tokens of bad actors, the soil (or network in our case) is ready to progress with healthy growth.

Polkadot POC-2 provides already some basic slashing functionality. As for example in the below screenshot, the Polkadot Network Status is reporting a slashing of the Validator node “5FTt471….”, which is going over 4 subsequent steps. Each step gets more severe and finally, after burning 15'000 microDOTs, the Validator gets kicked out of the active Validator set.

1*A2gCLHgRNkrI1a8dSWIh5g.png

You even have the possibility to adjust the slashing threshold, by executing a threshold transaction.

Final Remarks

Minting, Bonding, Staking and Slashing are key functionalities within a Proof of Stake (PoS) network, which gets secured by a new breed of service providers, the so-called Validators, which are minting blocks and are not requiring energy-hungry mining activities.

The whole new PoS economy model with strong Validator communities isn’t mature yet. There are a lot of important PoS networks (Polkadot, Etherum Casper, Cosmos) still in POC or testing phase, and debates are ongoing about the right mix of Validators (threat of cartels and centralization), how to secure them properly (threat of attacks, which could result in slashing), as well what will be a feasible profit model for a Validator service provider.

Getting these questions sorted will be key in order to attract a reasonable set of Validators, which will participate in the securing and healthy growth of the network.

My tip to stay up-to-date with the evolvement and progress of the Polkadot network is by subscribing to their riot channels, namely:

As an example below, Gav Wood informed recently when we have to expect a release 1.0 ready implementation of slashing (which will be early 2019).

1*lXOxUXq9AQFkovi4ic-Beg.png

Originally published at dev.cloudburo.net on November 22, 2018.

 

 

 


talfco
talfco

Exploring the world of decentralization. All content and opinion expressed in context of my legal entity atnode.ch


Polkadot Journey
Polkadot Journey

A Journey into the new world of Polkadot's heterogeneous multi‑chain blockchain technology. A set of articles which are providing a high-level introduction to Polkadot with a focus on Validators.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.