<!-- canonical: https://0xsimao.com/findings/singularity-staking-asset-immutable-changed -->

# stakingAssetManager in ZKToken may be immutable as it is never changed

Low/Info · Three Sigma · Private DeFi access · 26th February, 2024

Finding 3S-SG-N01 of the Singularity security review.

- Protocol: https://www.thesingularity.network/
- Report: /reports/singularity
- Source: https://cdn.sanity.io/files/qoqld077/production/45b8aac56a2b8e3b557df4329ac9bf8220b64012.pdf

---

### Description

stakingAssetManager in ZKToken can be made immutable as it is set in the constructor and
never changed.

### Recommendation

Set stakingAssetManager to immutable to save gas on reads.

### Status

Addressed in [#bff8628](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/commit/bff8628484cb2717fdd137a891c6fde44f87fc62).

---

Related findings:

- [The health of a ```ProtectedListing``` is incorrectly calculated if the ```tokenTaken``` has be changed through ```ProtectedListings::adjustPosition()```.](https://0xsimao.com/findings/flayer-health-through-listings-adjust): Flayer
- [DoSed liquidations as `PrizeVault::liquidatableBalanceOf()` does not take into account the `mintLimit` when the token out is the asset](https://0xsimao.com/findings/pooltogether-the-prize-layer-for-defi-liquidations-prize-liquidatable-mint): PoolTogether Prize Layer
