Sparkn

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

The addresses for FACTORY_ADDRESS and STADIUM_ADDRESS must be distinct and cannot be identical

Summary

The variables, FACTORY_ADDRESS and STADIUM_ADDRESS, can be initialized identically. However, if this process is not successfully executed, the funds associated with these addresses may be at risk of loss.

Vulnerability Details

In the constructor, both FACTORY_ADDRESS and STADIUM_ADDRESS are initialized and verified against address(0), which aligns with best practices. However, there is no verification in place to ensure that these two addresses are not identical.

Impact

Should this occur, the funds allocated for fees would be irretrievable.

Tools Used

Manual code review

Recommendations

Please incorporate a verification step within the constructor as follows:

if (factoryAddress == stadiumAddress) revert Distributor__CannotBeSameAddress();

Support

FAQs

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