You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (uint256 i; i < dexes.length;) {
_dexMapping[i] = Dex({ proxy: dexes[i].proxy, router: dexes[i].router });
unchecked{
++i; //@audit-info: Place here with unchecked
}
}
}
Title:
&&
is less efficientProof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/supervaults/contracts/SuperVault.sol#L344
Recommended Mitigation Steps:
Change to:
========================================================================
Title: Caching
.length
for loop can save gasProof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/dex/DexAddressProvider.sol#L16
Recommended Mitigation Steps:
Change to:
========================================================================
Title: Using unchecked and prefix increment
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/dex/DexAddressProvider.sol#L16
Recommended Mitigation Steps:
Change to:
========================================================================
Title: Using != is more gas efficient
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L122
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L145
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L288
Recommended Mitigation Steps:
========================================================================
Title: Using < is cheaper than <=
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L138
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L219
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L285
Recommended Mitigation Steps:
just use
<
can save gas========================================================================
Title: unnecessary value set. the default value of uint is 0.
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/inception/InceptionVaultsCore.sol#L218
Recommended Mitigation Steps:
remove 0 value can save gas
========================================================================
Title: Unused variable
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/oracles/GUniLPOracle.sol#L16
Recommended Mitigation Steps:
Remove it can save gas
========================================================================
Title: unnecessary value set.The default value of bool is false
Proof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/libraries/ABDKMath64x64.sol#L222
Recommended Mitigation Steps:
remove
false
========================================================================
Title: Using
storage
to declare Struct variable inside functionProof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/liquidityMining/v2/GenericMinerV2.sol#L81
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/liquidityMining/v2/GenericMinerV2.sol#L92
Recommended Mitigation Steps:
instead of caching
UserInfo
to memory. read it directly from storage.========================================================================
Title: Using
calldata
to store struct data type can save gasProof of Concept:
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/liquidityMining/v2/GenericMinerV2.sol#L69
https://github.com/code-423n4/2022-04-mimo/blob/main/core/contracts/liquidityMining/v2/GenericMinerV2.sol#L231
Recommended Mitigation Steps:
Change
memory
tocalldata
========================================================================
The text was updated successfully, but these errors were encountered: