frozenPeriod is subtracted twice for calculating the current price
If the contract had been frozen, the current stage price will calculate the price by subtracting the `frozenPeriod` twice and result in wrong calculation.\\n`getCurrentBlockNumber()` subtracts `frozenPeriod` once, and then `getStageAtBlock()` will also subtract the same number again.\\n```\\nfunction getCurrentStage() public view returns (uint8) {\\n    return getStageAtBlock(getCurrentBlockNumber());\\n}\\n```\\n\\n```\\nfunction getCurrentBlockNumber() public view returns (uint256) {\\n    return uint256(block.number)\\n    .sub(frozenPeriod); // make sure we deduct any frozenPeriod from calculations\\n}\\n```\\n\\n```\\nfunction getStageAtBlock(uint256 \\_blockNumber) public view returns (uint8) {\\n\\n    uint256 blockNumber = \\_blockNumber.sub(frozenPeriod); // adjust the block by the frozen period\\n```\\n
Resolution\\nFound in parallel to the audit team and has been mitigated in lukso-network/[email protected]ebc4bce . The issue was further simplified by adding `getCurrentEffectiveBlockNumber()` in lukso-network/[email protected]e4c9ed5 to remove ambiguity when calculating current block number.\\nMake sure `frozenPeriod` calculation is done correctly. It could be solved by renaming `getCurrentBlockNumber()` to reflect the calculation done inside the function.\\ne.g. :\\n`getCurrentBlockNumber()` : gets current block number\\n`getCurrentEffectiveBlockNumber()` : calculates the effective block number deducting `frozenPeriod`
```\\nfunction getCurrentStage() public view returns (uint8) {\\n    return getStageAtBlock(getCurrentBlockNumber());\\n}\\n```\\n