QA Report #14
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 disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
valid
QA (LOW & NON-CRITICAL)
[L-01] Outdated compiler version
Using very old versions of Solidity prevents benefits of bug fixes and newer security checks. Using the latest versions might make contracts susceptible to undiscovered compiler bugs. The scoped contract's compiler version is 0.6.12 Current Solidity version available is 0.8.15
[L-02] Deprecated safeApprove() function
The OpenZeppelin ERC20 safeApprove() function has been deprecated.A deeper discussion on the deprecation of this function is in OZ issue #2219. The OpenZeppelin ERC20 safeApprove() function has been deprecated, as seen in the comments of the OpenZeppelin code.
The deprecated function is found in:
[L-03] Critical address / parameter changes
Critical address changes are not done in two steps for the following methods:
manualSetDelegate()
,setBribesProcessor()
Changing critical addresses in contracts should be a two-step process where the first transaction (from the old/current address) registers the new address (i.e. grants ownership) and the second transaction (from the new address) replaces the old address with the new one (i.e. claims ownership). This gives an opportunity to recover from incorrect addresses mistakenly used in the first step. If not, contract functionality might become inaccessible. Reference, Reference
[L-04] Missing of zero address checks
No
address(0)
or Zero value check for the followings:[L-05] Questionable visibility
The
_withdrawSome
,_harvest
functions have the visibility ofinternal
However, there are no functions calling it on the same contract unless any contract will inherit MyStrategy.sol[L-06] Variable shadowing in _withdrawSome()
The _withdrawSome function is reverting with the max withdrawable amount. However, the local variables are being shadowed creating redundant statemens. Please check @Audit-Info comments below;
[L-07] Boundries for _harvest()
_harvest
function executes the swaps according toauraBalEarned > 0
. But for the sake of clearity and being user friendly, there should be bounds for this comparison. Else, the method can even burn more gas than the value to be harvested. In theory;auraBalEarned
should be proportionally greater than gasleft().[L-08] Unbounded loop on array can lead to DoS
Programming patterns such as looping over arrays of unknown size may lead to DoS when the gas cost of execution exceeds the block gas limit. Reference
Instances;
[L-09] External Calls inside a loop
Calls to external contracts inside a loop are dangerous (especially if the loop index can be user-controlled) because it could lead to DoS if one of the calls reverts or execution runs out of gas. Avoid calls within loops, check that loop index cannot be user-controlled or is bounded.Reference
Instances;
[N-01] Scoped contracts are missing proper NatSpec comments
The scoped contracts are missing proper NatSpec comments such as @notice @dev @param on many places.It is recommended that Solidity contracts are fully annotated using NatSpec for all public interfaces (everything in the ABI) Reference
[N-02] TODO and TODO like comments
The team might consider to remove TODO and TODO like comments as below;
tend
to be called?The text was updated successfully, but these errors were encountered: