Gas Optimizations #24
Labels
bug
Something isn't working
G (Gas Optimization)
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
Gas optimization
File Aura.sol
https://github.com/code-423n4/2022-05-aura/blob/main/contracts/Aura.sol
Remove unnecesarry libraries and external calls, Aura math do plain math operations, there is no need to use this libraries. You also arent using Address lib and SafeERC20
File
AuraLocker.sol
Extract to variable on loop;
Remove unnecesarry libraries and external calls, Aura math do plain math operations, there is no need to use this libraries.
Use unchecked to increment or decrement the iterator variable. You could safely save gas.
Save some gas in loops using storage
File AuraBalRewardPool.sol
Remove SafeMath;
NOTE: SafeMath is no longer needed starting with Solidity 0.8. The compiler now has built in overflow checking.
File AuraVestedEscrow.sol
Uso unchecked for increment
i
var in for loopThe text was updated successfully, but these errors were encountered: