Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: medium
Invalid

missing gap will brick the contracts when they are upgraded

Summary

Vulnerability Details

VaultDepositController is using Strategy, which in tern is upgradable. However the Strategy contract is missing a vital part of it's storage system - the __gap

abstract contract Strategy is IStrategy, Initializable, UUPSUpgradeable, OwnableUpgradeable {
IERC20Upgradeable public token;
IStakingPool public stakingPool;
//@audit missing gap, if upgraded it will corrupt all integrations, i.e. VCS
function __Strategy_init(address _token, address _stakingPool) public onlyInitializing {
token = IERC20Upgradeable(_token);
stakingPool = IStakingPool(_stakingPool);
__Ownable_init();
__UUPSUpgradeable_init();
}

Without it if the contract is upgraded and a storage variable is added then this variable will push the storage slots by 1, corrupting VCS or any other contract that inherits from Strategy. This will break VCS and cause it's user to lose their funds.

Impact

If upgraded contracts storage will be corrupted, i.e. contract is bricked and users lose their funds.

Tools Used

Manual review.

Recommendations

Add gaps to all contracts that are missing it.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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