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

0 stars 0 forks source link

LeveragedPool has require statements which are also checked in library #10

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

loop

Vulnerability details

When making external calls to ERC20 functions LeveragedPool checks for zero addresses. These checks are already available in the OpenZeppelin ERC20 implementation which is used. This results in redundant checks which increase gas costs when calling these functions.

Proof of Concept

Require statements used in LeveragedPool:

Checks in OpenZeppelin implementation:

Tools Used

Remix

GalloDaSballo commented 3 years ago

Agree with finding, OpenZeppelin already provides validation