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

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

QA Report #375

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

QA Report

  • Error messages length
    Shortening revert strings to fit in 32 bytes will decrease deployment time gas and will decrease runtime gas when the revert condition is met. Revert strings that are longer than 32 bytes require at least one additional mstore, along with additional overhead for computing memory offset, etc.
    An even better and gas efficient approach will be to use Solidity Custom Errors instead of revert strings.

HomeFi

  • Use accept admin-ship to avoid transferring the admin role to a non-existing address
    In the current implementation, if the replaceAdmin function is called with an invalid address, the admin-ship will be transferred to this address and it can DoS the admin role. It will be better to make the new admin call a function before actually transferring the admin-ship, in order to validate that the new admin's address is valid and reachable.
  • Missing a check that _forwarder != address(0) in the constructor
  • Missing underscore in the beginning of the mintNFT internal function

Project

  • Missing underscore in the beginning of the checkSignature, autoWithdraw internal functions
  • Typo in line 214 (then instead of them) - // Allocate funds to tasks and mark then as allocated
  • Magic numbers in lines 281, 369, 423 (use the enum values instead)
@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