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

Open
code423n4 opened this issue May 25, 2022 · 1 comment
Open

QA Report #268

code423n4 opened this issue May 25, 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 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

Comments

@code423n4
Copy link
Contributor

QA Report

Remarks/Recommendations

  • epoch always seems to be an even multiple of rewardsDuration = 7 * 86400. However, it would probably be better to just have an epoch number. A lot of the arithmetic would be simplified this way. Any time you need to compare against the epoch start time you could just multiply by 86400*7.

Non-critical: Consider removing simple AuraMath functions

Functions in AuraMath like add and sub have been reimplemented to take advantage of Solidity 0.8.x's over/underflow checking. But calling these functions is sure to cost more gas than simply performing the arithmetic. Consider removing the functions and just inlining the code at all the locations in the code where you use them.

Non-critical: Move require in AuraMerkleDrop.forwardPenalty to constructor

Since penaltyForwarder is immutable just move require(penaltyForwarder != address(0), "!forwarder"); at AuraMerkleDrop.sol:152 to the constructor

@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 May 25, 2022
code423n4 added a commit that referenced this issue May 25, 2022
@0xMaharishi 0xMaharishi added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label May 28, 2022
@0xMaharishi 0xMaharishi added the resolved Finding has been patched by sponsor (sponsor pls link to PR containing fix) label May 30, 2022
@0xMaharishi
Copy link

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

No branches or pull requests

2 participants