# Blocks & Epochs

Whenever a delegator votes for a validator, they immediately contribute to the modification of the total delegated amount. Effectively, they also modify the share distribution between all delegators. It makes share computation very complicated and requires dynamic re-calculation of the shares for each reward distribution. This may make the entire rewards distribution process very expensive. Since we are running the staking and reward distribution models fully on-chain, we aim to realize all the computations to be optimized in smart contracts. To reach this goal, we split the staking process into epochs so that gas consumption can be reduced significantly.

&#x20;

• An epoch is an interval with $$N$$ blocks inside.

• An epoch length can be equal to just one block. However, it can significantly increase storage size and bring no benefit.

• The average time for a block producing is 3 seconds, and 28800 (=24\*60\*60/3) blocks are expected to be daily produced.

&#x20;

B2 Sidechain will use the epoch size of 1 day. 1-day epoch allows spending only 1.7 million gas units a year per single user. Since the block size is around 80 million gas units, a delegator has \~40-50 years to claim their rewards before those can become unclaimable.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.antimatter.finance/b2/chain-architecture/blocks-and-epochs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
