Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

STORAGE COLLISION BETWEEN PROXY AND IMPLEMENTATION (LACK EIP 1967)

Summary

The Proxy contract potentially presents a storage collision risk due to non-adherence to the guidelines of EIP1967, which could lead to overwriting of variables and unintended behavior.

Vulnerability Details

In the implementation of Proxy, the proxy and its logic share the same storage layout. This sharing may cause storage collisions, bringing a risk of variables being overwritten in an unpredictable manner. EIP1967 was proposed to circumvent such storage collisions by recommending proxy variables to be set at fixed positions.

Notably, this contract inherits from Ownable, with the _implementation variable located at the first slot. This poses a risk of _implementation being overwritten during implementation.

Impact

Due to storage collisions, variables might be overwritten, leading to unpredictable behaviors. This can potentially compromise the safety and functionality of the contract.

Tools Used

Manual code review

Recommendations

Consider adhering to the guidelines of EIP1967.

Support

FAQs

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

Give us feedback!