The functions from SafeMath used in AaveV3YieldSource.sol is not needed since the compiler has built in overflow checking for Solidity versions above 0.8. Consider removing SafeMath and replacing its operations for the corresponding native operations.
In particular the following changes must be applied:
Unnecessary usage of SafeMath
Details:
The functions from
SafeMath
used in AaveV3YieldSource.sol is not needed since the compiler has built in overflow checking for Solidity versions above 0.8. Consider removingSafeMath
and replacing its operations for the corresponding native operations.In particular the following changes must be applied:
Remove L14 and L26
Change L262 to
Change L361 to
Change L373 to
Gas saved:
Before change:
After change: