The document is split into more chapters. Every chapter is dedicated to one topic and you can skip between them.
Epochs and snapshots
Cardano network splits time into periods called epochs. One epoch lasts approximately 5 days. It means that if an epoch starts in the middle of Sunday then it ends approximately in the middle of Friday. The next epoch would start in the middle of Friday and ends in the middle of Wednesday.
At the beginning of each epoch, a snapshot is created. A snapshot is basically a record related to the distribution of ADA coins that have been used for staking in the previous epoch. It is the combination of pledges of pool operators and all delegated coins to their pools. Snapshots directly influence the total stakes of pools and their number of chances to become a slot leader and create blocks.
Let’s have a look at when you as a stake-holder can expect a reward.
Let’s assume that the current epoch is 210. You can delegate ADA coins in the whole epoch and you can change the delegation as many times as you wish. Only the last update before the snapshot is valid. A snapshot of the distribution of coins from epoch 210 is done at the beginning of the epoch 211. It is important to know that the snapshot is not used directly in epoch 211 but it will be used in the next epoch. The snapshots of epoch 210, which will be made in epoch 211, will be used later in epoch 212. In epoch 212, the protocol will assign slot leaders based on the distribution of coins that is valid in epoch 210.
In the current epoch, the network always calculates rewards for the previous epoch. It means that in epoch 213 the protocol will calculate rewards for epoch 212. The calculated rewards are always distributed in the next epoch. It means that in epoch 214 the protocol will distribute rewards calculated in epoch 213 and rewards are for stakes that have been used in epoch 212.
Note that if you do something in the current epoch, you will not be rewarded until the fourth epoch from the next snapshot. The cycle is naturally repeated over and over. If you delegated ADA coins to a pool Alice in epoch 210 and after that delegated coins to pool Bob in epoch 211, then you would receive the reward that is influenced by the performance of Alice pool in epoch 214 and you would receive the reward that is influenced by the performance of Bob pool in epoch 215.
Let’s have a look at how epochs evolve over time. The green epoch is the active epoch. Let’s consider that the current epoch is 212. You can see that the snapshot epoch is 211 and the distribution reward epoch is 214. When epoch 214 will be active, the snapshot epoch will be 212 and the reward epoch 216. Again, you will receive the reward in epoch 216 for the delegation that you have made in epoch 212.
Staking is a process of delegation of ADA coins to a pool. It can be perceived as a delegation of consensus power to a pool that will be creating blocks in your name and the names of other delegators. It is good to know how the staking process exactly works.
Cardano uses payment keys and staking keys. It is possible to create a wallet address from a payment key alone or you can create an address from a payment key and staking key. Your wallet is able to create both types of addresses and it happens in the background so you do not need to care about the creation of keys. A Cardano wallet is able to create a kind of delegation certificate that associates a staking key with a stake pool to which you decided to delegate your coins. The delegation certificate is submitted to the blockchain as part of a transaction so the usual fee applies. You have to pay a small deposit when you do it for the first time for a given staking key. If you later submit a new delegation certificate for the staking key it is not necessary to pay the deposit again. You just pay the usual transaction fee.
If you decide to delegate your ADA coins then a wallet creates an address from payment key and staking key. During the process of delegation, a delegation certificate is created and sent to the blockchain. You can understand it as a kind of registration. As we said, the certificate is associated with the staking key. All funds at the address are automatically delegated to the pool right after the delegation process.
Notice that no further action is needed and whenever the protocol takes a snapshot all funds on the address are delegated to the pool. You can always spend ADA coins from the address. You or somebody else can send new ADA coins to the address. At the beginning of an epoch, the protocol just checks how many ADA coins are on the address and adds it to the total stake of the pool.
Let’s have a look at an example. You have 10,000 ADA coins in epoch 210 and you decide to buy 2000 ADA coins. At the beginning of epoch 211, you will delegate 12,000 ADA coins. You can also receive a reward in epoch 211, let’s say 10 ADA coins and you buy 1000 ADA coins. At the beginning of epoch 212, you delegate 13010 ADA coins. Notice that both rewards and newly bought ADA coins are automatically delegated. If you delegate coins to a pool that produces blocks and do not change the delegation then you can forget the wallet and the number of ADA coins in your wallet will be increasing every epoch.
It is important to know that ADA coins never leave your wallet during the delegation. You always control them and you can spend them. If you sell all your ADA coins then you will delegate nothing in the next snapshot. Do not forget that if you decide to sell all ADA coins in epoch 211 after the snapshot and you have delegated coins to a pool that regularly generates rewards then you will receive ADA coins to the staking address in epochs 211, 212, and 213. It can happen that you sell ADA coins after the distribution of the coins in epoch 211 so you can have 0 balance on the address and you will receive rewards in epochs 212 and 213.
The same logic applies to the redelegation of coins to a different pool. Let's consider the following scenario. Paul delegated to pool Alice in the epoch 211 and decided to redelegate his stake to pool Bob in the epoch 214. Let's consider the epoch 215 as the current epoch (but it is not so important). As you can see in the picture below, the pool Bob use Paul's stake for the first time in the epoch 216 (the second epoch after delegation). Paul will receive rewards from Alice in epochs 215, 216, and 217 since Alice used his stake in epochs 213, 214, and 215. The pool Bob will use Paul's stake for the first time in the epoch 216 and Paul will receive the first reward from the Bob pool in the epoch 218.
Remember, that if you want to participate in staking then you need to have ADA coins in the wallet at the moment the snapshot is being taken. It does not matter what happens with coins after the snapshot and you can send them somewhere else. So you can wait for the snapshot that happens at the beginning of each epoch. Then you can send coins to an exchange and trade. If you manage to send coins back into your staking wallet before the next snapshot then you will not miss any reward. Also, the size of the reward is not affected by the fact that coins are not the whole time in the wallet. Put it simply, you basically stake all coins that are in the staking wallet at the moment of taking a snapshot.
Cardano does not have any kind of slashing or punishment mechanism that would affect your coins. The protocol never punishes delegators so you can never lose your coins from your wallet. Even if a pool is hacked and you have delegated to the pool, your coins are safe. Only a pledge of the pool operator can be stolen. Hack of a pool does not mean that the network or blockchain is hacked. The network will work on since there are plenty of pools that can create blocks.
If you would like to delegate your coins to more pools than you can do it by creating more wallets. You need to split your fund into more addresses and then delegate coins to a pool from each wallet separately. Do not forget that pools must produce blocks to be rewarded by the network. Delegators will be rewarded only if the pool gets the reward. You should use a tool like adapools.org and check the performance of pools.
People often ask whether they can switch off the computer with the wallet if they want to have the staking reward. All information about staking is present in the blockchain and the network can work with the data. So you can switch off the computer after delegation and you will receive a reward every epoch. You can imagine the wallet as a kind of interface that manipulates with data in the blockchain. Your coins are not actually in the wallet but in the blockchain. The same is true for staking. The Cardano network knows to which pools all delegator delegated ADA coins.
We will keep the document updated and we will add new sections with useful information. You can contact us and ask for anything. We can then extend the document.
Special thanks belong to Lars Bruenjes.