<!-- canonical: https://0xsimao.com/findings/m-0-inconsistent-naming-pure-epochs -->

# Inconsistent naming of function in PureEpochs

Low/Info · Three Sigma · Stablecoin framework · 8th January, 2024

Finding 3S-M^0-N12 of the M^0 Minter Gateway security review.

- Protocol: https://www.m0.org/
- Report: /reports/m-0
- Codebase: https://github.com/0xsimao/ttg/tree/a8127901fa1f24a2e821cf4d9854a1aa6ac8088c
- Source: https://cdn.sanity.io/files/qoqld077/production/1cdafafad874aba76e062ad8c216c98338c096db.pdf

---

### Description

The [PureEpochs](https://github.com/MZero-Labs/ttg/blob/a8127901fa1f24a2e821cf4d9854a1aa6ac8088c/src/libs/PureEpochs.sol) library implements a variety of functions centered on the definition of
epochs. For example, it includes the following functions:
- getTimeSinceEpochStart
- getTimeSinceEpochEnd
- getTimeUntilEpochStart
It also includes the function getTimeUntilEpochEnds. The naming of this function in
particular is inconsistent with the remaining ones.

### Recommendation

Change the name of the getTimeUntilEpochEnds function to getTimeUntilEpochEnd.

### Status

Addressed in [#63b247c](https://github.com/MZero-Labs/ttg/commit/63b247c71c2d53ad3d648d58b5dd02deed7ac1a4).
