<!-- canonical: https://0xsimao.com/findings/singularity-decimals-underlying-calculations-aggregators -->

# Decimals in ZKToken are not set to the underlying decimals, which will likely harm tvl calculations in aggregators

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

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

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

---

### Description

ZKTokens are minted 1:1 to the underlying assets, so should inherit the same decimals. For
example, if USDT is the underlying asset, and 100 USDT are locked, it will mint 100e6
ZKTokens. As the decimals are 1e18 in the OpenZeppelin implementation, this will equal
much less TVL.

### Recommendation

Change the constructor to set the decimals according to the underlying asset. Keep in mind
that decimals are not part of the standard, so it may be required to manually set the
decimals to the right value.

### Status

Addressed in [#37bc421](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/commit/37bc4217fff9045a52ba4a66b68aeaabd0016ae2), [#dc4f4a4](https://github.com/portalgateme/darkpool-v1-zk-contracts-fork/commit/dc4f4a4b5c1a8cee66e65fc053d202ba96fb41b7).
