code-423n4 / 2021-11-vader-findings

0 stars 0 forks source link

SafeMath with Solidity >0.8 #242

Closed code423n4 closed 2 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

There are contracts that declare solidity compiler version >= 0.8 but still use SafeMath, e.g. UniswapV2Library, StakingRewards:

  using SafeMath for uint256;

Starting from 0.8 you no longer need to use an external SafeMath library as it is already baked in and used under the hood unless explicitly stated by using the 'unchecked' directive.

0xstormtrooper commented 3 years ago

StakingRewards - duplicate, confirmed https://github.com/code-423n4/2021-11-vader-findings/issues/70