Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QA Report #95

Open
code423n4 opened this issue Apr 7, 2022 · 1 comment · Fixed by with-backed/backed-protocol#71
Open

QA Report #95

code423n4 opened this issue Apr 7, 2022 · 1 comment · Fixed by with-backed/backed-protocol#71
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 resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

Summary:
The codebase and security practices are well implemented, with no comments on that apart from some low and non-critical findings.

Low findings :

[N01] Inconsistent use of safeTransferFrom and transferFrom for ERC721:

NFTLoanFacilitator.sol uses both, for example in line 88 it uses transferFrom and in line 242 it uses safeTransferFrom. It is a bit confusing for the reader the intentions of using the 2 of them in the same contract. Try to choose one of them for better consistency in the code.

[N02] Leap-years considerations

The function _interestOwed in line 372 of NFTLoanFacilitator.sol calculates interest always considering a year like 365 days. Try 36525 instead for more precision and multiply the numerator by 100.

Non-critical findings:

[N03] Confusing comment

In line 164 of NFTLoanFacilitator.sol there is a confusing or maybe incomplete comment. Since solidity 0.8 underflows and overflows reverts, so consider adding to the comment that the operation will throw an error. The comment just says "will underflow if amount < previousAmount".

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Apr 7, 2022
code423n4 added a commit that referenced this issue Apr 7, 2022
@wilsoncusack wilsoncusack added sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") labels Apr 8, 2022
@wilsoncusack
Copy link
Collaborator

can update comment

@wilsoncusack wilsoncusack added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label Apr 15, 2022
@JeeberC4 JeeberC4 reopened this Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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 resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants