sherlock-audit / 2023-04-unitasprotocol-judging

4 stars 3 forks source link

radev_sw - Blacklisted accounts can DoS the withdraw collateral system #143

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

radev_sw

medium

Blacklisted accounts can DoS the withdraw collateral system

Summary

Blacklisted accounts can DoS the withdraw collateral system

Vulnerability Detail

The safeTransfer() to blacklisted user will fail. It will also brick the withdrawal collateral system because the blacklisted user is never cleared.

Impact

DoS of USDC withdrawal system

Code Snippet

https://github.com/sherlock-audit/2023-04-unitasprotocol/blob/main/Unitas-Protocol/src/InsurancePool.sol#L98-L109

Tool used

Manual Review

Recommendation

Can check if msg.sender is blacklisted users inside the withdrawCollateral() function.