SmartVaultManagerV5 has global variables that cannot be assigned values.
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.
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;
}
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.