Polkadot staking: Practical part

Types of accounts

Polkadot offers two types of accounts for increased security — Stash and Controller. This partition is based on the principle of hot and cold wallets — hot has access to the Internet and is used to manipulate your tokens, cold, on the other hand, should never connect to the internet and serve as a secure storage for your tokens.

Stash

Stash is used to store the tokens you want to nominate. The Stash account has full access rights to your account, in case of loss or theft of your seed you lose your funds without any chance for recovery. That is why Polkadot comes up with the concept of two separate accounts where one serves as a cold storage and the other has only limited access rights for changing your nomination (and therefore you do not lose your funds by compromising it).

Controller

The controller complements your stash account by delegating only limited access rights from the stash to the controller. In practice, stash can easily be just a paper wallet without an internet access and the controller connected to your stash takes care of managing your nomination. If your controller account is compromised, due to limited rights, the attacker can cancel or change your nominations but he will no longer be able to transfer your funds to another address.

Proxies

The way Polkadot allows you to link accounts and delegate access rights is called a proxy. We even have several kinds of them

Wallets

We will show you several possible combinations which, in our opinion, can best secure your funds.

Parity signer

A Parity signer is a smartphone application that can turn your phone into a cold wallet. The principle is very simple, you take your old phone, remove the SIM card, reset the phone to factory settings, install the Parity signer and make sure that the phone is not connected to any network (Bluetooth, WiFi, etc.). Because all the communication means are disallowed, you’ll get very secure storagewhich makes transaction signing very easy by scanning the QR code.

Parity signer

Staking

And that finally brings us to the staking itself. As you might have guessed, the account in Parity signer will serve as a Stash account. Our Controller will be a new account which we are going to to create in Polkadot JS extension — as we showed in our introductory article on wallets.

Ledger

Ledger is a hardware wallet that our readers probably know in detail and many of them use it. Its security lies in the fact that it uses a special computer chip to store private keys and it is therefore almost impossible for an attacker to access your private keys.

  • it will increase security a bit because you will never manipulate your stake with a fully authorized account (and even Ledger already had its security problems)
  • you do not need to have a Ledger with you to change your nomination, Controller account can be easily imported into a mobile wallet where you can conveniently change anything you want

Browser extension

We will mention it only briefly because we wrote a detailed description in our article about wallets. This is a variant where we create Stash and Controller accounts using browser extensions. From a security point of view such a partition no longer makes sense because if someone compromises your computer, he will still have access to both accounts. Therefore, we definitely do not recommend this variant — or only for staking a small number of tokens.

Subkey

We are adding this option for “nerds” and for others who are interested in how Polkadot/Substrate works in detail. Substrate is a tool for creating and developing blockchains which then can run on Polkadot (the code of Polkadot itself consists from 85% of the Substrate code which anyone can use to build their own chain). Well, Substrate is not one huge piece of code but it is divided into so-called libraries or tools. One of them is the Subkey which is used to create and manipulate Polkadot/Kusama (or more generally Substrate) addresses and accounts. So, let’s see how can we simply create an address via the command line and sign a transaction using it.

$ subkey generate

Secret phrase `spend report solution aspect tilt omit market cancel what type cave author` is account:
Secret seed: 0x554b6fc625fbea8f56eb56262d92ccb083fd6eaaf5ee9a966eaab4db2062f4d0
Public key (hex): 0x143fa4ecea108937a2324d36ee4cbce3c6f3a08b0499b276cd7adb7a7631a559
Account ID: 0x143fa4ecea108937a2324d36ee4cbce3c6f3a08b0499b276cd7adb7a7631a559
SS58 Address: 5CXFinBHRrArHzmC6iYVHSSgY1wMQEdL2AiL6RmSEsFvWezd
$ echo "whatever message or transaction to sign" | subkey sign "your seed or private key"

How to choose the validator

There are several criteria (or metrics) you should pay attention to when selecting a validator. We will start with the basic ones which everyone should take into account and then we’ll talk about others which are a bit more advanced.

Basic criteria

First, let’s look at the picture with an overview of staking screen in a Polkadot JS wallet. We will analyze the individual fields here and talk about how their values ​​affect your nomination.

Identity

For a fee, Polkadot allows you to bind address to an identity using so-called registrars. They provide the network with a service to verify your identity — this means that you can add a link to your website or profile on a social network to your account and the registrar then off-chain verifies that it is really you. In the context of staking, this affects us in such a way that validators with verified identity are, in our opinion, more trustworthy (“not afraid to go to market with their skin”) than those who remain anonymous. Therefore, when searching for a validator, check only with identity (red circle).

Oversubscribed validators

As we mentioned in our article about the theory, the reward is paid only to the first 256 nominators per validator — a validator supported by more nominators is called oversubscribed. Therefore, select only those who do not have any of the brown icons next to their name (green circle, we will explain the meaning of slashing below).

Commission

The Commission is a fee associated with the operational costs of the validator which is determined as a percentage of the total staking reward. In general, the lower the fee, the better for you. But on the other hand, it also depends on how much risk you are willing to accept — there may be a group of validators with a great rating, verified identity, and enough stake which guarantees a stable reward with little opportunity for slashing. However, it charge higher commission than validators with worse parameters. So, it’s up to everyone whether they can accept higher level of risk or rather to pay a slightly higher fee. Of course, this may not always be the case, it is more of an illustration that a higher commission does not necessarily hurt.

Slashing

Slashing is a punishment for validator which is misbehaving or has outright malicious intents in the network. As we mentioned in our first part of this series, punishment rate is determined by the severity of its misconduct. However, the more important fact is that the penalty is paid from the whole stake — which means it will be partially paid even from the stake you have nominated to this validator!

Amount of the stake

One of the other criteria for selecting a validator is the amount of his own stake because it determines how much confidence he has in himself and how much he actually risks (see slashing). Therefore, the larger the validators’ own stake, the greater the motivation to take care of the operation of his validator carefully because any slashing would do a financial damage to him as well.

Advanced criteria

Now let’s move on to the Target page within the Staking section.

Statistics

Polkadot JS offers another way to find out more about the validator. There is a small button with a graph on the right side of the table with validators (highlighted in blue in our screenshot) — this will take you to the Validator stats screen. Here you ideally want to see zero slashing and a consistent curve for the other graphs (rewards and era points should not constantly jump up and down, we want to see a nice linear line).

Era points

As we explained in the first article, the validators’ reward is calculated using a scoring system. Therefore, these two graphs are closely related and the reward graph should look very similar to the graph of points earned per era.

Tools

Let’s briefly jump into the last section (it’s an awfully long article already :-). We will introduce two tools that can help you choosing the validator and manage your nomination.

Telegram BOT

The first one is the BOT for the Telegram which can monitor your address and send notifications based on various changes:

  • transfer of funds,
  • crediting of reward,
  • the occurrence of slashing,
  • one of your nominated validators has changed the commission,
  • and other governance and treasury functions.

Polkastats

Polkastats.io is a website that monitors events in the Polkadot network and derives various statistics and predictions from it. We are especially interested in the Staking section, where we can browse the nominator or a Targets section for a list of validators and the estimated reward.

Conclusion

Ugh, so we’re done 😊 If you’ve read this far, you have our admiration. We hope that this guide has helped you to understand staking in Polkadot and especially to maximize your earnings. Happy staking 😊

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Polkadotters | Kusama & Polkadot validators

Polkadotters | Kusama & Polkadot validators

Czech bloggers & community builders. We are validators of Polkadot, Kusama, Darwinia, Crab, Bifrost, HydraDX, StaFi, Centrifuge under the name: POLKADOTTERS