Omniscia PolyTrade Finance Audit

PolyTadeToken Static Analysis Findings

PolyTadeToken Static Analysis Findings

PTT-01S: Inexistent Input Validation

Description:

The _governance inputs on the linked functions are not properly sanitized.

Example:

contracts/PolyTadeToken.sol
23constructor(
24 string memory name,
25 string memory symbol,
26 uint256 initialSupply,
27 uint256 allowedAfter,
28 address _governance,
29 address account
30)
31 ERC20(name, symbol)
32 ERC20Permit(name)
33{
34 require(allowedAfter >= 0, "Minting/Burning can only begin after deployment");
35 mintAllowedAfter = block.timestamp + allowedAfter;
36 burnAllowedAfter = block.timestamp + allowedAfter;
37 governance = _governance;
38 _mint(account, initialSupply);
39}

Recommendation:

We advise a zero-address check to be imposed on them to ensure that they are not accidentally set to zero thus causing the contract to no longer be controlled.