<!-- canonical: https://0xsimao.com/findings/metazero-i-genesis-placed-constant-gas -->

# genesisLimit can be placed as constant variables to save gas.

Low/Info · Three Sigma · Omnichain RWA tokenisation · 27th January, 2024

Finding 3S-MetaZero-N05 of the MetaZero Omnichain NFTs security review.

- Protocol: https://metazero.gg/
- Report: /reports/metazero-i
- Source: https://cdn.sanity.io/files/qoqld077/production/1b1ab4ff365756fe1d86767f1e06744407570f5a.pdf

---

### Description

Constant variables are cheaper as no storage writes are required, so genesisLimit should
define the constant keyword.

### Status

Addressed in a79fbc8.

---

Related findings:

- [Storage variables should be cached whenever possible to save gas](https://0xsimao.com/findings/glacier-storage-cached-whenever-gas): Glacier
- [Variables should be cached to memory to save gas](https://0xsimao.com/findings/metazero-ii-variables-cached-memory-gas): MetaZero Staking
- [Storage variables can be cached to save gas](https://0xsimao.com/findings/mitosis-storage-variables-cached-gas): Mitosis
- [Storage variables can be cached to save gas](https://0xsimao.com/findings/orange-storage-variables-cached-gas): Orange Bridge
