Open code423n4 opened 3 years ago
mail@gpersoon.com
gpersoon
gpersoon.eth
This is a minor suggestion.
The function isStakePenalizer in RoleAware.sol uses roles.getRole... However all other function use roleCache...
It's not clear why this difference exists.
If roleCache could also be used a tiny amount of gas could be safed.
Check if isStakePenalizer can use roleCache, in that case update the source. Otherwise provide a comment why roles.getRole is neccesary
This submission has been judged as non-critical as it has no impact on the security or function of the contract.
non-critical
Email address
mail@gpersoon.com
Handle
gpersoon
Eth address
gpersoon.eth
Vulnerability details
This is a minor suggestion.
The function isStakePenalizer in RoleAware.sol uses roles.getRole... However all other function use roleCache...
It's not clear why this difference exists.
Impact
If roleCache could also be used a tiny amount of gas could be safed.
Proof of concept
Recommended mitigation steps
Check if isStakePenalizer can use roleCache, in that case update the source. Otherwise provide a comment why roles.getRole is neccesary