AaveDIVAWrapperCore::_removeLiquidity will revert if the user passes max value to remove and their short and long token balances are equal.
In the above call, if the user passes type(uint256).max and if _userBalanceShort and _userBalanceLong values are equal, the call will continue to here because there's nothing that checks the situation where those 2 values are equal
Which will either outright revert, or silently rever since instead of safetransferfrom, transferfrom is used, but the call will revert in subsequent calls when max value is tried to be called here IDIVA(_diva).removeLiquidity(_poolId, _positionTokenAmountToRemove);
and in _redeemWTokenPrivate
if for some reason the previous one passes.
causes revert and/or wastes gas
Manual review
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.