Closed code423n4 closed 2 years ago
Withdraw with _amount being type(uint).max
will withdraw the whole aToken balance.
If this is removed, it will still revert later anyway as the actual withdrawn amount won't be the same as the _amount.
- Send the value type(uint256).max in order to withdraw the whole aToken balance
The comment above L94 should be updated though.
Handle
gzeon
Vulnerability details
Impact
Doesn't make much sense to check against type(uint256).max here:
https://github.com/code-423n4/2022-01-sherlock/blob/c763f10c4b5fe2127677d6c25b83adcf3bcec212/contracts/managers/AaveV2Strategy.sol#L94