Omniscia Colony Lab Audit

AntToken Code Style Findings

AntToken Code Style Findings

ATN-01C: Duplicate Transfer of Ownership

TypeSeverityLocation
Logical FaultAntToken.sol:L49

Description:

The AntToken implementation invokes the initializer of the Ownable implementation twice, once on its own and once within the PrivilegedGroupUpgradeable.initialize call.

Example:

contracts/StakingV2/AntToken.sol
45/**
46 * @param penaltyRedistributionPeriod_ time in seconds used for notifying rewards
47 */
48function initialize (uint256 penaltyRedistributionPeriod_) external initializer {
49 __Ownable_init();
50 __ReentrancyGuard_init();
51 __ERC20_init("ANT Token", "ANT");
52 __ERC20Permit_init("ANT Token");
53 PrivilegedGroupUpgradeable.initialize();
54 penaltyRedistributionShareMantissa = 5e17; // 50%
55 penaltyRedistributionPeriod = penaltyRedistributionPeriod_;
56}

Recommendation:

We advise initialization to only occur once within the PrivilegedGroupUpgradeable.initialize call.

Alleviation:

The __Ownable_init call was omitted from the codebase as advised.