Omniscia Tokemak Audit
CurveControllerTemplate Static Analysis Findings
CurveControllerTemplate Static Analysis Findings
CCT-01S: Variable Shadowing
Type | Severity | Location |
---|---|---|
Language Specific | ![]() | CurveControllerTemplate.sol:L25, L26 |
Description:
The linked variable shadows the manager
and addressRegistry
declarations of BaseController
.
Example:
contracts/controllers/CurveControllerTemplate.sol
15contract CurveControllerTemplate is BaseController {16 using SafeERC20 for IERC20;17 using Address for address;18 using SafeMath for uint256;19
20 IAddressProvider public immutable addressProvider;21
22 uint256 public constant N_COINS = 2;23
24 constructor(25 address manager,26 address addressRegistry,27 address curveAddressProvider28 ) public BaseController(manager, addressRegistry) {
Recommendation:
We advise them to be renamed to avoid the naming colission.
Alleviation:
The variable shadowing was eliminated by prefixing all input arguments of the constructor
with an underscore (_
).