The Standard

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

No validation for address check to not be an Eoa

Summary

Important function does not have check for preventing EOA to be set for crucial addresses.

Vulnerability Details

SmartVaultManagerV5 have important function like setWethAddress, setSwapRouter2, setNFTMetadataGenerator, setSmartVaultDeployer, setProtocolAddress, and setLiquidatorAddress which are not checked for being a contract address ,that can result in EOA address setting accidently.

Impact

Setting wrong address for crucial contract addresses will result in redeploying these addresses and loss of gas which can be expensive if network has high traffic volumes.

Tools Used

Manual code review

Recommendations

The recommendation is made for having checks that verify addresses belong to contract at the time of assigning address.

function setWethAddress(address _weth) external onlyOwner() {
+ require(_weth.code.length > 0, ‘address cannot be an EOA’);
weth = _weth;
}

The above recommendation for made for functions of setSwapRouter2, setNFTMetadataGenerator, setSmartVaultDeployer, setProtocolAddress, and setLiquidatorAddress belonging to the contract of SmartVaultManagerV5.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic
Assigned finding tags:

informational/invalid

Support

FAQs

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