sherlock-audit / 2023-05-USSD-judging

9 stars 7 forks source link

BugBusters - There isn't any redeem function in the code #948

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

BugBusters

high

There isn't any redeem function in the code

Summary

There isn't any redeem function in the code, so user will not be able to redeem is collateral back and will be stuck with the USSD tokes forever

Vulnerability Detail

The code does not include a redeem function, which means there is no mechanism for users to convert or redeem their USSD tokens back into the underlying collateral or any other form of value. This limitation can result in users being unable to liquidate or utilize their USSD tokens, effectively trapping their funds within the token indefinitely.

Impact

1): Loss of funds for the User. 2): Reputation loss for the protocol

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L2

Tool used

Manual Review

Recommendation

Add redeem function through which user will be able to get their underlying tokens back

Duplicate of #958