Cardano Staking Explained
Last Updated: 1st November 2018
Cardano is a technological platform that facilitates the transfer of the Ada cryptocurrency, which is the native asset of Cardano. Cardano is intended to do more than just allow for the transfer of digital funds, it will also house a computing layer that will be able to handle smart contract development. Meaning that Cardano will also be capable of running decentralized applications (dapps). Included in this, is also Cardano staking, which is the consensus algorithm that will underpin the entire operation of the Cardano platform.
Cardano utilizes a proof of stake algorithm known as ‘Ouroboros’, which is the mechanism that determines how individual nodes reach consensus as to the state of the ledger. Proof of stake is the preferred consensus mechanism for Cardano, instead of proof of work, because of the energy consumption considerations that come with the proof of work mechanism. For example, Bitcoin is a cryptocurrency that makes use of proof of work, and running the protocol consumes a tremendous amount of energy, with it being estimated that approximately 6.5 million American households could be powered by the energy that is consumed whilst operating Bitcoin.
Stakeholders and Slot Leaders
With Cardano staking, a node is selected to generate a new block based on their relative economic stake in the network. In other words, nodes are selected to form a new block premised on the probability proportional to the amount of coins that the node possesses. Thus, the more coins that a node holds, the increased likelihood that the node will be selected to generate a block. Nodes on the Cardano network that possess a positive stake are known as ‘stakeholders’, and nodes that are chosen to form a new block are called ‘slot leaders’.
Effectively, only stakeholder nodes are capable of running the Cardano protocol, as only these nodes are capable of being chosen to become a slot leader, and generate new blocks for the blockchain. In generating new blocks, a slot leader will listen to transactions that are propagated by other nodes on the network, and form a block from those transactions, a slot leader will then sign this block with its private key and publish it to the network.
Epochs and Slots
With the Ouroboros protocol, time is divided into ‘epochs’, with each epoch being further subdivided into ‘slots’:
| slot 0 | slot 1 | … | slot N |
————– epoch M —————
As the diagram above demonstrates, Ouroboros divides time into ‘epoch M’, with that epoch divided into ‘slot 0’, ‘slot 1’ and so on and so forth. Each slot lasts for a brief period of time e.g. 20 seconds.
A slot within an epoch will be filled by only one slot leader (SL):
| slot 0 | slot 1 | … | slot N |
SL 0 SL 1 SL N
Within each slot, a slot leader possesses the right to produce only one block. If a slot leader fails to make their slot and produce a block (for example because they were offline), then the right to produce a block within that slot is lost, they will have to be elected again.
Slot Leader Elections
The election of slot leaders plays a vital role in the Ouroboros protocol. Slot leaders can only be elected from a pool of stakeholder nodes, and not all stakeholders are able to participate in elections. Only nodes who have enough stake (for example, 2% of the total stake) are eligible to become stakeholder nodes, these group of nodes are known as ‘electors’.
The role of electors is to elect slot leaders for the next epoch during the current epoch. Because of this, by the end of the current epoch, the slot leaders for the next epoch are already known. Once slot leaders are chosen for an epoch, they cannot be changed. It is also important to note that a stakeholder node can be elected as a slot leader for more than one slot during the same epoch.
Although anyone from the group of stakeholders stand the chance of becoming a slot leader, an important idea behind Cardano staking is that stakeholders with more stake possess a higher chance of being elected as a slot leader.
Cardano staking will also include a reward system, in which slot leaders that invest their computational resources to generate new blocks are rewarded. According to the Cardano road map, the incentive and fee distribution scheme that will form part of Ouroboros is still in the review stage. Once this stage is complete, the scheme will be implemented into code.