Sparkn

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

Make `COMMISSION_FEE` of storage type if protocol want change it in future w/o re deploying the contract

Vulnerability Details

Comment says COMMISSION_FEE can be changed in future but it is constant so non changeable. So if you just want to change it you still need to re-deploy whole Distributor.sol contract again.

File: src/Distributor.sol
59: uint256 private constant COMMISSION_FEE = 500; // this can be changed in the future

Impact

Need to deploy whole contract just to change variable.

Tools Used

Manual Review

Recommendations

Change this variable to storage variable and add one setter function to change it. With access control onlyOwner modifier like the Factory.

Support

FAQs

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