Dria

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

Incorrect check for platformFee

Summary

Incorrect check for platformFee

Vulnerability Details

Incorrect check for _marketParameters.platformFee in setMarketParameters function , the function must revert if the platformFee is set to 100% .

function setMarketParameters(SwanMarketParameters memory _marketParameters) external onlyOwner {
//@audit must be < 100
require(_marketParameters.platformFee <= 100, "Platform fee cannot exceed 100%");
_marketParameters.timestamp = block.timestamp;
marketParameters.push(_marketParameters);
}

Impact

unexpected behavior if fee is 100%

Tools Used

Manual Review

Recommendations

function setMarketParameters(SwanMarketParameters memory _marketParameters) external onlyOwner {
//@audit must be < 100
require(_marketParameters.platformFee < 100, "Platform fee cannot exceed 100%");
_marketParameters.timestamp = block.timestamp;
marketParameters.push(_marketParameters);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 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.