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

Gas Optimizations #7

Closed
code423n4 opened this issue Oct 5, 2022 · 1 comment
Closed

Gas Optimizations #7

code423n4 opened this issue Oct 5, 2022 · 1 comment
Labels
bug Something isn't working G (Gas Optimization) invalid This doesn't seem right unsatisfactory does not satisfy C4 submission criteria; not eligible for awards

Comments

@code423n4
Copy link
Contributor

code423n4 commented Oct 5, 2022

  1. https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/lib/ReentrancyGuarded.sol#L2
    Change to a modified solidity pragma, instead of hardcoded to 0.8.13, e.g. ^0.8.0
  1. https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/lib/ReentrancyGuarded.sol#L10
    boolean values use more gas than uint's so use uint256's instead of boolean values to depict true and false states. This will save gas in the long run as the Change to a modified solidity pragma, instead of hardcoded to 0.8.13, e.g. ^0.8.0 is ran more.

  2. https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/PolicyManager.sol#L77
    use ++i instead of i++ to save gas

  1. https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/BlurExchange.sol#L57-L59
    change public to external to save gas
@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Oct 5, 2022
code423n4 added a commit that referenced this issue Oct 5, 2022
code423n4 added a commit that referenced this issue Oct 5, 2022
@GalloDaSballo
Copy link
Collaborator

Unacceptable submission

@GalloDaSballo GalloDaSballo added the unsatisfactory does not satisfy C4 submission criteria; not eligible for awards label Oct 21, 2022
@JeeberC4 JeeberC4 added the invalid This doesn't seem right label Nov 8, 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 G (Gas Optimization) invalid This doesn't seem right unsatisfactory does not satisfy C4 submission criteria; not eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants