QA Report #17
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Impact
[1] Using Safe Math is not necessary in 0.8.0+ solidity versions.
Consider using regular operations +-*/.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[2] Consider following the Checks-Effects-Interactions pattern.
Emitting event should be at the end of the function.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[3] Consider using IAuraLocker type here.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[4] Consider using IOwner type here.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[5] Magic number, consider using named constant instead.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[6] Using if (val) is easier to read rather than if (val == true).
Using if (!val) is easier to read rather than if (val == false).
Consider updating all occurrences.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[7] By default, function types and state variables/constants are internal, so the internal keyword can be omitted.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[8] Consider using "_" separate digit capacity i.e "100000" could be replaced to "100_000".
This increases code readability.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[9] Consider using IERC20 type instead of address.
Or IERC20[] type instead of address[].
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[10] Uint8-256 / Int8-256 is assigned to zero by default, additional reassignment to zero is unnecessary.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[11] It is recommended to explicitly specify uint256 type instead of uint type for better readability.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[12] If '''cliff >= totalCliffs''' nothing will be minted.
Consider reverting or adding require in this case.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[13] MinterMinted can be initialized with zero in state variables.
Then you wouldn't need to change it in init function.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[14] Complicated code.
Consider reducing if nesting here by having early return/continue.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[15] Consider to not wrap basic arithmetic operations in a separate functions.
Just use
a + b
instead of a.add(b).Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[16] Possible overflow here.
Consider checking array length != 0.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[17] Stake function could be simplified by calling stakeFor(msg.sender, _amount).
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
Impact
[18] Epochs[0] may not exist in array.
Consider adding require.
Affected code:
Proof of Concept
Tools Used
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: