<!-- canonical: https://0xsimao.com/findings/metazero-ii-constants-hardcoded -->

# Constants should not be hardcoded

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

Finding 3S-MZ-N04 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

Constants should not be hardcoded due to readability purposes.

### Recommendation

Replace 10000 by uint256 private constant BASIS_POINTS = 10000,
200 by uint256 private constant MAX_FEE = 200 and
15 days by uint256 private constant MAX_TIMELOCK = 15 days.

### Status

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

---

Related findings:

- [Constants should be placed as constants and not hardcoded for better readability](https://0xsimao.com/findings/fuji-finance-constants-hardcoded-better-readability): Fuji Finance
- [Hardcoded variables should be placed as constants](https://0xsimao.com/findings/metazero-i-hardcoded-variables-placed-constants): MetaZero Omnichain NFTs
