code-423n4 / 2022-01-openleverage-findings

0 stars 0 forks source link

Safe Approve Function Is Deprecated - safeIncreaseAllowance and safeDecreaseAllowance commented out #229

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

defsec

Vulnerability details

Impact

On the helper contract, It has been observed that to safeIncreaseAllowance and safeDecreaseAllowance are commented out. (https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2268) safeApprove function is deprecated.

Proof of Concept

  1. Navigate to the following contract.

https://github.com/code-423n4/2022-01-openleverage/blob/main/openleverage-contracts/contracts/lib/TransferHelper.sol#L49

Tools Used

Code Review

Recommended Mitigation Steps

Consider to enable functions and use safeIncreaseAllowance and safeDecreaseAllowance instead of safeApprove.

ColaM12 commented 2 years ago

Duplicate to #87