Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 951 Bytes

017.md

File metadata and controls

35 lines (23 loc) · 951 Bytes

Bnke0x0

medium

NO STORAGE GAP FOR UPGRADEABLE CONTRACTS

Summary

Vulnerability Detail

upgradeable abstract contracts, inheriting contracts may introduce new variables. In order to be able to add new variables to the upgradeable abstract contract without causing storage collisions, a storage gap should be added to the upgradeable abstract contract.

Impact

If no storage gap is added, when the upgradable abstract contract introduces new variables, it may override the variables in the inheriting contract.

Code Snippet

https://github.com/sherlock-audit/2023-03-teller/blob/main/teller-protocol-v2/packages/contracts/contracts/TellerV2Context.sol#L11-L14

abstract contract TellerV2Context is
    ERC2771ContextUpgradeable,
    TellerV2Storage
{

Tool used

Manual Review

Recommendation

Consider adding a storage gap at the end of the upgradeable abstract contract

uint256[50] private __gap;