Omniscia Bonq Audit
mintable-token Manual Review Findings
mintable-token Manual Review Findings
MIN-01M: Improper Code Structure
Type | Severity | Location |
---|---|---|
Logical Fault | mintable-token.sol:L10-L11, L16-L21 |
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 owner9contract MintableToken is ERC20, Ownable {10 /// @dev the list of minters11 mapping(address => address) public minters;12
13 // solhint-disable-next-line func-visibility14 constructor(string memory name, string memory symbol) ERC20(name, symbol) {}15
16 /// @dev mints tokens to the recipient, to be called from owner17 /// @param recipient address to mint18 /// @param amount amount to be minted19 function mint(address recipient, uint256 amount) public onlyOwner {20 _mint(recipient, amount);21 }22
23 /// @dev burns token of specified amount from msg.sender24 /// @param amount to burn25 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.