-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
A lot of functions inside CapitalAgent.sol that don't make any external calls and are protected by the onlyRole(ADMIN_ROLE) modifier also have the nonReentrant modifier which is redundant and just wastes gas. Such functions are:
setSalesPolicyFactorysetOperatoraddPoolWhiteListremovePoolWhiteListremovePoolsetPolicysetPolicyByAdminremovePolicy
There are redundant zero address checks in some of the remove functions like removePool and removePoolWhiteList. The check that the pool exists is enough as there is a zero address check in the add functions.
A redundant zero address check in setPolicy - checking that the salesPolicyFactory == msg.sender is enough.
The collectPremiumInETH function inside PremiumPool.sol also has a redundant nonReentrant modifier.
Metadata
Metadata
Assignees
Labels
No labels