The Ultimate Cosmos Delegation Guide for real idiots
The first hub of Cosmos has launched and this means Atoms can now be delegated and since a few days are even transferable, which means that many people will ask themselves “How do I delegate my freshly acquired currency to reap some fine interest?”.
This article consists of 3 parts, A) I will give a short introduction and try to lower the niveau with bad jokes and related imagery. B) I will try to explain how to pick the right validators for the delegations and in C) I will give an explicit guide how to delegate. For most readers, this will not be an interesting part, since it is much easier with a Ledger Nano and most will go this route for which enough tutorials exist. But for some others, it makes sense to learn how to do offline transaction signing with Cosmos.
A) Since we are not all Linux Experts who can’t wait to finally upload their consciousness to the cloud, we will be very overwhelmed by the complexity of the topic. This is why I try to write this guide for real idiots.
To understand delegation one should first understand Cosmos. I have written an article about this more than a year ago (Cosmos / Tendermint explained for real idiots) and it might be a good entry. Otherwise, if you understand why Cosmos, let’s think about why Delegation? The main task for Delegators is to distribute voting power among validators. This gives decentralization to Cosmos. There are not just 100 validators doing their thing, all other holders of Atoms can participate in the consensus as well, but not by running servers, but by controlling validators. So the most important part is to pick validators wisely and withdraw the stake from them if they act bad. Acting bad comes in different colors and strengths. The worst is double signing, which is an attempt to steal money in essence, less worse is going offline and not participating in the consensus and there is also missed blocks, which is not optimal, but it can happen once in a while, but it is a good sign if a validator does not miss blocks. Of different color is the behavior of a validator. The double signing and missed blocks is measured automatically by the network and is very transparent, let’s call it hard fuck-ups. The behavioral things, let’s call them soft fuck-ups, are mostly if the actions and decisions of a validator in the ecosystem and this is not automatically measured by the network. One extreme example is building a cartel. For example, if the biggest 3 validators join forces and can halt the network. This is really bad for the ecosystem but can be gamed by these 3 validators. For example, they could short Atoms, halt the network, wait until price collapses and sell the shorts. The job of the delegators is to take away delegation from those and support all others so that they lose voting power until they can’t form a cartel anymore. Another thing might be that they block advances in development and upgrading to new software, because it is not beneficial to them, even though it is beneficial to the whole ecosystem. One typical example is the Bitcoin miners, who did not want to have bigger block sizes, to keep the transaction fees high. So there are a lot of possible scenarios and the job of the delegators is to detect them and enforce transparency. This is why decentralization in Cosmos is more than 100 validators.
So how does one become a delegator? If you are an Atom holder, all you have to do is delegate your Atoms to a validator or many validators. If you are not an Atom holder, you have to acquire Atoms beforehand (as usual this is not investment advice, be aware of the south sea bubble, etc.). Delegating means that your Atoms cannot be transferred for 3 weeks, but you can redelegate to other validators instantly. So if you are a daytrader or plan to sell your Atoms soon, then it does not make sense to delegate, but if you want to HODL anyway, delegating is a no-brainer. But what are the benefits of delegating? First, you are allowed to vote on governance proposals on the Cosmos hub, which is great, because everyone loves having an opinion. But the best part is that you receive Atoms over time. This interest, reward or inflation heavily incentivizes delegating and running validators and is why we want to delegate over long time periods. So how does this free money work? It consists of 2 parts, the first is yearly inflation and the second is fees from transactions. Sounds like Bitcoin, yeah it is similar, but for Bitcoin, the yearly inflation becomes less and less until there are only fees left. But for the sake of analogy staking coins (delegating) in a PoS system is like mining in a PoW system. Of course there are differences, first, you can’t use your stake on other coins, which works with miners in many cases. You can’t just produce more miners like GPUs, you must buy Atoms from other holders to increase your “mining” capacity. And you don’t need any technical knowledge as a delegator, only validators need that. Well, you can also invest in a mining fund, then you don’t need technical knowledge as well, but the premiums you pay are often absurd. However, this article is not about comparing PoW and PoS, this might be an interesting topic for another story.
B) So let’s look at the 2 parts, first the fees, this is very easy to explain: Whenever someone sends a transaction, a fee must be paid and this fee is given to all stakers. If you participate in the process of creating new blocks, then you get your share of the fees proportional to your stake. Delegators and validators participate both in this process. Does that mean validators do all the work by running nodes and still delegators get the same? Well, no, there is a commission, which is charged by the validators. Depending on which validator you chose, the validator gets a fraction of your rewards, for example, 10%. We will discuss this commission in this article quite extensively. So fees are quite easy to explain but hard to predict, since nobody knows how many transactions will be sent to the Cosmos hub in the next months. The situation is different for inflation. There is a targeted inflationary rate of 7% per year. Does that mean you get 7% on your staked atoms? No. This is a targeted value, which is achieved when 66.6% or more of Atoms are staked. There are good reasons, why the Cosmos network wants to have 66% of Atoms staked, but it is not the purpose of this article to explain byzantine fault tolerance. For that, better read my introductory article linked at the top. So in case, there are less than 66% Atoms staked, then the inflation goes up, to 21% at most. However, we should expect to have 66% staked in the long run. Take home message here is: 7% inflation will be what we see in the future. But there is some important thing: inflation is regarding all Atoms, not only staked coins, also unbonded Atoms are inflated. In contrast to staked Atoms, the inflationary Atoms from unbonded Atoms are not given to their holders but rather to the other stakers. So even if 66.6% are staked and the inflation is 7%, then the interest on staked Atoms is not 7%, because there are 33.3% Atoms which are not staked but give inflationary Atoms to the stakers. This means at 66.6%, the interest rate on staked atoms is 10.5%, which is 7% + 3.5%, the inflation of the 66.6%, plus the inflation of the remaining 33.3%. I try to keep it clear with wording, but it is not easy in this example. So inflation is how Atoms become more over time and interest is what you actually get for your bonded Atoms. In Cosmos interest is always higher than inflation for bonded/staked Atoms. There will never be all Atoms staked, so 7% is more like the lower limit and not the expected value. Next example, let’s assume 50% Atoms are staked, then the inflation rate is 10.5% since the goal of 66% staked is not reached, the rate increases and is higher than 7%. In addition, half of the Atoms are staked, the other half is unbonded, which gives the inflation from these unbonded Atoms to the holders of the staked Atoms. This gives a net interest rate of 21% per bonded Atom. The good news is, it gets even more complicated. Will you get 21% in such a case? No, not as a delegator, because you have to delegate to validators and these charges a commission. If they charge 10%, you get the net interest of 18.9%, if they only charge 5%, you get 19.95%. But there are also validators, who do not charge a commission, then you get the full amount. Does that mean you have 21% more after 1 year? Well, only if the validator does not get slashed. Slashing is a mechanism where the validator gets punished for bad behavior and the delegators get also punished but not as heavily. This is the mechanism that drives delegators to pick good validators who run stable servers. Don’t be too afraid, the network is running for over a month and no slashing has occurred yet. So this won’t be an event that happens often.
Almost mad? Not so fast, it gets more complicated! Ok, so if the validator does not double sign, does not get jailed, etc., then I have the 21% of this example after 1 year? Yeah, but there is also this sweet concept of compounded interest. While the year is ongoing, you can bond your rewards after you get them, for compounded interest. The compounded interest you say? Even more gainzzzz? Yes, but you can’t do it every 2 minutes, because delegating your rewards cost some small fee. Also it doesn’t change much if you do it once a day or once a week. But the good news is, that these were all things that make it complicated and now we can start to put all the pieces together. First of all, there is the overall inflation rate, which you cannot really change, it depends on the overall ratio of bonded Atoms and those unbonded. Of course, this influences our decision whether we want to delegate Atoms or trade or get rid of them. But once we have decided to delegate, it is no longer something that changes our decisions. So in case the whole passage before this sentence made you think “Hell, what the fork? I don’t know if this is maybe too complicated for me”, then don’t worry, it is mainly for the ones who are curious to know, it is nothing you need to know by heart, when you want to earn reward. The only thing that is really important comes next. So the question is, which validators do you want to pick for delegation? Some validators have a high commission, some have a low commission and here we have real influence with our decision. The lower the commission the more benefit we get from delegated Atoms, but there are other things to consider as well and these are often exclusive to each other. The next thing is the self-bonded Atoms of a validator. In principle, you want to pick a high value here, since this means that a validator has a lot to lose. If someone self-delegates Atoms worth of $10 million to his validating node, then it is obvious that spending, for example, $10k for security is a no-brainer. If you self-bond Atoms worth $5000, then someone might not spend $10k for IT security. The logic is simple, the more you have to lose, the more you will invest to secure your system. Because if you mess up, you will lose your staked Atoms. Kind of similar is the track record of a validator, the Winners of the Game of Stakes are obviously suited with a better track record, than some validator you have never heard of. So here we can see clearly that one has to find a balance between security and profitability. It does not make sense to pick a validator that has 1 Atom bonded and no proof that the node is secured quite well, just to avoid a commission. Let’s assume the net interest rate is 10%, then after 1 year with 0% commission we have 110% of what we have before, but since we have picked the least secure validator, it got slashed for example 2 times for 1%, then we have 107.8% after 1 year. In contrast, another validator might charge 10% commission but does not get slashed, then we have 109% after 1 year, so this makes more sense economically, even though we pay a commission. But these are just examples. Nobody knows how often bad validators will get slashed and what makes sense economically. But let’s give some examples for better understanding:
a) Atom Sandler
This is an example for a high commission (25%), high self-bond (~450k Atoms), no track record validator. Let’s be honest, the name Atom Sandler is funny enough so that one should actually delegate some Atoms to this validator. But then the commission is really high, so it depends, how you value this great name.
This is a good comparison to Atom Sandler because it is mainly the same, high self-bond (~500k Atoms), no track record, but a low commission (7%). So here we can see, we get the same characteristics, but with a much lower commission, but no pun included
Here we have another contrast, this validator has also a low commission (6.1%), but it has almost nothing at stake, only 2700 atoms and it is even funnier since it claims to be run by an AI and one should not trust humans. The joke gets even better when one clicks their website that is down for a month right now.
d) Certus One
This has enormous delegations (8.7M) , even though the self-delegation is quite low (55k). Also the commission is not really low with 12.5%, so one might ask oneself, why they have so many delegations? The answer is track record. The 2 guys from Certus One are to the Cosmos infrastructure what the Bogdanoffs are to Bitcoin price. They are the Alpha and the Omega. If they enter a room, every computer recognizes their presence and starts to vibrate and emit bright light. What do I mean with that? They have won the Game of Stakes and their instructions on how to run a Cosmos Validator are the best. This means many believe they provide the best security of all.
Here we have the last of all extremes. Very low self-delegation (28k), very high delegations (4.7M) and the minimum commission of 0%. So this might be one of the examples, where the commission is really low and for the validator, there is not so much to lose… However it is Sunny, see the image above, he is one of the Cosmos researchers so, like many crazy scientists he is absolutely trustworthy. Also, he thinks Ethereum classic is the real deal. Let’s be honest, I have delegated all my money to him.
So I hope I could help to make things a bit clearer here. There is no best choice, every validator has its own characteristics. However most people want to pick the safest and most secure validator, so they don’t lose any money. This is clever and makes sense since crypto is volatile like hell already and we don’t need additional risk. However, it is a widespread misconception that there is a single best validator to safely delegate. The best validator to safely delegate is all of them. If you spread your money across all validators the risk is the lowest. Maybe cut the ones out with 1 Atom as self-delegation, but if you distribute among many validators, then the risk of losing all your atoms is nonexistent. Keep in mind, that the chain halts if 33% of validators mess up. So if you want to be absolutely safe, split as much as possible. If you want to have a really low commission, split among those with low commission. If you want to help the network decentralize, also split among many. Unfortunately, this is more work, than a single click, but yeah, please save 10 minutes, when investing…
I’ll try now to sum up this most important part of the article:
- You get fees and inflationary atoms. It’s complicated and we can’t really influence it, but 7% per year is guaranteed if we stake, 9% is likely.
- We can influence the choice of validators, which get our delegations. Diversification is safety, low commission gives high yields, high self-delegation and good track record are good validators. Do your own research. Don’t read overly long medium articles giving you advice and shilling their own secret validators. Sniff the butts of the validators. If they smell good, delegate. No, seriously, don’t sniff the butts, but maybe have dinner with each validator and then make your decision, or just freak out because there are so many options.
3) This is not investment advice. Did I say this already? It is so important nowadays, I don’t live in the US, I don’t know if it is necessary for me to say that, but please delegate your money to Sikka, he is very good. This is not investment advice.
C) Now I come to the final part, in which I try to explain how to delegate with an offline and an online computer so that your key never gets exposed. You can also use this technique to send and receive your atoms and you can also vote online. All you have to do is change the command in Step6. So now I’ll present exactly how I delegate using an offline and an online computer, where my private key never leaves the offline computer. This is quite a special solution. If you have a Ledger Nano, then it is much easier to use it and follow a guide on how to use a Ledger Nano (How to Store Your Cosmos ATOMs on Your Ledger and Delegate with the Command-Line). However some people don’t want to buy a Ledger, must handle many accounts or want to be able to program code, which is not possible via graphical user interfaces (GUI). For me this makes even more sense, since I work on a project using cosmos-sdk and knowing the CLI very well is important anyway. So if you want to go the dirty hand's route, here it comes. The best source how this command-line interface (CLI) works is https://cosmos.network/docs/cosmos-hub/delegator-guide-cli.html.
Explicit content (this means explicit instructions, not what you think):
Install Linux. I have used several Linux distribution in my life and have used Cosmos on 3 different distributions, but I’m not a Linux expert (the safest way to identify someone not being a Linux expert is if he claims to be a Linux expert, this is like quantum mechanics, if you think you do understand it, then you don’t). Also for me, it is not a religion, so I don’t care, I just want a working OS. For many cutting edge IT software projects Linux is the only OS that works and this applies to Cosmos as well. So get Linux, from what I have tried, Antergos is the easiest. You can also use Ubuntu, which is a bit more work to set it up. I prefer Antergos in this context because it is simple and fast to install Arch Linux. All you need to do is use etcher to burn the live ISO on a USB stick and then install it on the disk you want to use. In our case, we need 2 disks, one for the computer that never touches the internet, the other for the computer which broadcasts the messages. As a desktop manager, I pick XFCE, but you can also go with Gnome, KDE or whatever you like. After installing Antergos and booting, the only thing you have to install is Go. Just use the Add/Remove Software program that comes with Antergos and install Go. If you decided to use other distributions, like Ubuntu, then you need to check if the Go version is the newest, often it is not and for Cosmos, you need to find the repository with the newest go release.
Install Cosmos. We follow this guide, but we have to change bash_profile, to bashrc, so commands change to:
mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export GOBIN=$GOPATH/bin" >> ~/.bashrc
echo "export PATH=$PATH:$GOBIN" >> ~/.bashrc
After that we run the cosmos specific commands:
mkdir -p $GOPATH/src/github.com/cosmos
git clone https://github.com/cosmos/cosmos-sdk
cd cosmos-sdk && git checkout master
make tools install
and finally, check if the version is displayed properly:
$ gaiad version --long
$ gaiacli version --long
here you should see the current cosmos version, it depends on when you read this document, at the moment (April 2019) cosmos-sdk: 0.34. Now we have installed Cosmos. Great.
Configure Cosmos. Now we need to setup Cosmos so that it is connected to the Cosmos hub. Just for the clarification: Cosmos is a network of blockchains and its first hub is the Cosmos hub and there are the Atoms which we want to delegate. Now we can either setup an own node or just connect to another node, the latter is easier and fits our purpose:
gaiacli config nodehttps://cosmos.chorus.one:26657/
We also need to set that trust-node to true and specify the chain-id of the cosmos hub:
gaiacli config trust-node true
gaiacli config chain-id cosmoshub-2
Then we can test the configuration with this command:
gaiacli query staking validators
In case everything went well a list of validators should show up. In case this does not work, most likely the cosmos.chorus.one address is no longer valid, one should google than a public node of the Cosmos hub.
Get Cosmos Account. You do this on the offline computer. So you have to repeat Step1 and 2. Step3 is not necessary since there is no internet anyway. Once we have installed cosmos-sdk on the offline computer, we disconnect it from the internet and enter the following command:
gaiacli keys add horst
Now we have to specify a password, which is only for the local storage of the key on this offline computer. The important part comes afterwards, the 24-word mnemonic and the address. The mnemonic is the secret of your Cosmos address. Don’t lose it. This is the thing. Keep it encrypted whenever you transfer it. The address is needed whenever you want to transfer to this address. We should note it and transfer it to the online computer.
Transfer your Atoms. In this step, we need to transfer our Atoms to the address that was generated offline. Wherever you have it, send it to the address that you have noted in Step4, it will be something like cosmos1abcde123….
Generate a transaction. In this step, we generate our delegation transaction. For simplicity, we will refer to the address as cosmos1abcde123 and the validator we have picked is cosmosvaloper1xyz. We enter the following command on the online computer:
gaiacli tx staking delegate cosmosvaloper1xyz 1000000uatom --from cosmos1abcde123 --gas auto --gas-prices 0.025uatom --gas-adjustment 1.5 --generate-only > unsignedBond.json
gaiacli is the program that we have installed, the rest are parameters. tx staking delegate is the specific command, which needs 2 arguments, the validator that gets the delegation and the amount to delegate. In this case, we have specified 1 atom = 1000000utaom. After that the flags follow, — from is your own address, — gas auto, — gas-prices 0.025 and — gas-adjustment 1.5 are picked so that the transaction will go through and sufficient fees are paid. — generate-only means that the transaction is only generated and not signed and not broadcasted. > unsignedBond.json is the last part, which is not Cosmos specific but rather Linux specific, which writes the result into the given file. So the transaction is saved in unsignedBond.json. Also, we want to find 2 parameters that we need on the offline computer by entering
gaiacli query account cosmos1abcde123
We will get a response with sequence, that should be 0 since no transaction has ever been done with this account and account-number which is some number we have to note, for simplicity let’s say 1337.
Sign transaction. We take the unsignedBond.json and transfer it to the offline computer. If your paranoia is strong, then you transfer via pencil, but a USB stick is also fine if you can handle your inner demons. After we have transferred the file, we enter
gaiacli tx sign unsignedBond.json --from horst --offline --chain-id cosmoshub-2 --sequence 0 --account-number 1337 > signedTx.json
In the future sequence will increment by 1, whenever we sign the next message and account-number will always stay the same for this account. If you get signature verification fails, then in most cases cosmoshub-2 is wrong, sequence or account-number. We will also have to enter the password we have specified for horst. Again > signedTx.json writes the result into this json file.
Broadcast transaction. This is the last part and we take the signedTx.json from the offline computer to the online computer and enter
gaiacli tx broadcast signedTx.json
This is the last step and either it worked and we can see the transaction on mintscan, hubble, stargazer or something similar or in most cases the gas will be too low, then we have to start all over again, increase the sequence, supply more gas and sign offline and broadcast again. If it worked, congratulations, you have done it.
If you have read down to this line, I give you the special attention award of the internet. Once I read an article that explains how to be a successful medium article writer. The most important message was to write small articles, which can be read in 5 minutes. As you can see I have not submitted to this rule and this is my personal attempt to overcome human limitations by writing articles that need more than 10 minutes to read. As a very kind thank you, I will answer frequently asked questions now:
Q: What is the circulating supply of Cosmos?
I have asked this on Reddit and Telegram already and after I did not get an answer after 10 seconds, I left the channel, this is your last chance, to get community members. Answer my question. Why do you keep making this question so long?
A: Sorry, I will answer immediately, I know, the answer to this is somewhere hidden deep in the vaults of the Cosmos. For example here: currently 120M of 238M are bonded. 10% are also vested of the 238M, so only 212M Atoms are really able to circulate. Now the question is if you count bonded Atoms towards circulating supply. Actually, it is not circulating, but it can be made circulating within 3 weeks and people use circulating supply to determine what a project is really worth. So regarding this, it should be counted in. Coingecko does, Coinmarketcap does not know, so let’s see, I don’t know, the ultimate fate of the universe is a similar complicated topic.
Q: What was the ICO price? I have heard $0.1, x30 or x40 real? This is scam!
A: No no no, this is a real. My wife still doesn’t believe me. Actually, it was not an ICO but a fundraiser and it was more than 2 years ago. So, keep in mind, 2 years in crypto are 200 years in real life. Imagine how unspectacular x30 would be if you invested in Apple 200 years ago…
Q: Can I become a validator?
A: Yes, please read this
Q: When will IBC, the interblockchain feature, be implemented?
A: As far as I have heard in summer, a more Cosmos-typical answer is “in 1 month!”
Q: When Binance?
Q: Why do you include so many absurd pictures here?