The Standard

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

The lack of a methods to set the state variable's value will result in the value of the state variable always being zero

Summary

The lack of a methods to set the state variable's value will result in the value of the state variable will always being Zero

Vulnerability Details

There are loss some set methods in SmartVaultManagerV5 contract .

address public protocol;
address public liquidator;
>>> address public euros;
>>> uint256 public collateralRate;
>>> address public tokenManager;
address public smartVaultDeployer;
>>> ISmartVaultIndex private smartVaultIndex;
uint256 private lastToken;
address public nftMetadataGenerator;
uint256 public mintFeeRate;
uint256 public burnFeeRate;
uint256 public swapFeeRate;
address public weth;
>>> address public swapRouter;
address public swapRouter2;

Impact

These values will always be Zero value (zero address / number 0 ), will affect other querys and calls .
For example;
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultManagerV5.sol#L76-L77

IEUROs(euros).grantRole(IEUROs(euros).MINTER_ROLE(), vault);
IEUROs(euros).grantRole(IEUROs(euros).BURNER_ROLE(), vault);

These calls will revert .

Tools Used

Mannual Review, VSCode

Recommendations

Add corresponding setVaule methods
like
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/SmartVaultManagerV5.sol#L119-L129

function setSwapRouter2(address _swapRouter) external onlyOwner() {
swapRouter2 = _swapRouter;
}
function setNFTMetadataGenerator(address _nftMetadataGenerator) external onlyOwner() {
nftMetadataGenerator = _nftMetadataGenerator;
}
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.