Sparkn

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

Absence of Token Delisting Mechanism in Whitelist

Summary

Absence of Token Delisting Mechanism in Whitelist

Vulnerability Details

The constructor allows for the initial setup of whitelisted tokens, but there's no provided functionality to remove a token from the whitelist later on. This can be problematic, especially if one of the whitelisted tokens turns out to have security issues. Without a way to delist or remove a problematic token from the whitelist, the system remains vulnerable to any issues associated with that token.

constructor(address[] memory _whitelistedTokens) EIP712("ProxyFactory", "1") Ownable() {
if (_whitelistedTokens.length == 0) revert ProxyFactory__NoEmptyArray();
for (uint256 i; i < _whitelistedTokens.length;) {
if (_whitelistedTokens[i] == address(0)) revert ProxyFactory__NoZeroAddress();
whitelistedTokens[_whitelistedTokens[i]] = true;
unchecked {
i++;
}
}
}

Impact

The protocol may remains vulnerable to any issues associated with that compromised token.

Tools Used

Vscode

Recommendations

Implement a function, only callable by the contract owner or authorized addresses, to remove a token from the whitelist.

Support

FAQs

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