ERC20Upgradeable.sol and ERC4626Upgradeable.sol do not define a private uint256[] __gap #127
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-c
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2022-12-gogopool/blob/main/contracts/contract/tokens/upgradeable/ERC20Upgradeable.sol#L206
https://github.com/code-423n4/2022-12-gogopool/blob/main/contracts/contract/tokens/upgradeable/ERC4626Upgradeable.sol#L179
Vulnerability details
Impact
If a gap is not defined, then a storage shift occurs if a new storage variable is added.
Check https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/token/ERC20/ERC20Upgradeable.sol for an example.
Recommended Mitigation Steps
Add
uint256[50] private __gap;
at the end of the contracts.The text was updated successfully, but these errors were encountered: