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 #345

Open
code423n4 opened this issue Aug 6, 2022 · 0 comments
Open

QA Report #345

code423n4 opened this issue Aug 6, 2022 · 0 comments
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 valid

Comments

@code423n4
Copy link
Contributor

  • In porjectFactory.sol L78 function createProject is under the EXTERNAL VIEWS commentary while not beeing a view function.
  • HomeFi.sol function isProjectExist naming is not correct english. doesProjectExist is better
  • The function getTask in the contract Project does not take the same argument name as indicated in the interface IProject, it is id instead of _taskId.
  • In Community.sol L686, consider using 1 days instead of 86400.
  • In Tasks.sol L16 the mapping alerts should be of type mapping(Lifecycle => bool). Some other parts of the code would need to be modified (remove conversions to uint256).
  • HomeFi.sol, function createProject L210: everyone is free to create a project with any given hash, even the hash of an already existing project. This does not cause direct issue inside the protocol, but could be the source of some troubles if other protocols base their trust on the hash of the project. Possible fix: create a mapping (hash => bool) to avoid collisons.
  • In the contract Project, the function projectCost can run out of gas if there are too many tasks. It would block the functions lendToProject and toggleLendingNeeded, that are important functions. Suggested fix: update the project cost in a storage variable each time a task is added of updated.
  • For the builder to repay totally a loan, he has to give exactly the amount owed, if he gives too much, the function _reduceDebt will revert. But, because the lender is gaining interests at each block, it will be very difficult for the builder to give exacly the amount owed, so the debt can be endless. Seggested fix: accept giving more value that owed, and let the function cap the amout by itslef.
@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 Aug 6, 2022
code423n4 added a commit that referenced this issue Aug 6, 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 valid
Projects
None yet
Development

No branches or pull requests

2 participants