MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: low
Invalid

Comment doesn't match behavior of startTime

Summary

Comment doesn't match behavior of startTime.

Vulnerability Details

The comment states:

// 'startTime_' can't be less than 'payoutStart_'
This implies that if startTime_ is less than payoutStart_, there should be some kind of error or revert.

However, the code below the comment:

if (startTime_ < payoutStart_) {
startTime_ = payoutStart_;
}
Does not generate an error or revert. Instead, it silently modifies the startTime_ parameter by setting it equal to payoutStart_.

So the comment suggests the function should not allow startTime_ less than payoutStart_, but the code silently continues execution after modifying the startTime_ to be valid.

This is a mismatch between what the comment implies (do not allow invalid startTime) and what the code actually does (silently modify startTime to be valid). The behavior does not match what the comment describes.

Ideally the code should match the intent expressed in the comment.

Impact

The mismatch between comment and code can be confusing for future readers.

Tools Used

Manual review

Recommendations

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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