Dria

Swan
NFTHardhat
21,000 USDC
View results
Submission Details
Severity: low
Invalid

missleading commant

Vulnerability Details

there is no minFoundAmount anywhere in the codebase

if (phase != Phase.Withdraw) {
// instead of checking `treasury - _amount < minFoundAmount`//@audit
// we check this way to prevent underflows
if (treasury() < minFundAmount() + _amount) {
revert MinFundSubceeded(_amount);
}
}

https://github.com/Cyfrin/2024-10-swan-dria/blob/c8686b199daadcef3161980022e12b66a5304f8e/contracts/swan/BuyerAgent.sol#L268

Impact

Misleading comments in code can lead to confusion, wasted time, and potential bugs, as developers rely on comments to understand functionality. They can also obscure security vulnerabilities, reduce code quality, and misguide testing and auditing efforts, making the code harder to maintain and less secure. Clear, accurate comments are essential for efficient development and secure, high-quality code.

Tools Used

vsCode

Recommendations

minFoundAmount changed to minFundAmount

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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