DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: low
Invalid

The season time returned value should be 0 when the contract is paused

Line of code

https://github.com/Cyfrin/2024-05-beanstalk-the-finale/blob/df2dd129a878d16d4adc75049179ac0029d9a96b/protocol/contracts/beanstalk/sun/SeasonFacet/SeasonFacet.sol#L68

Summary

The season time should be 0 when the contract is paused

Vulnerability Details

currently when the contract is paused, the code does reflect the pausing and does not set the season time to 0 during the pause.

function seasonTime() public view virtual returns (uint32) {
if (block.timestamp < s.sys.season.start) return 0;
if (s.sys.season.period == 0) return type(uint32).max;
return uint32((block.timestamp - s.sys.season.start) / s.sys.season.period);
}

A paused system should not return the season time as if it were not paused. This will lead to confusion for users and will be harder to differentiate when the system is paused or not

Impact

the season time is not 0 when the contract is paused, this will lead to confusion and errors

Tools Used

manual reveiw

Recommendations

season time should be 0 when the contract is paused.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational/Gas

Invalid as per docs https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.