Validate the new operator is not address(0)
so that the operator role remains accessible in case of mistakenly setting a zero/empty value.
Consider refactoring duplicate code between these two functions since most of the code is exactly the same except for the difference in the update to the daily low.
Most of the protected functions in the FED
contract have the explicit require to check the sender's role. Consider adding a onlyGov
and onlyChair
modifier to protect these functions.
Check that gov
and chair
are not zero/empty (address(0)
) in the contract's constructor and in the functions changeGov
and changeChair
.
Both balanceOf
functions of IERC20
and IDolaBorrowingRights
interfaces aren't used in the scope of this contract and can be safely removed.
Validate _replenishmentIncentiveBps
is greater than 0 during initialization to match the semantics defined in the setter setReplenismentIncentiveBps
.
Validate _gov != address(0)
in the contract's constructor and the setGov
setter. A wrong value here will lead to the contract being ungovernable.
Missing h in the function's name.
The storage variable _totalSupply
is defined as public, which will define a _totalSupply()
getter, which could cause confusion with the totalSupply()
function that properly tracks debt.
Validate _operator != address(0)
in the contract's constructor. A wrong value here will leave role protected functions inaccessible.