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

Open
code423n4 opened this issue Jul 16, 2022 · 1 comment
Open

QA Report #42

code423n4 opened this issue Jul 16, 2022 · 1 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 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

Mixed Use of Custom Errors and require(condition, "msg"

Severity: Informational
Context: Witch.sol

Description:
It's better to stick to one or the other to stay consistent.

Recommendation:
I would recommend the use of just custom errors to save gas on deployment.

otherWitches Possible Name Suggestion

Severity: Informational
Context: Witch.sol#L68

Description:
"The name is a bit misleading, as any address can be entered. Better naming suggestions are welcome."

Recommendation:
Maybe Witched, VaultTaken, bewitched or hexed

Contract Code Size Exceeds Bytes Limit

Severity: Informational
Context: Witch.sol

Description:
Contract code size is 28515 bytes and exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet.

Recommendation:
Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.

TODOs Left In The Code

Severity: Informational
Context: Witch.sol#L577

Description:
There should never be any TODOs in the code when deploying.

Recommendation:
Add this TODO to the docs instead.

Spelling Errors

Severity: Informational
Context: Witch.sol#L213 (overriden => overridden), Witch.sol#L220 (repayed => repaid), Witch.sol#L267 (overriden => overridden), Witch.sol#L267 (differente => different), Witch.sol#L462 (overriden => overridden), Witch.sol#L512 (Delete the extra space), Witch.sol#L520 (quoutes => quotes), Witch.sol#L520 (hoy => how)

Description:
Spelling errors in comments can cause confusion to both users and developers.

Recommendation:
Check all misspellings to ensure they are corrected.

Missing or Incomplete NatSpec

Severity: Informational
Context: Witch.sol

Description:
Some functions are missing @notice/@dev NatSpec comments for the function, @param for all/some of their parameters and @return for return values. Given that NatSpec is an important part of code documentation, this affects code comprehension, auditability and usability.

Recommendation:
Add in full NatSpec comments for all functions to have complete code documentation for future use.

@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 Jul 16, 2022
code423n4 added a commit that referenced this issue Jul 16, 2022
@alcueca
Copy link
Collaborator

alcueca commented Jul 22, 2022

Ok

@alcueca alcueca added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Jul 22, 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 sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

2 participants