All posts
#staking

How are blocks made on the Cardano blockchain?

Eystein Hansen
October 25, 2022
1 min

In Cardano, staking pools create blocks to update the blockchain. Every slot (every second), the staking pool checks a Verified Random Function (VRF) using the slot ID, the signing key of the VRF, and a nonce that consists of 2/3 of the VRF outputs from blocks produced in the previous epoch. Based on the total pool of stakes in the staking pool, a threshold is made, and the number produced by checking the VRF function has to be lower than this. There is also a slot coefficient, currently at 5%, meaning out of all slots, only 5% will be able to produce a block. This means that, on average, every 20 seconds, a block will be made.

Because you only need to reach a threshold to produce a block, you can end up in a situation where two or more pools all get to create a block at the same time; this is called a slot battle. In a slot battle, it is currently decided by a 2nd VRF and who has the lowest number is the one who will make the block. Previously this used to be the same VRF number, giving smaller pools an edge as they needed a lower threshold to produce a block and, thus, very likely also to win any slot battle.

Another battle happens when you have a race condition where two or more blocks try to reach the next pool before the next slot. For example, if one pool uses 1,5 seconds to propagate the block to the next pool and the other only uses 0.5 seconds, the pool that receives both will prefer the most recent one that was only propagated 0.5 seconds ago. These are called height battles, and we currently see fewer of them as the network is getting more optimized to have most blocks propagated across the network within 1 second or less. You can read more about height battles in this article.

At NBX, we can’t avoid slot battles since they are random. However, we o try to optimize our setup to ensure we can win as many height battles as possible through various means, such as using an in-house timesync server to ensure our block propagation is as timely as possible. If you want to stake through our custodial services, you can find our staking landing page here.

#staking
Eystein Hansen
October 25, 2022
1 min
Cookie Consent

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.