Open code423n4 opened 3 years ago
a_delamo
In LifeGuard3Pool and BaseVaultAdaptor contracts, we are doing two approve calls when we could just use one. Doing two safeApprove calls with value = 0 and after value = max doesn't seem to provide any extra feature.
LifeGuard3Pool
BaseVaultAdaptor
For example:
IERC20(_token).safeApprove(address(_vault), 0); IERC20(_token).safeApprove(address(_vault), type(uint256).max);
causes issues with usdt otherwise - could create separate logic to just deal with usdt, but is non-critical.
Handle
a_delamo
Vulnerability details
Impact
In
LifeGuard3Pool
andBaseVaultAdaptor
contracts, we are doing two approve calls when we could just use one. Doing two safeApprove calls with value = 0 and after value = max doesn't seem to provide any extra feature.For example: