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

Open
code423n4 opened this issue Jul 13, 2022 · 0 comments
Open

Gas Optimizations #299

code423n4 opened this issue Jul 13, 2022 · 0 comments
Labels
bug Warden finding G (Gas Optimization) old-submission-method sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

https://github.com/code-423n4/2022-07-fractional/blob/e2c5a962a94106f9495eb96769d7f60f7d5b14c9/src/Vault.sol#L64:
the revert should be at start to avoid unnecessary wastage of gas

In https://github.com/code-423n4/2022-07-fractional/blob/e2c5a962a94106f9495eb96769d7f60f7d5b14c9/src/Vault.sol#L78 and https://github.com/code-423n4/2022-07-fractional/blob/e2c5a962a94106f9495eb96769d7f60f7d5b14c9/src/Vault.sol#L104 , the for loop can be optimised
for (uint256 i; i<length) {
unchecked {
++i;
}
}

code423n4 added a commit that referenced this issue Jul 13, 2022
@mehtaculous mehtaculous added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Warden finding G (Gas Optimization) old-submission-method sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

2 participants