You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Magic Numbers are used in Admin._stake(), which both obscure the purpose of the function and unnecessarily lead to potential error if the constants are changed during development. Since they are used to refer to a constant defined in RoleAware, and Admin inherits from RoleAware, then Admin can simply call that constant.
Handle
jvaqa
Vulnerability details
Impact
Magic Numbers are used in Admin._stake(), which both obscure the purpose of the function and unnecessarily lead to potential error if the constants are changed during development. Since they are used to refer to a constant defined in RoleAware, and Admin inherits from RoleAware, then Admin can simply call that constant.
Recommended Mitigation Steps
In Admin._stake(), change this:
IncentiveDistribution(incentiveDistributor()).addToClaimAmount(
1,
holder,
amount
);
to this:
IncentiveDistribution(incentiveDistributor()).addToClaimAmount(
FUND_TRANSFERER,
holder,
amount
);
The text was updated successfully, but these errors were encountered: