Omniscia Bonq Audit

mintable-token Manual Review Findings

mintable-token Manual Review Findings

MIN-01M: Improper Code Structure

Description:

The code alludes to a set of minters capable of minting tokens, however, the code itself only permits the owner of the contract to do so.

Example:

contracts/mintable-token.sol
8/// @title implements minting/burning functionality for owner
9contract MintableToken is ERC20, Ownable {
10 /// @dev the list of minters
11 mapping(address => address) public minters;
12
13 // solhint-disable-next-line func-visibility
14 constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
15
16 /// @dev mints tokens to the recipient, to be called from owner
17 /// @param recipient address to mint
18 /// @param amount amount to be minted
19 function mint(address recipient, uint256 amount) public onlyOwner {
20 _mint(recipient, amount);
21 }
22
23 /// @dev burns token of specified amount from msg.sender
24 /// @param amount to burn
25 function burn(uint256 amount) public {
26 _burn(msg.sender, amount);
27 }
28}

Recommendation:

We advise the contract to be revised to only contain code components for the minting functionality it ultimately wishes to fulfil as otherwise the code cannot be considered as sound and production-ready.

Alleviation:

The Bonq Protocol team has improved the code structure by removing the minters mapping.