HardhatDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Potential for excessive token removal

Summary

Vulnerability Details

if '_positionTokenAmount' is set to 'type(uuint256).max, the function uses the minimum pf the users short and long token balances, but it does not check if the users has enough tokens to cover the removal

Impact

This could lead to a situation where the user attempts to remove more liquidity than then they have, which will result in revert

Tools Used

Recommendations

Ensure that the user has enough tokens to cover the removal before proceeding with transfer.
require(userBalanceShort >= _positionTokenAmountToRemove, "Not enough Tokens");

Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.