Description:Description\
In the Validator contract, the internal _void function is intended to remove an address from both the whitelist and the blacklist by setting its status to Status.VOID. However, the documentation comment above the function incorrectly states that it "Removes address from the blacklist," which does not fully capture the function's effect.
Affected Code:
/**
* @dev Removes address from the blacklist.
* @param account Address to remove.
*/
function _void(address account) internal {
accountStatus[account] = Status.VOID;
emit Voided(account);
}
Issue:
Misleading Documentation: The comment suggests that the function only removes the address from the blacklist, whereas it actually resets the accountStatus to VOID, effectively removing the address from both the whitelist and the blacklist.
Potential Confusion: Developers or auditors reading the code may misunderstand the function's purpose, leading to incorrect assumptions about how the contract manages account statuses.
Impact:
Incorrect Usage: Misinterpretation of the function could result in improper management of account statuses, potentially causing unauthorized access or unintended restrictions.
Audit Oversight: Auditors might overlook the fact that the function affects both lists, possibly missing security implications related to access control.
Recommendation:
Update the documentation comment for the _void function to accurately reflect its functionality. The comment should clearly state that the function removes the address from both the whitelist and the blacklist by setting its status to VOID.
Corrected Code:
/**
* @dev Removes address from both the whitelist and blacklist.
* @param account Address to remove.
*/
function _void(address account) internal {
accountStatus[account] = Status.VOID;
emit Voided(account);
}
Github username: -- Twitter username: -- Submission hash (on-chain): 0xc3842bd5777fbbfda1cd21007083c8e4786e931c3930ef9d16fedd687e5ca209 Severity: low
Description: Description\ In the
Validator
contract, the internal_void
function is intended to remove an address from both the whitelist and the blacklist by setting its status toStatus.VOID
. However, the documentation comment above the function incorrectly states that it "Removes address from the blacklist," which does not fully capture the function's effect.Affected Code:
Issue:
accountStatus
toVOID
, effectively removing the address from both the whitelist and the blacklist.Impact:
Recommendation:
Update the documentation comment for the
_void
function to accurately reflect its functionality. The comment should clearly state that the function removes the address from both the whitelist and the blacklist by setting its status toVOID
.Corrected Code: