The Standard

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

SmartVaultManagerV5 has global variables that cannot be assigned values.

Summary

SmartVaultManagerV5 has global variables that cannot be assigned values.

Vulnerability Details

The following global variables cannot be assigned values in the contract, so their values are always 0.

  • address euros;

  • uint256 collateralRate;

  • address tokenManager;

  • ISmartVaultIndex private smartVaultIndex;

  • address swapRouter;
    ##Impact
    Since the variables mentioned above cannot be assigned values and are always at 0, the functions of the entire contract cannot be used normally.

Tools Used

Recommendations

It is recommended to add functions to assign values to the above variables.

constructor(
address _protocol,
address _liquidator,
address _euros,
uint256 _collateralRate,
address _tokenManager,
address _smartVaultDeployer,
ISmartVaultIndex _smartVaultIndex,
uint256 _lastToken,
address _nftMetadataGenerator,
uint256 _mintFeeRate,
uint256 _burnFeeRate,
uint256 _swapFeeRate,
address _weth,
address _swapRouter,
address _swapRouter2) {
protocol = _protocol;
liquidator = _liquidator;
euros = _euros;
collateralRate = _collateralRate;
tokenManager = _tokenManager;
smartVaultDeployer = _smartVaultDeployer;
smartVaultIndex = _smartVaultIndex;
lastToken = _lastToken;
nftMetadataGenerator = _nftMetadataGenerator;
mintFeeRate = _mintFeeRate;
burnFeeRate = _burnFeeRate;
swapFeeRate = _swapFeeRate;
weth = _weth;
swapRouter = _swapRouter;
swapRouter2 = _swapRouter2;
}

Updates

Lead Judging Commences

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

uninitialized-variables

informational/invalid

Support

FAQs

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