code-423n4 / 2022-04-pooltogether-findings

0 stars 0 forks source link

Gas Optimizations #66

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

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 removing SafeMath and replacing its operations for the corresponding native operations.

In particular the following changes must be applied:

Gas saved:

PierrickGT commented 2 years ago

Duplicate of https://github.com/code-423n4/2022-04-pooltogether-findings/issues/11

PierrickGT commented 2 years ago

Great report, should get extra points.