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

Open
code423n4 opened this issue Apr 1, 2022 · 1 comment
Open

QA Report #71

code423n4 opened this issue Apr 1, 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

Comments

@code423n4
Copy link
Contributor

Non Critical

Use of Floating Pragma:

Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Recommended Mitigation Steps:

Lock the pragma version: use 0.8.9 instead of ^0.8.0.

Delete unused imports:

Having unused imports make confusion.

Code Style: non-constant should not be named in upper-case:

Non-constant (especially public) variables should not be in SNAKE_CASE, or they may be misunderstood as constants.
Consider changing to camelCase.
https://github.com/code-423n4/2022-03-joyn/blob/main/core-contracts/contracts/CoreCollection.sol#L27
it's value can be changed in:
https://github.com/code-423n4/2022-03-joyn/blob/main/core-contracts/contracts/CoreCollection.sol#L209

Redundant == true in require:

transfer return boolean and require expect a boolean. so these == true can be deleted:
https://github.com/code-423n4/2022-03-joyn/blob/main/royalty-vault/contracts/RoyaltyVault.sol#L44
https://github.com/code-423n4/2022-03-joyn/blob/main/royalty-vault/contracts/RoyaltyVault.sol#L48
https://github.com/code-423n4/2022-03-joyn/blob/main/royalty-vault/contracts/RoyaltyVault.sol#L55

Low Risks

Use better reentrancy attack prevention method than gas limit:

https://github.com/code-423n4/2022-03-joyn/blob/main/splits/contracts/Splitter.sol#L255
As mentioned in comments this can lead to limited reentrancy attack. use openzeppelin reentrancyguard here.
this internal function it's not used yet in other parts of code.
but use a reentrancy attack prevention method when you going to use it.

@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 1, 2022
code423n4 added a commit that referenced this issue Apr 1, 2022
@sofianeOuafir
Copy link
Collaborator

high quality report

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
Projects
None yet
Development

No branches or pull requests

2 participants