Omniscia Vector Finance Audit
xPTP Code Style Findings
xPTP Code Style Findings
PTP-01C: Inexistent Error Message
Type | Severity | Location |
---|---|---|
Code Style | Informational | xPTP.sol:L19 |
Description:
The linked require
check has no error message explicitly defined.
Example:
contracts/xPTP.sol
19require(ERC20(ptp).transferFrom(msg.sender, mainContract, _amount));
Recommendation:
We advise it to be set so to aid in the validation of the require
's condition as well as the legibility of the codebase.
Alleviation:
The require
check no longer exists in the codebase rendering this exhibit null.
PTP-02C: Variable Mutability Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | xPTP.sol:L8, L9, L14, L15 |
Description:
The linked variables are assigned to only once during the contract's constructor
.
Example:
contracts/xPTP.sol
13constructor(address _mainContract, address _ptp) ERC20("xPTP", "xPTP") {14 mainContract = _mainContract;15 ptp = _ptp;16}
Recommendation:
We advise them to be set as immutable
greatly optimizing their gas cost.
Alleviation:
Both linked variables were properly set as immutable
optimizing the codebase.