<!-- canonical: https://0xsimao.com/findings/metazero-ii-effect-rewards-accumulating-starting -->

# emissionStart has no effect, rewards will start accumulating starting on the first staker

Low/Info · Three Sigma · Omnichain RWA tokenisation · 6th April, 2024

Finding 3S-MZ-L02 of the MetaZero Staking security review.

- Protocol: https://metazero.gg/
- Report: /reports/metazero-ii
- Codebase: https://github.com/0xsimao/stakingContract/tree/dffac73e838a9fbd12bed18e41b9799177bcde7f
- Source: https://cdn.sanity.io/files/qoqld077/production/3e07b0c2806b62578b8031e88c59bc5dbd38de1b.pdf

---

### Description

emissionStart is set in the constructor, but it has no use other than summing with the
emissionDuration to set the emissionEnd. Rewards will be accrued as long as
block.timestamp is before emissionEnd and totalStakedAccruingRewards is non null.

### Recommendation

Either remove this variable or change the logic to accumulate rewards only after emission
starts.

### Status

Addressed in [#67d85d0](https://github.com/metazerogg/stakingContract/tree/67d85d0087e2cbe7547cb8a3eefad37b546366ca).

---

Related findings:

- [Attackers will reset `avgStart` of any user making rewards stuck for longer and get lost to savings](https://0xsimao.com/findings/exactly-protocol-update-staking-contract-ii-avg-rewards-stuck-longer): Exactly Protocol Update - Staking Contract
- [`rewardData.releaseRate` is incorrectly calculated on `RewardsController::config()` when `block.timestamp > start` and `rewardData.lastConfig != rewardData.start`](https://0xsimao.com/findings/exactly-protocol-update-staking-contract-reward-release-rewards-timestamp): Exactly Protocol Update - Staking Contract
- [Immediately start getting rewards belonging to others after staking](https://0xsimao.com/findings/tokemak-rewards-belonging-others-staking): Tokemak
