Stake Pool: Network entity that, among other things, is in charge of producing and validating blocks. You can act individually, or as a third party on behalf of various network users who choose to do so.
Stake: Amount of ADA delegated to a Stake Pool that a user controls, or amount of ADA that controls a Stake Pool.
Slot: Time unit of the Cardano network that lasts one second, within each Slot there may be the possibility of creating a block.
Slot Leader: Stake Pool that has been assigned the ability to create a block for a particular Slot.
Verified Random Function (VRF): Verified random function that is used, among other things, to find out if you are chosen as a Slot Leader for a particular Slot.
CALCULATION OF SIGNATURE SLOT OUROBOROS : The factors that are taken into account are the vrf key, the% of active stake (sigma), the decentralization factor d and a parameter called nonce that is random.
Key Evolving Signature (KES): Evolutionary signature key, used by Stake Pools to sign the blocks they produce.
Number that can be Only used Once (Nonce): Number that can be used only once, it is one of the input values of the VRF.
Proof of Stake: Proof of stake. Consensus algorithm of a Blockchain, in cardano it is called Ouroboros.
In simple terms, a Stake Pool of the Cardano network, is a participant in the Proof of Stake consensus algorithm, called Ouroboros.
During the Shelley phase, the Cardano network will use Ouroboros Praos. Where the main functions of a Stake Pool are:
1- Forge new blocks 2- Check new blocks 3- Confirm transactions
1- For each Slot, which lasts 1 second, the Stake Pool uses the VRF to check if it is a Slot Leader. This function takes as input values: The ID of the Slot, the Nonce, and the VRF keys to sign, and generates a random value as output. If the output value is less than a certain threshold, which is determined by the relative Stake of the Stake Pool, then it is crowned the Slot Leader for that particular Slot. The higher the Stake of a pool, the more likely it is to become a Slot Leader.
2- If a Stake Pool is assigned as Slot Leader, then it signs the block using the KES signature key, together with the output computed by the VRF, the proof that it was chosen as the Slot Leader, and the pending transactions from the network.
3- Finally, this new block created by said Stake Pool is transmitted to other nodes in the network.
Since a Stake Pool needs to be checking every second if it is chosen as a Slot Leader, it is imperative that Stake Pools are online 100% of the time, to ensure that they can produce a block if they are chosen as Slot Leader.
The Nonce value used in the VRF is used as a seed value to generate a random number. It is created by making a hash with the outputs generated by the first ⅔ VRFs of the blocks from the previous epoch.
If a Stake Pool is not forging blocks, it still plays a role within the network by verifying blocks and confirming transactions.
- The Stake Pool uses the VRF to check if it is chosen as Slot Leader for each Slot.
- A new block is received by the Nodes paired with yours.
- The Stake Pool verifies the VRF proof of the block, using the public VRF verification key of the corresponding Stake Pool that signed the block. If valid, it is added to the local blockchain.
An interesting property of Ouroboros Praos is that each Stake Pool tries independently to determine with the VRF whether or not it is chosen as Slot Leader. The leadership allocation calendar is known in advance, and the pools will know who was chosen as the Slot Leader at the start of the epoch.
It can also happen that coincidentally, two or more Stake Pools are chosen by the protocol as Slots Leaders of a single Slot. This phenomenon is called Battle of Slots. Slot battles are resolved by the VRF, the block with the lowest output value thrown by the VRF is determined as the winner of that slot.
The code within the Cardano Nodes developed by IOHK performs all these actions, after the Stake Pool operator has configured the program to operate it.