The protocol may not work as expected in years that are not 365 days long, which could lead to a loss of confidence in the protocol. In fact, the next year is one of those years (leap year).
Furthermore, defining it as a constant in the contract is an invariant that can clearly lead to errors in the protocol.
JumpRateModel.sol
20: uint public constant timestampsPerYear = 60 * 60 * 24 * 365;
Manual review
The variable should not be constants, and there should be additional measures in case a year has 366 days like the next year will.
Other
The text was updated successfully, but these errors were encountered:
All reactions