The RToken
contract contains unused variables such as _minter
and _burner
, which are set by functions (setMinter
, setBurner
) but never utilized in the core minting or burning processes. This introduces unnecessary complexity, confusion, and potential for errors in contract logic. While _assetAddress
is used in functions related to asset transfers, the _minter
and _burner
variables have no effect, raising concerns about the clarity and maintainability of the code.
Unused Variables: The contract defines the _minter
and _burner
variables, which are set by the functions setMinter
and setBurner
respectively. However, these variables are not referenced anywhere in the contract, particularly in the minting (mint
) or burning (burn
) functions, leading to ambiguity about their intended usage.
Unclear Roles: The presence of these unused variables may cause confusion for developers and auditors regarding the intended functionality and control mechanisms in the contract. The _minter
and _burner
variables could suggest that only specific addresses are authorized to mint or burn tokens, but without their usage, there is no enforcement of such logic.
Low to Medium: The unused _minter
and _burner
variables do not directly cause security vulnerabilities but contribute to unnecessary complexity. Their lack of usage could result in misconfiguration or confusion, as it is unclear why these roles are defined if they are not enforced. In the long term, unused code may lead to future errors or vulnerabilities, especially if developers mistakenly assume these variables are part of the core logic.
Potential for Future Issues: If these unused variables are mistakenly assumed to function as access control for minting or burning operations, there is a risk that they could be inadvertently exploited or misconfigured.
Manual Review
Remove Unused Variables: If the _minter
and _burner
variables are not necessary for the intended functionality, they should be removed to simplify the contract and reduce the attack surface.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.