We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
File https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/dex/DexAddressProvider.sol#L21 https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/liquidityMining/v2/PARMinerV2.sol#L40-L43
Current code;
modifier onlyManager() { require(_a.controller().hasRole(_a.controller().MANAGER_ROLE(), msg.sender), "LM010"); _; }
Recommendation
modifier onlyManager() { IAccessController c = _a.controller(); require(c.hasRole(c.MANAGER_ROLE(), msg.sender), "LM010"); _; }
File: https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/inception/AdminInceptionVault.sol#L149-L154
Same issue, consider cache _a.core() in a local variable to avoid a external call.
_a.core()
Files: https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L137-L157 https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L187-L208 https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L289-L291
Same issue, consider cache a.core() in a local variable to avoid a external calls.
a.core()
Files: https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L233 https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L255 https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L292
Consider caching IERC20(a.stablex()
IERC20(a.stablex()
Current
require(IERC20(a.stablex()).transfer(msg.sender, IERC20(a.stablex()).balanceOf(address(this))));
Recomendattion
IERC20 _stablex = IERC20(a.stablex()); require(_stablex.transfer(msg.sender, _stablex.balanceOf(address(this))));
Files: https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L369-L371
Consider caching ga.mimo()
ga.mimo()
The text was updated successfully, but these errors were encountered:
0x4non issue #8
cc1d978
Duplicate of #2
Sorry, something went wrong.
No branches or pull requests
Cache variables for gas optimization
File
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/dex/DexAddressProvider.sol#L21
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/liquidityMining/v2/PARMinerV2.sol#L40-L43
Current code;
Recommendation
File:
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/core/contracts/inception/AdminInceptionVault.sol#L149-L154
Same issue, consider cache
_a.core()
in a local variable to avoid a external call.Files:
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L137-L157
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L187-L208
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L289-L291
Same issue, consider cache
a.core()
in a local variable to avoid a external calls.Files:
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L233
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L255
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L292
Consider caching
IERC20(a.stablex()
Current
Recomendattion
Files:
https://github.com/code-423n4/2022-04-mimo/blob/f088e83f79b5ec66fb5eb39e6bb9fe33f446dd49/supervaults/contracts/SuperVault.sol#L369-L371
Consider caching
ga.mimo()
The text was updated successfully, but these errors were encountered: