Unit of Time: Block or Second?
The length of a RANDAO round depends on the type of time units used, which can be either seconds or blocks. The time units are chosen based on the characteristics of the chains where the protocol is implemented, whether they are time-based or transaction-based blockchains.
・Time-based blockchains generate new blocks at regular intervals, regardless of the number or size of transactions. This means that the block time, which is the average time it takes for the network to generate a new block, is fixed and predictable. Examples for these blockchains are Ethereum, Polygon.
・Transaction-based blockchains, on the other hand, generate new blocks when a certain number or size of transactions is reached. The block time in these chains is totally dependent on the traffic of the network, and therefore is completely unpredictable. Examples for these blockchains are the Oasys hub and its layer-2 chains.
For former chains, block is preferred as the unit of time for a RANDAO round because it is aligned with the third objective of the protocol, which is to have random numbers generated for every block. Since the block time is predictable, the duration of a RANDAO round is also predictable. It means that seconds are also a possible choice. However, because the block time is just an approximation, the alignment between a RANDAO round and blocks are not always matched. The third protocol’s objective is consequently not achieved perfectly.
For latter chains, since the block time is unpredictable, the duration of a RANDAO round based on blocks is unpredictable either. This introduces extra difficulty to participate in the RANDAO protocol. Therefore, seconds as the unit of time is the better choice.
Last updated