Omniscia Tokemak Network Audit

Toke Manual Review Findings

Toke Manual Review Findings

TOK-01M: Improper Usage of Inheritence

TypeSeverityLocation
Logical FaultMajorToke.sol:L10

Description:

The Pausable contract that is inherited by the contract is not applied to its functions rendering it redundant.

Example:

contracts/token/Toke.sol
5import "@openzeppelin/contracts/access/Ownable.sol";
6import "@openzeppelin/contracts/utils/Pausable.sol";
7import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
8import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
9
10contract Toke is Ownable, Pausable, ReentrancyGuard, ERC20("Tokemak", "TOKE") {
11 constructor() public {
12 // TODO: split the supply among different accounts (e.g. staking rewards
13 // contract, team, etc.)
14 _mint(msg.sender, 100000000e18); // 100M
15 }
16}

Recommendation:

We advise the ERC20 functions desired to be frozen to be properly overridden and set to contain the correct modifiers introduced by the Pausable implementation.

Alleviation:

The ERC20Pausable implementation was opted to be instead inherited and render overriding unnecessary.