QA Report #58
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
sponsor disputed
Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
C4-001 : Deprecated safeApprove() function
Impact - LOW
Detailed description of the impact of this finding.
Using this deprecated function can lead to unintended reverts and potentially the locking of funds. A deeper discussion on the deprecation of this function is in OZ issue #2219 (OpenZeppelin/openzeppelin-contracts#2219). The OpenZeppelin ERC20 safeApprove() function has been deprecated, as seen in the comments of the OpenZeppelin code.
Proof of Concept
Tools Used
Code Review
Recommended Mitigation Steps
As suggested by the OpenZeppelin comment, replace safeApprove() with safeIncreaseAllowance() or safeDecreaseAllowance() instead.
C4-002 : The Contract Should Approve(0) first
Impact - LOW
Some tokens (like USDT L199) do not work when changing the allowance from an existing non-zero allowance value.
They must first be approved by zero and then the actual allowance must be approved.
Proof of Concept
Tools Used
None
Recommended Mitigation Steps
Approve with a zero amount first before setting the actual amount.
C4-003 : Lack Of Return Value Check On the Oracle
Impact - LOW
During the code review, It has been seen that oracle return value has not been checked on the function. If oracle is returned price as a 0, borrowLimit will be zero.
Proof of Concept
Tools Used
None
Recommended Mitigation Steps
Consider to add return value check on the oracle function.
C4-004 : Missing zero-address check in constructors and the setter functions
Impact - LOW
Missing checks for zero-addresses may lead to infunctional protocol, if the variable addresses are updated incorrectly.
Proof of Concept
Tools Used
Code Review
Recommended Mitigation Steps
Consider adding zero-address checks in the discussed constructors:
require(newAddr != address(0));.
C4-005 : Incompatibility With Rebasing/Deflationary/Inflationary tokens
Impact - LOW
The protocol do not appear to support rebasing/deflationary/inflationary tokens whose balance changes during transfers or over time. The necessary checks include at least verifying the amount of tokens transferred to contracts before and after the actual transfer to infer any fees/interest.
Proof of Concept
Tools Used
Manual Code Review
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: