The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Modifiers code specifications in `SmartVaultManagerV5`

Summary

There are two kinds of modifier usage in SmartVaultManagerV5, onlyOwner and onlyOwner()

Vulnerability Details

Accroding to the form 's answer .
https://ethereum.stackexchange.com/questions/152224/solidity-modifier-attachment-expression-onlyowner-vs-onlyowner-any-differenc

onlyOwner and onlyOwner() are same effect .
brackets are more often used when we need to pass arguments to the modifier. Else normally we don't use brackets.

There is no parameters required here, so we are more inclined to use onlyOwner .

https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultManagerV5.sol#L111-L117

function setSwapFeeRate(uint256 _rate) external onlyOwner {
swapFeeRate = _rate;
}
function setWethAddress(address _weth) external onlyOwner() {
weth = _weth;
}

Impact

Different code specifications will influence the code 's robustness and readability

Tools Used

Mannual Review, VScode

Recommendations

Unify the standard of modifier and only use onlyOwner here .

Updates

Lead Judging Commences

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

informational/invalid

Support

FAQs

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