code-423n4 / 2021-10-tally-findings

0 stars 0 forks source link

Gas Optimization On the Integer/Overflow Protection #57

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

defsec

Vulnerability details

Impact

Floating pragma (0.8.x) has been used in the contracts. SafeMath implementation can be deleted from the code. (https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2465) That will provide gas optimization.

Proof of Concept

  1. Navigate to "https://github.com/code-423n4/2021-10-tally/blob/main/contracts/swap/Swap.sol#L11" the following contract. Pragma is defined as 0.8.x and SafeMath is used.

Tools Used

None

Recommended Mitigation Steps

For the gas optimization delete SafeMath implementation.

Shadowfiend commented 2 years ago

Duplicate of #42.