sherlock-audit / 2023-04-unitasprotocol-judging

4 stars 3 forks source link

XDZIBEC - XO-withdrawCollateral function allows attacker to withdraw more collateral than they have deposited. #77

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

XDZIBEC

high

XO-withdrawCollateral function allows attacker to withdraw more collateral than they have deposited.

Summary

Manual Review

Recommendation

-Adding a check to the withdrawCollateral function to make sure that the amount is greater than or equal to the amount of collateral that the user has deposited.