The TempleGold.setVestingFactor() function updates the vestingFactor without updating the lastMintTimestamp. As a result, the new vestingFactor might be applied retroactively to a time period that should have used the old vestingFactor.
The relevant code for TempleGold.setVestingFactor() is as follows:
As shown above, the lastMintTimestamp is updated only when it is zero. Otherwise, it remains unchanged. Therefore, the newly set vestingFactor may apply to the time period [lastMintTimestamp, block.timestamp], which should have used the old vestingFactor.
The new vestingFactor might incorrectly apply to periods prior to its actual setting, leading to potential inconsistencies in vesting calculations.
Manual Review.
It's recommended to call the mint() function before updating the vestingFactor. This ensures that all vesting calculations are finalized using the old vestingFactor before it gets updated.
Additionally, the visibility specifier of the mint() function should be changed from external to public.
By implementing this change, you ensure that the new vestingFactor is only applied to future time periods, maintaining the integrity of the vesting calculations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.